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: AB={xxAxB}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: AB={xxAxB}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 ABA - B contains elements in AA but not in BB: AB=AB={xxAxB}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=UA={xUxA}\overline{A} = A^c = U - A = \{x \in U \mid x \notin A\}

Symmetric Difference

The symmetric difference contains elements in exactly one set: AB=AB=(AB)(BA)A \oplus B = A \triangle B = (A - B) \cup (B - A) =(AB)(AB)= (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
ABA \cap BIntersection (overlap)
ABA - BOnly in A
BAB - AOnly in B
ABA \cup BAll shaded areas
AB\overline{A \cup B}Outside both circles

Generalized Operations

Union of Multiple Sets

i=1nAi=A1A2An\bigcup_{i=1}^{n} A_i = A_1 \cup A_2 \cup \cdots \cup A_n

Intersection of Multiple Sets

i=1nAi=A1A2An\bigcap_{i=1}^{n} A_i = A_1 \cap A_2 \cap \cdots \cap A_n

Properties of Set Operations

Commutative Laws

AB=BAA \cup B = B \cup A AB=BAA \cap B = B \cap A

Associative Laws

(AB)C=A(BC)(A \cup B) \cup C = A \cup (B \cup C) (AB)C=A(BC)(A \cap B) \cap C = A \cap (B \cap C)

Distributive Laws

A(BC)=(AB)(AC)A \cup (B \cap C) = (A \cup B) \cap (A \cup C) A(BC)=(AB)(AC)A \cap (B \cup C) = (A \cap B) \cup (A \cap C)

Identity Laws

A=AA \cup \emptyset = A AU=AA \cap U = A

Complement Laws

AA=UA \cup \overline{A} = U AA=A \cap \overline{A} = \emptyset A=A\overline{\overline{A}} = A

Idempotent Laws

AA=AA \cup A = A AA=AA \cap A = A

Domination Laws

AU=UA \cup U = U A=A \cap \emptyset = \emptyset

Absorption Laws

A(AB)=AA \cup (A \cap B) = A A(AB)=AA \cap (A \cup B) = A

De Morgan's Laws

AB=AB\overline{A \cup B} = \overline{A} \cap \overline{B} AB=AB\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: AB=A \cap B = \emptyset

A collection of sets is pairwise disjoint if every pair is disjoint: AiAj= for all ijA_i \cap A_j = \emptyset \text{ for all } i \neq j

Cardinality and Set Operations

Inclusion-Exclusion (Two Sets)

AB=A+BAB|A \cup B| = |A| + |B| - |A \cap B|

Inclusion-Exclusion (Three Sets)

ABC=A+B+CABACBC+ABC|A \cup B \cup C| = |A| + |B| + |C| - |A \cap B| - |A \cap C| - |B \cap C| + |A \cap B \cap C|

Complement

A=UA|\overline{A}| = |U| - |A|

Difference

AB=AAB|A - B| = |A| - |A \cap B|

Proving Set Equality

Method 1: Element Argument

Show ABA \subseteq B and BAB \subseteq A:

  1. Take arbitrary xAx \in A, show xBx \in B
  2. Take arbitrary xBx \in B, show xAx \in A

Method 2: Set Identities

Transform one side to the other using known identities.

Example

Prove: A(BC)=(AB)(AC)A - (B \cup C) = (A - B) \cap (A - C)

Proof: xA(BC)x \in A - (B \cup C)     xAx(BC)\iff x \in A \land x \notin (B \cup C)     xA(xBxC)\iff x \in A \land (x \notin B \land x \notin C)     (xAxB)(xAxC)\iff (x \in A \land x \notin B) \land (x \in A \land x \notin C)     x(AB)x(AC)\iff x \in (A - B) \land x \in (A - C)     x(AB)(AC)\iff x \in (A - B) \cap (A - C) \square