Skip to main content

Section 13.2 Union, Intersection, and Complement

Commonly sets interact. For example, you and a new roommate decide to have a house party, and you both invite your circle of friends. At this party, two sets are being combined, though it might turn out that there are some friends that were in both sets.

Definition 13.2.1. Union.

The union of two sets contains all the elements contained in either set (or both sets).

The union is notated \(A\cup B\text{.}\)

More formally, \(x\in A\cup B\) if \(x\in A\) or \(x \in B\) (or both).

Definition 13.2.2. Intersection.

The intersection of two sets contains only the elements that are in both sets.

The intersection is notated \(A\cap B\text{.}\)

More formally, \(x\in A\cap B\) if \(x\in A\) and \(x\in B\text{.}\)

Definition 13.2.3. Complement.

The complement of a set \(A\) contains everything that is not in the set \(A\text{.}\)

The complement is notated \(A^\prime\) or \(A^c\text{,}\) or sometimes \(\sim A\text{.}\)

Example 13.2.4.

Consider the sets:

\begin{align*} A &= \{\text{red, green, blue}\}\\ B &= \{\text{red, yellow, orange}\}\\ C&= \{\text{red, orange, yellow, green, blue, purple}\} \end{align*}

a) Find \(A\cup B\text{.}\)

The union contains all the elements in either set:

\begin{equation*} A\cup B = \{\text{red, green, blue, yellow, orange}\}. \end{equation*}

Notice we only list red once.

b) Find \(A\cap B\text{.}\)

The intersection contains all the elements in both sets:

\begin{equation*} A\cap B = \{\text{red}\}. \end{equation*}

c) Find \(A^c \cap C\text{.}\)

Here we’re looking for all the elements that are not in set \(A\) and are also in \(C\text{.}\)

\begin{equation*} A^c \cap C = \{\text{orange, yellow, purple}\}. \end{equation*}

Using the sets from Example 13.2.4, find \(A\cup C\) and \(B^c \cap A\text{.}\)

Answer
\begin{align*} A\cup C &= \{\text{red, orange, yellow, green, blue, purple}\}.\\ B^c \cap A &= \{\text{green, blue}\}. \end{align*}

Notice that in the example above, it would be hard to just ask for \(A^c\text{,}\) since everything from the color fuchsia to puppies and peanut butter are included in the complement of the set. For this reason, complements are usually only used with intersections, or when we have a universal set in place.

Definition 13.2.6. Universal Set.

A universal set is a set that contains all the elements we are interested in. This would have to be defined by the context.

A complement is relative to the universal set, so \(A^c\) contains all the elements in the universal set that are not in \(A\text{.}\)

Example 13.2.7.
  1. If we were discussing searching for books, the universal set might be all the books in the library.

  2. If we were grouping your Facebook friends, the universal set would be all your Facebook friends.

  3. If you were working with sets of numbers, the universal set might be all whole numbers, all integers, or all real numbers

Example 13.2.8.

Suppose the universal set is

\begin{equation*} U = \text{all whole numbers from 1 to 9}. \end{equation*}

If \(A=\{1, 2, 4\}\text{,}\) then

\begin{equation*} A^c = \{3, 5, 6, 7, 8, 9\}. \end{equation*}

As we saw earlier with the expression \(A^c\cap C\text{,}\) set operations can be grouped together. Grouping symbols can be used like they are with arithmetic – to force an order of operations.

Example 13.2.9.

Suppose

\begin{align*} H&=\{\text{cat, dog, rabbit, mouse}\}\\ F&= \{\text{dog, cow, duck, pig, rabbit}\}\\ W &= \{\text{duck, rabbit, deer, frog, mouse}\}. \end{align*}

a) Find \((H\cap F) \cup W\text{.}\)

We start with the intersection: \(H\cap F = \{\text{dog, rabbit}\}.\)

Now we union that result with \(W\text{:}\)

\begin{equation*} (H\cap F)\cup W = \{\text{dog, duck, rabbit, deer, frog, mouse}\}. \end{equation*}

b) Find \(H\cap (F\cup W)\text{.}\)

We start with the union: \(F\cup W = \{\text{dog, cow, rabbit, duck, pig, deer, frog, mouse}\}\text{.}\)

Now we intersect that result with \(H\text{:}\)

\begin{equation*} H\cap (F\cup W) = \{\text{dog, rabbit, mouse}\}. \end{equation*}

c) Find \((H\cap F)^c \cap W\text{.}\)

We start with the intersection: \(H\cap F= \{\text{dog, rabbit}\}\text{.}\)

Now we want to find the elements of \(W\) that are not in \(H\cap F\text{.}\)

\begin{equation*} (H\cap F)^c \cap W = \{\text{duck, deer, frog, mouse}\}. \end{equation*}

Exercises 13.2.1 Exercises

Using the sets

\begin{align*} A& = \{1, 2, 3, 4, 5\} \\ B &= \{1, 3, 5\}\\ C &= \{4, 6\}\\ U &= \{\text{numbers from 0 to 10}\} \end{align*}

and treating \(U\) as the universal set, find each of the following.

1.

\(A\cup B\)

Answer

\(A\cup B = \{1, 2, 3, 4, 5\}.\)

2.

\(A\cup C\)

3.

\(A\cap C\)

Answer

\(A\cap C=\{4\}.\)

4.

\(B\cap C\)

5.

\(A^c\)

Answer

\(A^c = \{6, 7, 8, 9, 10\}.\)

6.

\(B^c\)

Let

\begin{align*} D&= \{ b, a, c, k\}\\ E&= \{t,a,s,k\}\\ F&= \{b,a,t,h\}. \end{align*}

Using these sets, find the following:

7.

\(D^c\cap E\)

Answer

\(D^c\cap E = \{t,s\}.\)

8.

\(F^c\cap D\)

9.

\((D\cap E)\cup F\)

Answer

\((D\cap E) \cup F = \{k, b, a, t, h\}.\)

10.

\(D\cap (E\cup F)\)

11.

\((F\cap E)^c\cap D\)

Answer

\((F\cap E)^c\cap D = \{b, c, k\}.\)

12.

\((D\cup E)^c \cap F\)