Set TheoryTopic #9 of 40

Set Operations

Union, intersection, complement, difference, symmetric difference, and Venn diagrams.

Basic Operations

Union

The union of AA and BB contains elements in either set: A∪B={x∣x∈A∨x∈B}A \cup B = \{x \mid x \in A \lor x \in B\}

Example: {1,2,3}∪{3,4,5}={1,2,3,4,5}\{1, 2, 3\} \cup \{3, 4, 5\} = \{1, 2, 3, 4, 5\}

Intersection

The intersection of AA and BB contains elements in both sets: A∩B={x∣x∈A∧x∈B}A \cap B = \{x \mid x \in A \land x \in B\}

Example: {1,2,3}∩{3,4,5}={3}\{1, 2, 3\} \cap \{3, 4, 5\} = \{3\}

Difference (Relative Complement)

The difference A−BA - B contains elements in AA but not in BB: A−B=A∖B={x∣x∈A∧x∉B}A - B = A \setminus B = \{x \mid x \in A \land x \notin B\}

Example: {1,2,3}−{3,4,5}={1,2}\{1, 2, 3\} - \{3, 4, 5\} = \{1, 2\}

Complement

The complement of AA contains all elements not in AA (relative to universal set UU): A‾=Ac=U−A={x∈U∣x∉A}\overline{A} = A^c = U - A = \{x \in U \mid x \notin A\}

Symmetric Difference

The symmetric difference contains elements in exactly one set: A⊕B=A△B=(A−B)∪(B−A)A \oplus B = A \triangle B = (A - B) \cup (B - A) =(A∪B)−(A∩B)= (A \cup B) - (A \cap B)

Example: {1,2,3}⊕{3,4,5}={1,2,4,5}\{1, 2, 3\} \oplus \{3, 4, 5\} = \{1, 2, 4, 5\}

Venn Diagrams

Venn diagrams visualize set operations with overlapping circles.

Two Sets

RegionDescription
A∩BA \cap BIntersection (overlap)
A−BA - BOnly in A
B−AB - AOnly in B
A∪BA \cup BAll shaded areas
A∪B‾\overline{A \cup B}Outside both circles

Generalized Operations

Union of Multiple Sets

⋃i=1nAi=A1∪A2∪⋯∪An\bigcup_{i=1}^{n} A_i = A_1 \cup A_2 \cup \cdots \cup A_n

Intersection of Multiple Sets

⋂i=1nAi=A1∩A2∩⋯∩An\bigcap_{i=1}^{n} A_i = A_1 \cap A_2 \cap \cdots \cap A_n

Properties of Set Operations

Commutative Laws

A∪B=B∪AA \cup B = B \cup A A∩B=B∩AA \cap B = B \cap A

Associative Laws

(A∪B)∪C=A∪(B∪C)(A \cup B) \cup C = A \cup (B \cup C) (A∩B)∩C=A∩(B∩C)(A \cap B) \cap C = A \cap (B \cap C)

Distributive Laws

A∪(B∩C)=(A∪B)∩(A∪C)A \cup (B \cap C) = (A \cup B) \cap (A \cup C) A∩(B∪C)=(A∩B)∪(A∩C)A \cap (B \cup C) = (A \cap B) \cup (A \cap C)

Identity Laws

A∪∅=AA \cup \emptyset = A A∩U=AA \cap U = A

Complement Laws

A∪A‾=UA \cup \overline{A} = U A∩A‾=∅A \cap \overline{A} = \emptyset A‾‾=A\overline{\overline{A}} = A

Idempotent Laws

A∪A=AA \cup A = A A∩A=AA \cap A = A

Domination Laws

A∪U=UA \cup U = U A∩∅=∅A \cap \emptyset = \emptyset

Absorption Laws

A∪(A∩B)=AA \cup (A \cap B) = A A∩(A∪B)=AA \cap (A \cup B) = A

De Morgan's Laws

A∪B‾=A‾∩B‾\overline{A \cup B} = \overline{A} \cap \overline{B} A∩B‾=A‾∪B‾\overline{A \cap B} = \overline{A} \cup \overline{B}

Generalized De Morgan's Laws

⋃i=1nAi‾=⋂i=1nAi‾\overline{\bigcup_{i=1}^{n} A_i} = \bigcap_{i=1}^{n} \overline{A_i} ⋂i=1nAi‾=⋃i=1nAi‾\overline{\bigcap_{i=1}^{n} A_i} = \bigcup_{i=1}^{n} \overline{A_i}

Disjoint Sets

Two sets are disjoint if they have no common elements: A∩B=∅A \cap B = \emptyset

A collection of sets is pairwise disjoint if every pair is disjoint: Ai∩Aj=∅ for all i≠jA_i \cap A_j = \emptyset \text{ for all } i \neq j

Cardinality and Set Operations

Inclusion-Exclusion (Two Sets)

∣A∪B∣=∣A∣+∣B∣−∣A∩B∣|A \cup B| = |A| + |B| - |A \cap B|

Inclusion-Exclusion (Three Sets)

∣A∪B∪C∣=∣A∣+∣B∣+∣C∣−∣A∩B∣−∣A∩C∣−∣B∩C∣+∣A∩B∩C∣|A \cup B \cup C| = |A| + |B| + |C| - |A \cap B| - |A \cap C| - |B \cap C| + |A \cap B \cap C|

Complement

∣A‾∣=∣U∣−∣A∣|\overline{A}| = |U| - |A|

Difference

∣A−B∣=∣A∣−∣A∩B∣|A - B| = |A| - |A \cap B|

Proving Set Equality

Method 1: Element Argument

Show A⊆BA \subseteq B and B⊆AB \subseteq A:

  1. Take arbitrary x∈Ax \in A, show x∈Bx \in B
  2. Take arbitrary x∈Bx \in B, show x∈Ax \in A

Method 2: Set Identities

Transform one side to the other using known identities.

Example

Prove: A−(B∪C)=(A−B)∩(A−C)A - (B \cup C) = (A - B) \cap (A - C)

Proof: x∈A−(B∪C)x \in A - (B \cup C)   ⟺  x∈A∧x∉(B∪C)\iff x \in A \land x \notin (B \cup C)   ⟺  x∈A∧(x∉B∧x∉C)\iff x \in A \land (x \notin B \land x \notin C)   ⟺  (x∈A∧x∉B)∧(x∈A∧x∉C)\iff (x \in A \land x \notin B) \land (x \in A \land x \notin C)   ⟺  x∈(A−B)∧x∈(A−C)\iff x \in (A - B) \land x \in (A - C)   ⟺  x∈(A−B)∩(A−C)\iff x \in (A - B) \cap (A - C) □\square