Set Operations
Union, Intersection, and Difference
Suppose \(A\) and \(B\) are sets.
A union of \(A\) and \(B\) is the set: \[ A \cup B = \{x: x \in A \text{ or } x \in B \} \]
A intersection of \(A\) and \(B\) is the set: \[ A \cap B = \{x: x \in A \text{ and } x \in B \} \]
A difference of \(A\) and \(B\) is the set: \[ A - B = \{x: x \in A \text{ and } x \notin B \} \]
Exercise
Shade in the region matching the expression:
- \((A \cap B) \cap C\)
- \((A \cup B) \cap C\)
- \((A \cup B) - C\)
Solution
Complements
Suppose \(A\) is a set.
A universal set is a larger set that encompasses other sets.
The complement of \(A\), denoted \(\bar{A}\), is the set \(\bar{A} = U - A\).
\[ P = \{2, 3, 5, 7, ...\} \quad \textbf{(prime numbers)} \]
\[ \bar{P} = \mathbb{N} - P = \{1, 4, 6, ...\} \]
Exercise
Find \(\bar{A}\):
\[ A = \{1,2,3\}, U = \{0,1,2,3,4,5\} \]
Solution
\[ \bar{A} = \{0, 4, 5\} \]