2.
2 Set Operations
Definition 1. The union of the sets A and B, denoted by A ∪ B, is the set that contains those elements
that are either in A or in B, or in both.
A ∪ B = {x | x ∈ A ∨ x ∈ B}.
Definition 2. The intersection of the sets A and B, denoted by A ∩ B, is the set containing those elements
in both A and B.
A ∩ B = {x | x ∈ A ∧ x ∈ B}.
Definition 3. Two sets are called disjoint if their intersection is the empty set.
Fact: |A ∪ B| = |A| + |B| − |A ∩ B|.
Definition 4. The difference of sets A and B, denoted by A − B, is the set containing those elements that
are in A but not in B. The difference of A and B is also called the complement of B with respect to A.
A − B = {x | x ∈ A ∧ x ∈
/ B}.
Definition 5. Let U be the universal set. The complement of the set A, denoted by A, is the complement
of A with respect to U . Therefore, the complement of the set A is U − A.
A = {x | x ∈
/ A}.
Fact: A − B = A ∩ B.
Following are a few set identities.
A∩∅=∅
A∪∅=A
A∩A=A
A∪A=A
A=A
A∩B =B∩A
A∪B =B∪A
(A ∩ B) ∩ C = A ∩ (B ∩ C)
(A ∪ B) ∪ C = A ∪ (B ∪ C)
A∩A=∅
A ∩ (A ∪ B) = A
A ∪ (A ∩ B) = A
The distributive laws apply:
A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C)
and
A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C).
De Morgan’s Laws:
(A ∩ B) = A ∪ B
and
(A ∪ B) = A ∩ B.
Example 1. Prove (A ∩ B) = A ∪ B.
Proof.
(A ∩ B) = {x | x ∈
/ (A ∩ B)}
= {x | ¬(x ∈ (A ∩ B))}
= {x | ¬(x ∈ A ∧ x ∈ B)}
= {x | ¬(x ∈ A) ∨ ¬(x ∈ B)}
= {x | x ∈
/ A∨x∈
/ B}
= {x | x ∈ A ∨ x ∈ B}
= {x | x ∈ (A ∪ B)}
=A∪B
Example 2. Prove that A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C) for all sets A, B, and C.
Proof. We will prove this identity by showing that each side is a subset of the other side.
(A ∩ (B ∪ C) ⊆ (A ∩ B) ∪ (A ∩ C)): Suppose that x is an arbitrary element of A ∩ (B ∪ C). Then
(x ∈ A) ∧ (x ∈ B ∪ C)
∴ (x ∈ A) ∧ (x ∈ B ∨ x ∈ C)
∴ (x ∈ A ∧ x ∈ B) ∨ (x ∈ A ∧ x ∈ C)
∴ (x ∈ A ∩ B) ∨ (x ∈ A ∩ C)
∴ x ∈ (A ∩ B) ∪ (A ∩ C).
We conclude that A ∩ (B ∪ C) ⊆ (A ∩ B) ∪ (A ∩ C).
((A ∩ B) ∪ (A ∩ C) ⊆ A ∩ (B ∪ C)): Now suppose that x ∈ (A ∩ B) ∪ (A ∩ C). Then
(x ∈ A ∩ B) ∨ (x ∈ A ∩ C)
∴ (x ∈ A ∧ x ∈ B) ∨ (x ∈ A ∧ x ∈ C)
∴ (x ∈ A) ∧ (x ∈ B ∨ x ∈ C)
∴ (x ∈ A) ∧ (x ∈ B ∪ C)
∴ x ∈ A ∩ (B ∪ C)
Thus (A ∩ B) ∪ (A ∩ C) ⊆ A ∩ (B ∪ C).
Since (A ∩ B) ∪ (A ∩ C) ⊆ A ∩ (B ∪ C) and A ∩ (B ∪ C) ⊆ (A ∩ B) ∪ (A ∩ C), the two sets are equal.
Definition 6. The union of a collection of sets is the set that contains those elements that are members of
at least one set in the collection.
Notation:
n
[
A1 ∪ A2 ∪ · · · ∪ An = Ai = {x | ∃i ∈ I(x ∈ Ai )}.
i=1
Definition 7. The intersection of a collection of sets is the set that contains those elements that are members
of all the sets in the collection.
Notation:
n
\
A1 ∩ A2 ∩ · · · ∩ An = Ai = {x | ∀i ∈ I(x ∈ Ai )}.
i=1