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,
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,
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,
Intuitively, “intersection” means common elements, or commonalities.
Using mathematical logic,
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
Example 7.2.3.
For \(A = \set{1,3,5}, B = \set{1,2,4}\text{,}\) we have,
Example 7.2.4.
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.
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.
Example 7.2.8.
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,
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,
Using mathematical logic,
Example 7.2.10.
If \(U = \set{1, 2, 3, 4, 5}\) and \(A = \set{1, 3, 5}\text{,}\) then \(\overline{A} = \set{2, 4}\text{.}\)
Example 7.2.11.
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,
Example 7.2.12.
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,
Example 7.2.13.
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,
Example 7.2.14. Complements of universal set and empty set.
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,
Using mathematical logic,
Intuitively, \(A \setminus B\) is the set formed by “subtracting” off all elements of \(B\) from \(A\text{.}\)
Example 7.2.16.
If \(A\) and \(B\) are disjoint, then \(A \setminus B = A\text{.}\)
Example 7.2.17.
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,