Set Operations

Union, intersection, difference, complement—these operations let us combine, compare, and contrast sets. It’s like doing math with Venn diagrams! 🔁

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:

  1. \((A \cap B) \cap C\)
  2. \((A \cup B) \cap C\)
  3. \((A \cup B) - C\)

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\} \]

\[ \bar{A} = \{0, 4, 5\} \]