MH1812 · DISCRETE MATHEMATICS · NTU
∈
∩
∪
Set Theory — Study Notes
Topics 7.1 & 7.2 · Set Identities, Operations, Proofs & Partition
01
Introduction to Sets
DEFINITION
A set is an unordered collection of distinct abstract objects called elements or members.
TWO WAYS TO SPECIFY A SET
Explicit (Roster): list members directly
A = {2, 3}
Implicit (Set-builder): use a predicate
A = {x | x is prime}
KEY POINT – ORDER & REPETITION
Sets are determined only by their distinct elements — order and repetition don't matter:
{1,2,3} = {3,1,2} = {1,1,2,3,3}
⊆
∅
×
ℤ
ℝ
CORE CONCEPTS
MEMBERSHIP
x ∈ S
means x is in S.
x ∉ S
means x is not in S.
EMPTY SET
The set with no elements:
∅
or
{ }
⚠ Common Trap
∅ ≠ {∅}
— the left is empty; the right has one element (the empty set itself).
SUBSET (A ⊆ B)
Every element of A is also in B.
A ⊆ B ≜ ∀x(x∈A → x∈B)
Negation:
A ⊄ B ≡ ∃x(x∈A ∧ x∉B)
SET EQUALITY
A = B ≜ ∀x(x∈A ↔ x∈B)
Equivalently: A⊆B and B⊆A.
CARDINALITY
DEFINITION
|S|
is the number of distinct elements in S.
If |S| is finite → finite set; otherwise → infinite set.
EXAMPLES
S = {1,3} → |S| = 2
∅ → |∅| = 0
{1,1,1,2} → considered as {1,2} → |S| = 2
POWER SET
DEFINITION
The set of all subsets of S:
P(S) = {A | A ⊆ S}
EXAMPLE: S = {1,2,3}
P(S) = { ∅, {1}, {2}, {3}, {1,2}, {1,3}, {2,3}, {1,2,3} }
Key Formula
If |S| = n, then |P(S)| = 2ⁿ
Proof: use Binomial Theorem with x=y=1: Σ C(n,i) = (1+1)ⁿ = 2ⁿ
02
Set Operations & Venn Diagrams
Ā
A
B
A
B
A
B
A
A
B
U
A ∪ B (Union)
A ∩ B (Intersection) A − B (Difference)
Ā (Complement)
Disjoint (A∩B = ∅)
FORMAL DEFINITIONS
UNION
A ∪ B ≜ {x | x∈A ∨ x∈B}
Elements in A, B, or both.
DIFFERENCE (A − B)
A − B ≜ {x | x∈A ∧ x∉B}
Alternate form:
A − B = A ∩ B̄
INTERSECTION
A ∩ B ≜ {x | x∈A ∧ x∈B}
Elements in both A and B.
COMPLEMENT (Ā)
Ā = U − A ≜ {x | x∉A}
Everything in universe U not in A.
Cardinality of Union (Inclusion-Exclusion)
|A ∪ B| = |A| + |B| − |A ∩ B|
EXAMPLE: DISJOINT SETS
Sets A and B are disjoint iff
03
A ∩ B = ∅
, i.e.,
|A ∩ B| = 0
Cartesian Product
DEFINITION
The Cartesian product A × B is the set of all ordered pairs (a, b) where a ∈ A and b ∈ B:
A × B ≜ {(a,b) | a∈A ∧ b∈B}
EXAMPLE
Let A = {1, 2}, B = {x, y, z}
A × B = {(1,x), (1,y), (1,z), (2,x), (2,y), (2,z)}
B × A = {(x,1), (x,2), (y,1), (y,2), (z,1), (z,2)}
Note: A × B ≠ B × A in general (ordered pairs!)
GENERALISATION & CARDINALITY
A₁ × A₂ × … × Aₙ ≜ {(a₁,a₂,…,aₙ) | aᵢ∈Aᵢ}
Cardinality Rule
|A₁ × A₂ × … × Aₙ| = |A₁| · |A₂| · … · |Aₙ|
e.g., |{1,2} × {x,y,z}| = 2 · 3 = 6 ✓
⚠ Common Exam Trap
(A × B) ∪ (C × D) ⊆ (A ∪ C) × (B ∪ D) — but equality does NOT necessarily hold!
Counterexample: A={0}, B={0}, C={1}, D={1} → LHS has 2 elements; RHS has 4.
04
Partition
DEFINITION
A collection of nonempty sets {A₁, A₂, …, Aₙ} is a partition of set A iff:
Each Aᵢ is non-empty
Their union covers all of A:
They are mutually disjoint:
A = A₁ ∪ A₂ ∪ … ∪ Aₙ
Aᵢ ∩ Aⱼ = ∅ for all i ≠ j
CLASSIC EXAMPLE — PARTITION OF ℤ INTO RESIDUES MOD 3
A₀ = {3k | k∈ℤ} = {…, −3, 0, 3, 6, …}
A₁ = {3k+1 | k∈ℤ} = {…, −2, 1, 4, 7, …}
A₂ = {3k+2 | k∈ℤ} = {…, −1, 2, 5, 8, …}
✔ Non-empty, union = ℤ, pairwise disjoint → forms a partition of ℤ
How to prove disjointness (by contradiction)
Assume Aᵢ ∩ Aⱼ ≠ ∅ → ∃x: x = 3k₁+i and x = 3k₂+j → 3(k₁−k₂) = j−i. Since 0 ≤ i,j ≤ 2 and i≠j, |j−i| ∈
{1,2}. But the LHS is a multiple of 3 — contradiction. ∎
05
Set Identities
All identities below hold for any sets A, B, C over universe U.
IDENTITY
NAME
A ∪ ∅ = A
A ∩ U = A
Identity Laws
A ∪ U = U
A ∩ ∅ = ∅
Domination Laws
A ∪ A = A
A ∩ A = A
Idempotent Laws
Double Complement Law
Ā̄ = A
A ∪ B = B ∪ A
A ∩ B = B ∩ A
Commutative Laws
A ∪ (B ∪ C) = (A ∪ B) ∪ C
Associative Law (∪)
A ∩ (B ∩ C) = (A ∩ B) ∩ C
Associative Law (∩)
A ∩ (B ∪ C) = (A∩B) ∪ (A∩C)
Distributive Law (∩ over ∪)
A ∪ (B ∩ C) = (A∪B) ∩ (A∪C)
Distributive Law (∪ over ∩)
A ∪ B̄ = Ā ∩ B̄
De Morgan's Law (∪)
A ∩ B̄ = Ā ∪ B̄
De Morgan's Law (∩)
A ∪ (A ∩ B) = A
Absorption Law (∪)
A ∩ (A ∪ B) = A
Absorption Law (∩)
A − B = A ∩ B̄
Alternate for Difference
Memory Tip — De Morgan's Laws
Just like in logic: negate and flip the operator.
¬(A ∨ B) ≡ ¬A ∧ ¬B
↔
A ∪ B̄ = Ā ∩ B̄
¬(A ∧ B) ≡ ¬A ∨ ¬B
↔
A ∩ B̄ = Ā ∪ B̄
EXTRA USEFUL IDENTITY — SET DIFFERENCE COMPLEMENT
Combining difference + De Morgan:
A ∩ B̄ = Ā ∪ B
(complement of A−B)
INTUITION
A−B is the "A only" region. Its complement is everything outside that region: Ā (not in A) OR B (in B).
06
Proving Set Identities — Three Methods
METHOD 1 — MUTUAL SUBSET
Show A = B by proving A ⊆ B AND B ⊆ A.
Take arbitrary x ∈ LHS
Show x ∈ RHS
Repeat in reverse direction
METHOD 2 — SET IDENTITY THEOREMS
Chain of algebraic steps using known identities (like algebraic manipulation).
Most elegant when LHS can be simplified step-by-step.
METHOD 3 — MEMBERSHIP TABLE
Like a truth table for sets. Use 1 = member, 0 = not member. Two sets are equal iff their columns are
identical.
When to use it
Best when ≤ 4 distinct sets (table has 2ⁿ rows — manageable for n ≤ 3 or 4).
07
Worked Examples
EXAMPLE A — USING SET IDENTITY THEOREMS
Prove:
(A − B) − (B − C) = A − B
PROOF (ALGEBRAIC)
(A∩B̄) ∩ (B∩C̄)
alternate representation for set difference (×2)
= (A∩B̄) ∩ (B̄∪C)
De Morgan's Law on B∩C̄
= [(A∩B̄)∩B̄] ∪ [(A∩B̄)∩C]
Distributive Law
= [A∩(B̄∩B̄)] ∪ [A∩(B̄∩C)]
Associative Law
= (A∩B̄) ∪ [A∩(B̄∩C)]
Idempotent Law (B̄∩B̄ = B̄)
= A ∩ [B̄ ∪ (B̄∩C)]
Distributive Law
= A ∩ B̄
Absorption Law (B̄ ∪ (B̄∩C) = B̄)
= A − B
alternate representation ∎
EXAMPLE B — MUTUAL SUBSET METHOD
Prove:
(B − A) ∪ (C − A) = (B ∪ C) − A
PART 1: LHS ⊆ RHS
Take x ∈ LHS. Then x ∈ (B−A) or x ∈ (C−A).
Case x ∈ B−A: x ∈ B and x ∉ A → x ∈ B∪C and x ∉ A → x ∈ (B∪C)−A ✓
Case x ∈ C−A: x ∈ C and x ∉ A → x ∈ B∪C and x ∉ A → x ∈ (B∪C)−A ✓
PART 2: RHS ⊆ LHS
Take x ∈ RHS. Then x ∈ (B∪C) and x ∉ A.
Case x ∈ B: x ∈ B and x ∉ A → x ∈ B−A → x ∈ LHS ✓
Case x ∈ C: x ∈ C and x ∉ A → x ∈ C−A → x ∈ LHS ✓
Both directions shown → LHS = RHS ∎
EXAMPLE C — MEMBERSHIP TABLE
Prove:
A
(A ∪ B) − B = A − B
A ∪ B
B
(A∪B) − B
A − B
0
0
0
0
0
0
1
1
0
0
1
0
1
1
1
1
1
1
0
0
Columns for (A∪B)−B and A−B are identical → they are equal. ∎
EXAMPLE D — INCLUSION-EXCLUSION WORD PROBLEM
(From Tutorial Q17)
200 students; durians |D|=88, mangoes |M|=73, lychees |L|=46; |D∩M|=34, |D∩L|=16, |M∩L|=12,
|D∩M∩L|=5.
Find: students who ate none of the 3 fruits, and students who ate only mangoes.
SOLUTION
Step 1 — |D ∪ M ∪ L| using inclusion-exclusion for 3 sets:
|A∪B∪C| = |A|+|B|+|C| − |A∩B| − |A∩C| − |B∩C| + |A∩B∩C|
= 88+73+46 − 34 − 16 − 12 + 5 = 150
None of 3 fruits: 200 − 150 = 50
Step 2 — Only mangoes = M ∩ D̄ ∩ L̄:
|M∩D̄∩L̄| = |M| − |M∩D| − |M∩L| + |M∩D∩L|
= 73 − 34 − 12 + 5 = 32
EXAMPLE E — SYMMETRIC DIFFERENCE (BONUS)
A △ B = (A−B) ∪ (B−A) = elements in exactly one of A or B.
PROVE (A △ B) △ B = A USING MEMBERSHIP TABLE
A
A △ B
B
(A△B) △ B
0
0
0
0
0
1
1
0
1
0
1
1
1
1
0
1
Column for (A△B)△B matches column A → equal. ∎
QUICK-REFERENCE PROOF CHECKLIST
Use this before you start any set proof:
Identify which method fits (mutual subset for complex arguments; algebraic for elegant chains;
membership table for ≤4 sets).
If using mutual subset: always handle both directions separately and label them clearly.
Convert set difference early: A − B = A ∩ B̄ — this unlocks all the identity laws.
Apply De Morgan to complement expressions: flip operator, complement each part.
For membership tables: enumerate all 2ⁿ rows; compare final columns.
For partition proofs: check (1) non-empty, (2) union = whole set, (3) pairwise disjoint.
MH1812 · Set Theory · Topics 7.1 & 7.2 · NTU · Compiled from lecture notes & tutorial solutions