First, it is often convenient to restrict the scope of the discussion.
universal set
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{.}\)
Subsection9.4.1Universal and relative complement
complement
the set of elements of \(U\) which are not in \(A\)
\(\cmplmnt{A}\)
the complement of \(A\) (in \(U\)), so that
\begin{equation*}
\cmplmnt{A} = \setdef{ x \in U }{ x \notin A }
\end{equation*}
relative complement
if \(A,B \subseteq U\text{,}\) the complement of \(A\) in \(B\) is the set of elements of \(B\) which are not in \(A\)
\(B \relcmplmnt A\)
the complement of \(A\) in \(B\text{,}\) so that
\begin{equation*}
B \relcmplmnt A = \setdef{ x \in B }{ x \notin A }
\end{equation*}
Note9.4.2.
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 \relcmplmnt A\text{.}\)
Example9.4.3.Some examples of relative complement involving number sets.
Suppose \(B = \{ 1, 2, 3, 4, 5, 6 \}\) and \(A = \{ 1, 3, 5 \}\text{.}\) Then \(B \relcmplmnt A = \{ 2, 4, 6 \}\text{.}\)
The complement of the set of rational numbers \(\Q\) inside the set of real numbers \(\R\) is called the set of irrational numbers, and we write \(\I = \R \relcmplmnt \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.
Subsection9.4.2Union, intersection, and disjoint sets
union
the combined collection of all elements in a pair of sets
\(A \union B\)
the union of sets \(A\) and \(B\text{,}\) so that
\begin{equation*}
A \union B = \setdef{x\in U}{x\in A \text{ or } x\in B \text{ (or both)}}
\end{equation*}
intersection
the collection of only those elements common to a pair of sets
\(A \intersection B\)
the intersection of \(A\) and \(B\text{,}\) so that
\begin{equation*}
A \intersection B = \setdef{x\in U}{x\in A \text{ and } x\in B}
\end{equation*}
Note9.4.5.
A union contains every element from both sets, so it contains both sets as subsets:
\begin{equation*}
A, B \subseteq A \union 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 \intersection B \subseteq A, B \text{.}
\end{equation*}
Example9.4.6.
For subsets \(A = \{1,2,3,4\}\) and \(B = \{3,4,5,6\}\) of \(\N\text{,}\) we have
\begin{align*}
A \union B \amp = \{1,2,3,4,5,6\}, \amp A \intersection B \amp = \{3,4\}.
\end{align*}
sets that have no elements in common, i.e. sets \(A,B\) such that \(A\intersection B = \emptyset\)
disjoint union
a union \(A \union B\) where \(A\) and \(B\) are disjoint
\(A \disjunion B\)
the disjoint union of sets \(A\) and \(B\)
Example9.4.9.
Sets \(\mathscr{E},\mathscr{O}\) from Example 9.4.7 are disjoint, and \(\N = \mathscr{E} \disjunion \mathscr{O}\text{.}\)
Remark9.4.10.
If \(A \subseteq U\text{,}\) then we can express \(U\) as a disjoint union \(U = A \disjunion \cmplmnt{A}\text{.}\) Similarly, if \(U = A \disjunion B\text{,}\) then we must have \(B = \cmplmnt{A}\text{.}\)
Subsection9.4.3Rules for set operations
Proposition9.4.11.Rules for Operations on Sets.
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 \union U = U \)
\(\displaystyle A \intersection U = A \)
Properties of the empty set.
\(\displaystyle A \union \emptyset = A \)
\(\displaystyle A \intersection \emptyset = \emptyset \)
Duality of universal and empty sets.
\(\displaystyle \cmplmnt{U} = \emptyset \)
\(\displaystyle \cmplmnt{\emptyset} = U \)
Double complement.
\(\displaystyle \cmplmnt{(\cmplmnt{A})} = A \)
Idempotence.
\(\displaystyle A \union A = A \)
\(\displaystyle A \intersection A = A \)
Commutativity.
\(\displaystyle A \union B = B \union A \)
\(\displaystyle A \intersection B = B \intersection A \)
Associativity.
\(\displaystyle (A \union B) \union C = A \union (B \union C) \)
\(\displaystyle (A \intersection B) \intersection C = A \intersection (B \intersection C) \)
Distributivity.
\(\displaystyle A \intersection (B \union C) = (A \intersection B) \union (A \intersection C) \)
\(\displaystyle A \union (B \intersection C) = (A \union B) \intersection (A \union C) \)
\(\displaystyle (A \union B) \intersection C = (A \intersection C) \union (B \intersection C) \)
\(\displaystyle (A \intersection B) \union C = (A \union C) \intersection (B \union C) \)
Show \(\cmplmnt{(A \union B)} \subseteq \cmplmnt{A} \intersection \cmplmnt{B}\).
We need to show
\begin{equation*}
x \in \cmplmnt{(A \union B)} \lgcimplies x \in \cmplmnt{A} \intersection \cmplmnt{B} \text{.}
\end{equation*}
If \(x \in \cmplmnt{(A \union B)}\) then by definition of complement, \(x\in U\) but \(x \notin A \union B\text{.}\) Then \(x \notin A\) must be true, since if \(x\) were in \(A\) then it would also be in \(A \union B\text{.}\) Similarly, \(x \notin B\) must also be true. So \(x \in \cmplmnt{A}\) and \(x\in\cmplmnt{B}\text{;}\) i.e. \(x\in \cmplmnt{A} \intersection \cmplmnt{B}\text{.}\)
Show \(\cmplmnt{A} \intersection \cmplmnt{B} \subseteq \cmplmnt{(A \union B)} \).
We need to show
\begin{equation*}
x \in \cmplmnt{A} \intersection \cmplmnt{B} \lgcimplies x \in \cmplmnt{(A \union B)} \text{.}
\end{equation*}
If \(x \in \cmplmnt{A} \intersection \cmplmnt{B}\) then by definition of intersection, both \(x \in \cmplmnt{A}\) and \(x \in \cmplmnt{B}\) are true.; i.e. \(x \notin A\) and \(x \notin B\text{.}\) Since \(A \union B\) is all elements of \(U\) which are in one (or both) of \(A,B\text{,}\) we must have \(x \notin A \union B\text{.}\) Thus \(x \in \cmplmnt{(A \union B)}\text{.}\)