9.4: Complement, union, and intersection
First, it is often convenient to restrict the scope of the discussion.
a set that contains all objects currently under consideration
We will consider all of the following set operations to be performed within a universal set \(U\text{.}\) In particular, suppose \(A,B\subseteq U\text{.}\)
9.4.1: Universal and relative complement
the set of elements of \(U\) which are not in \(A\)
the complement of \(A\) (in \(U\)), so that
\begin{equation*} A^{C} = \{ x \in U \vert x \notin A \} \end{equation*}
if \(A,B \subseteq U\text{,}\) the complement of \(A\) in \(B\) is the set of elements of \(B\) which are not in \(A\)
the complement of \(A\) in \(B\text{,}\) so that
\begin{equation*} B \setminus A = \{ x \in B \vert x \notin A \} \end{equation*}
Another common notation for relative complement is \(B - A\text{.}\) However, this conflicts with the notation for the algebraic operation of subtraction in certain contexts, so we will prefer the notation \(B \setminus A\text{.}\)
- Suppose \(B = \{ 1, 2, 3, 4, 5, 6 \}\) and \(A = \{ 1, 3, 5 \}\text{.}\) Then \(B \setminus A = \{ 2, 4, 6 \}\text{.}\)
- The complement of the set of rational numbers \(\mathbb{Q}\) inside the set of real numbers \(\mathbb{R}\) is called the set of irrational numbers, and we write \(\mathbb{I} = \mathbb{R} \setminus \mathbb{Q} \) for this set. If you are thinking of real numbers in terms of their decimal expanions, the irrational numbers are precisely those that have nonterminating, nonrepeating decimal expansions.
9.4.2: Union, intersection, and disjoint sets
the combined collection of all elements in a pair of sets
the union of sets \(A\) and \(B\text{,}\) so that
\begin{equation*} A \cup B = \{ x\in U \vert x\in A \text{ or } x\in B \text{ (or both)}\} \end{equation*}
the collection of only those elements common to a pair of sets
the intersection of \(A\) and \(B\text{,}\) so that
\begin{equation*} A \cap B = \{x\in U \vert x\in A \text{ and } x\in B \} \end{equation*}
A union contains every element from both sets, so it contains both sets as subsets:
\begin{equation*} A, B \subseteq A \cup B \text{.} \end{equation*}
On the other hand, every element in an intersection is in both sets, so the intersection is a subset of both sets:
\begin{equation*} A \cap B \subseteq A, B \text{.} \end{equation*}
For subsets \(A = \{1,2,3,4\}\) and \(B = \{3,4,5,6\}\) of \(\mathbb{N}\text{,}\) we have
\begin{align*} A \cup B & = \{1,2,3,4,5,6\}, & A \cap B & = \{3,4\}. \end{align*}
Consider the following subsets of \(\mathbb{N}\text{.}\)
\begin{align*} \scr{E} & = \{ n\in\mathbb{N} \vert n\text{ even}\} & \scr{P} & = \{n\in\mathbb{N} \vert n\text{ prime, } n\mathbb{N}e 0\} \\ \scr{O} & = \{ n\in\mathbb{N} \vert n\text{ odd} \} & \scr{T} & = \{3n \vert n\in\mathbb{N} \} = \{ 0,\, 3,\, 6,\, 9,\, \ldots \} \end{align*}
Then,
\begin{align*} \scr{E} \cup\scr{O} & = \mathbb{N}, & \scr{E} \cap \scr{P} & = \{2\}, & \scr{E} \cap \scr{T} & = \{6n \vert n\in\mathbb{N} \}, \\ \scr{E} \cap \scr{O} & = \emptyset, & \scr{O} \cap \scr{P} & = \scr{P} \setminus \{2\}, & \scr{O} \cap \scr{T} & = \{6n+3 \vert n\in\mathbb{N}\}. \end{align*}
sets that have no elements in common, i.e. sets \(A,B\) such that \(A\cap B = \emptyset\)
a union \(A \cup B\) where \(A\) and \(B\) are disjoint
the disjoint union of sets \(A\) and \(B\)
Sets \(\scr{E},\scr{O}\) from Example \(\PageIndex{3}\) are disjoint, and \(\mathbb{N} = \scr{E} \sqcup \scr{O}\text{.}\)
If \(A \subseteq U\text{,}\) then we can express \(U\) as a disjoint union \(U = A \sqcup A^{C}\text{.}\) Similarly, if \(U = A \sqcup B\text{,}\) then we must have \(B = A^{C}\text{.}\)
9.4.3: Rules for set operations
Suppose \(A,B,C\) are subsets of a universal set \(U\text{.}\) Then the following set equalities hold.
-
Properties of the universal set.
- \(\displaystyle A \cup U = U \)
- \(\displaystyle A \cap U = A \)
-
Properties of the empty set.
- \(\displaystyle A \cup \emptyset = A \)
- \(\displaystyle A \cap \emptyset = \emptyset \)
-
Duality of universal and empty sets.
- \(\displaystyle U^{C} = \emptyset \)
- \(\displaystyle \emptyset ^{C} = U \)
- \(\displaystyle (A^{C})^C = A \)
-
Idempotence.
- \(\displaystyle A \cup A = A \)
- \(\displaystyle A \cap A = A \)
-
Commutativity.
- \(\displaystyle A \cup B = B \cup A \)
- \(\displaystyle A \cap B = B \cap A \)
-
Associativity.
- \(\displaystyle (A \cup B) \cup C = A \cup (B \cup C) \)
- \(\displaystyle (A \cap B) \cap C = A \cap (B \cap C) \)
-
Distributivity.
- \(\displaystyle A \cap (B \cup C) = (A \cap B) \cup (A \cap C) \)
- \(\displaystyle A \cup (B \cap C) = (A \cup B) \cap (A \cup C) \)
- \(\displaystyle (A \cup B) \cap C = (A \cap C) \cup (B \cap C) \)
- \(\displaystyle (A \cap B) \cup C = (A \cup C) \cap (B \cup C) \)
-
DeMorgan's Laws.
- \(\displaystyle (A \cup B)^C = A^{C} \cap B^C \)
- \(\displaystyle (A \cap B)^C = A^{C} \cup B^C \)
- Proof of Rule 9.a.
-
Recall that to prove this set equality, we need to show both
\begin{align*} (A \cup B)^C & \subseteq A^{C} \cap B^C \text{,} & A^{C} \cap B^C & \subseteq (A \cup B)^C \text{.} \end{align*}
Show \((A \cup B)^C \subseteq A^{C} \cap B^C\).
We need to show\begin{equation*} x \in (A \cup B)^C \Rightarrow x \in A^{C} \cap B^C \text{.} \end{equation*}
If \(x \in (A \cup B)^C\) then by definition of complement, \(x\in U\) but \(x \notin A \cup B\text{.}\) Then \(x \notin A\) must be true, since if \(x\) were in \(A\) then it would also be in \(A \cup B\text{.}\) Similarly, \(x \notin B\) must also be true. So \(x \in A^{C}\) and \(x\in B^C\text{;}\) i.e. \(x\in A^{C} \cap B^C\text{.}\)
Show \(A^{C} \cap B^C \subseteq (A \cup B)^C \). We need to show
\begin{equation*} x \in A^{C} \cap B^C \Rightarrow x \in (A \cup B)^C \text{.} \end{equation*}
If \(x \in A^{C} \cap B^C\) then by definition of intersection, both \(x \in A^{C}\) and \(x \in B^C\) are true.; i.e. \(x \notin A\) and \(x \notin B\text{.}\) Since \(A \cup B\) is all elements of \(U\) which are in one (or both) of \(A,B\text{,}\) we must have \(x \notin A \cup B\text{.}\) Thus \(x \in (A \cup B)^C\text{.}\)
- Proofs of the other rules.
-
These are left to you, the reader, in the Exercise 9.9.1 .
Compare the set operation rules of the proposition above with the Rules of Propositional Calculus.