Skip to content

Mathematics and Statistics · Ch 1 — Sets and Relations

Operations on Sets

3

Operations on Sets

Sets can be combined to form new sets. These operations are best pictured with a Venn diagram, in which the universal set UU is drawn as a rectangle and the sets inside it as circles; overlapping circles show elements shared between sets.

Union. The union A∪BA \cup B is the set of elements in AA, or in BB, or in both:

A∪B={x:x∈A or x∈B}A \cup B = \{x : x \in A \text{ or } x \in B\}

Intersection. The intersection A∩BA \cap B is the set of elements common to both:

A∩B={x:x∈A and x∈B}A \cap B = \{x : x \in A \text{ and } x \in B\}

If A∩B=∅A \cap B = \varnothing, the sets have no element in common and are called disjoint.

Figure 1 — Venn diagram of A = {1, 2, 3, 4} and B = {3, 4, 5, 6}: the overlap is the intersection A ∩ B = {3, 4}, and the whole shaded region is the union A ∪ B = {1, 2, 3, 4, 5, 6}
Figure 1 — Venn diagram of A = {1, 2, 3, 4} and B = {3, 4, 5, 6}: the overlap is the intersection A ∩ B = {3, 4}, and the whole shaded region is the union A ∪ B = {1, 2, 3, 4, 5, 6}

Difference. The difference A−BA - B (also written A∖BA \setminus B) is the set of elements in AA but not in BB:

A−B={x:x∈A and x∉B}A - B = \{x : x \in A \text{ and } x \notin B\}

In general A−B≠B−AA - B \ne B - A.

Complement. Relative to a universal set UU, the complement A′A' (or AcA^{c}) is the set of all elements of UU that are not in AA:

A′=U−A={x:x∈U and x∉A}A' = U - A = \{x : x \in U \text{ and } x \notin A\}

Key algebraic laws of sets (all provable from the definitions, and easy to check on a Venn diagram):

Note

Laws of set operations

  • Commutative: A∪B=B∪AA \cup B = B \cup A, and A∩B=B∩AA \cap B = B \cap A.
  • Associative: (A∪B)∪C=A∪(B∪C)(A \cup B) \cup C = A \cup (B \cup C); similarly for ∩\cap.
  • Distributive: A∩(B∪C)=(A∩B)∪(A∩C)A \cap (B \cup C) = (A \cap B) \cup (A \cap C); and A∪(B∩C)=(A∪B)∩(A∪C)A \cup (B \cap C) = (A \cup B) \cap (A \cup C).
  • De Morgan's laws: (A∪B)′=A′∩B′(A \cup B)' = A' \cap B', and (A∩B)′=A′∪B′(A \cap B)' = A' \cup B'. …
Definition 1Union $A \cup B$

The set of all elements belonging to AA or BB ( …

Definition 2Intersection $A \cap B$

The set of elements common to both AA and BB. If empty, the sets a …

Definition 3Difference $A - B$

The set of elements in AA but not in BB; in general $A - B …

Definition 4Complement $A'$

The set U−AU - A of all elements of the universal set UU that are …

Definition 5Inclusion–exclusion

n(A∪B)=n(A)+n(B)−n(A∩B)n(A \cup B) = n(A) + n(B) - n(A \cap B), correcting for double-counting …