Skip to main content

Section 7.2 Set Operations, Unions, Intersection, Complement

Sets can be combined in various ways to form new sets, through set operations.

Subsection 7.2.1 Union

Definition 7.2.1.

The union of \(A\) and \(B\text{,}\) denoted by \(A \cup B\text{,}\) is the set of all elements in \(A\) or in \(B\text{.}\) In other words,

\begin{equation*} \boxed{A \cup B = \set{x: x \in A \text{ or } x \in B}} \end{equation*}

Intuitively, “union” (like a marriage union) means to be joined together.

Recall that here, the “or” is inclusive, so \(A \cup B\) is the set of all elements in \(A\) or in \(B\text{,}\) or in both.

Using mathematical logic,

\begin{equation*} \brac{x \in A \cup B} \iff (x \in A) \lor (x \in B) \end{equation*}

For finite sets, the union of two sets \(A \cup B\) can be formed by listing all elements of \(A\text{,}\) then including every element of \(B\) that is not already listed (or vise versa).

Subsection 7.2.2 Intersection

Definition 7.2.2.

The intersection of \(A\) and \(B\text{,}\) \(A \cap B\text{,}\) is the set of all elements in \(A\) and in \(B\text{.}\) In other words, \(A \cap B\) contains all the elements that \(A\) and \(B\) share in common, or,

\begin{equation*} \boxed{A \cap B = \set{x: x \in A \text{ and } x \in B}} \end{equation*}

Intuitively, “intersection” means common elements, or commonalities.

Using mathematical logic,

\begin{equation*} (x \in A \cap B) \iff (x \in A) \land (x \in B) \end{equation*}

For finite sets, the intersection \(A \cap B\) can be formed by listing all the elements included in both sets.

Subsection 7.2.3 Basic Examples

For \(A = \set{1,3,5}, B = \set{1,2,4}\text{,}\) we have,

\begin{equation*} A \cap B = \set{1} \qquad \text{and} \qquad A \cup B = \set{1,2,3,4,5} \end{equation*}

For any set \(A\text{,}\) \(A \cup \emptyset = A\) and \(A \cap \emptyset = \emptyset\text{.}\)

Definition 7.2.5.

Sets \(A\) and \(B\) are disjoint if they share no elements in common. In other words, if \(A \cap B = \emptyset\text{.}\) Otherwise, \(A\) and \(B\) are said to intersect.

This is one of the reasons that is it helpful to define a set with no elements, so that the intersection of two disjoint sets can be defined to also be a set.

Figure 7.2.6. The difference between union and intersection ft. the Rock

The symbols for \(\cup\) (a “cup”) and \(\cap\) (a “cap”), as well as \(\in\text{,}\) we first introduced in 1889 by Giuseppe Peano, Italian mathematician.

Subsection 7.2.4 Universal Sets

Often, when defining sets, we want to restrict our focus onto a certain set of objects. For example, if we want to talk about number sets, this might be the set of all real numbers \(\mathbb{R}\text{.}\) This is what is called a universal set.

Definition 7.2.7.

The universal set is the largest set that contains all the relevant objects being considered in a given discussion or problem, of which all other sets are a subset of.

If \(A = \set{\text{hockey}, \text{lacrosse}, \text{baseball}}, B = \set{\text{soccer}, \text{tennis}}\text{,}\) then the universal set \(U\) might be the set of all sports.

The operations of union and intersection can be more precisely defined using reference to a universal set, as,

\begin{gather*} A \cup B = \set{x \in U: x \in A \text{ or } x \in B}\\ A \cap B = \set{x \in U: x \in A \text{ and } x \in B} \end{gather*}

Subsection 7.2.5 Set Complements

Definition 7.2.9.

Let \(A\) be a set with universal set \(U\text{.}\) The set complement of \(A\text{,}\) denoted by \(\overline{A}\) (or \(A^c\text{,}\) or \(A'\)), is all the elements of U that are not in \(A\text{.}\) In other words,

\begin{equation*} \overline{A} = \set{x \in U: x \notin A} \end{equation*}

Using mathematical logic,

\begin{equation*} (x \in A) \iff (x \notin \overline{A}) \end{equation*}

If \(U = \set{1, 2, 3, 4, 5}\) and \(A = \set{1, 3, 5}\text{,}\) then \(\overline{A} = \set{2, 4}\text{.}\)

If \(U\) is the set of all letters in the English alphabet, and \(A\) is the set of all consonants, then \(\overline{A}\) is the set of all vowels,

\begin{equation*} \overline{A} = \set{\text{a}, \text{e}, \text{i}, \text{o}, \text{u}} \end{equation*}

If \(A\) is the set of all even integers, \(A = \set{2n: n \in \mathbb{Z}}\text{,}\) then for \(U = \mathbb{Z}\text{,}\) its complement \(\overline{A}\) is the set of all odd integers,

\begin{equation*} \overline{A} = \set{2n + 1: n \in \mathbb{Z}} \end{equation*}

If \(A\) is the set of all (strictly) negative real numbers, \(A = \set{x: x \lt 0}\text{,}\) then for \(U = \mathbb{R}\text{,}\) its complement \(\overline{A}\) is the set of all non-negative real numbers,

\begin{equation*} \overline{A} = \set{x : x \leq 0} \end{equation*}

If \(U\) is the universal set, then \(\overline{U} = \emptyset\) and \(\overline{\emptyset} = U\text{.}\)

Subsection 7.2.6 Set Difference

Definition 7.2.15.

The set difference (or relative complement) of \(A\) and \(B\text{,}\) \(A \setminus B\) or \(A - B\text{,}\) is the set of all elements in \(A\) that are not in \(B\text{.}\) In other words,

\begin{equation*} \boxed{A \setminus B = \set{x: x \in A \text{ and } x \notin B}} \end{equation*}

Using mathematical logic,

\begin{equation*} (x \in A \setminus B) \iff (x \in A) \land (x \notin B) \end{equation*}

Intuitively, \(A \setminus B\) is the set formed by “subtracting” off all elements of \(B\) from \(A\text{.}\)

If \(A\) and \(B\) are disjoint, then \(A \setminus B = A\text{.}\)

If \(A \setminus B = \emptyset\text{,}\) then \(A \subseteq B\text{.}\)

If \(A \cap B = \emptyset\text{,}\) then \(A \setminus B = A\text{.}\)

Set complement can be written in terms of set difference, as \(\overline{A} = U \setminus A\text{.}\)

Set difference can be written in terms of intersection and set complement, as \(A \setminus B = A \cap \overline{B}\text{.}\)

Subsection 7.2.7 Generalized Union and Intersection

Definition 7.2.18.

Let \(A_1, A_2, \dots, A_n\) be subsets of a universal set \(U\text{.}\) Then,

\begin{align*} \bigcup_{i=1}^n A_i \amp = A_1 \cup A_2 \cup \dots \cup A_n = \set{x \in U: x \in A_i \text{ for some } i = 1, 2, \dots, n}\\ \bigcap_{i=1}^n A_i \amp = A_1 \cap A_2 \cap \dots \cap A_n = \set{x \in U: x \in A_i \text{ for every } i = 1, 2, \dots, n} \end{align*}