Lesson 1 +25 XP

Sets, Subsets, Power Set & Set Operations

Sets, Subsets, Power Set & Set Operations

Discrete mathematics studies countable, separate objects-5 books, 12 apples, 3 servers-rather than continuous quantities like 165.5 cm or 36.7 °C. The set is the language every later topic (relations, functions, graphs, groups) is written in.

  1. What is a Set?

A set is a well-defined collection of distinct objects called elements.

  • "The set of vowels in English" ✅ - membership is clear.
  • "The set of good books" ❌ - "good" is not well-defined.
  • Repetition does not matter: {1, 2, 2, 3, 3, 3} = {1, 2, 3}. Order does not matter: {a, b} = {b, a}.
NotationMeaning
a ∈ Aa is an element of A
a ∉ Aa is not an element of A
n(A) or ∣A∣cardinality = number of distinct elements

Two ways to write a set

  • Roster / tabular form: list the elements-A = {3, 6, 9, 12, 15}
  • Set-builder form: state the rule-A = {x ∣ x = 3p, 1 ≤ p ≤ 5, p ∈ N}
💡 Tip

Exam favourite: B = {x ∣ x² − 3x + 2 = 0}. Solve (x − 1)(x − 2) = 0 → B = {1, 2}. Cardinality questions: n({a, a, b, d, d}) = 3 and n({a, {c, d}, k}) = 3-the inner set {c, d} counts as one element.

Standard sets

N (natural numbers), Z (integers), Q (rationals), R (reals), C (complex numbers).

2. Types of Sets

TypeDefinitionExample
Null / empty set φno elements{x ∈ N ∣ x < 1}
Singletonexactly one element{0}, {φ}
Finite / Infinitecountable end or not{1,…,10} / N
Equal setsexactly the same elements{1,2} = {2,1}
Equivalent setssame cardinality{a,b,c} ~ {1,2,3}
Universal set Uall elements under discussionU = {1,…,10}

> φ ≠ {φ}. The empty set φ has 0 elements, but {φ} is a set containing one element (the empty set), so n({φ}) = 1.

3. Subsets and the Power Set

  • A ⊆ B (subset) if every element of A is in B.
  • A ⊂ B (proper subset) if A ⊆ B and A ≠ B.
  • φ ⊆ A and A ⊆ A for every set A-these are the trivial subsets; all others are non-trivial.

The power set P(A) is the set of all subsets of A.

n(P(A)) = 2n and number of proper subsets = 2n - 1

Example. A = {a, b, c}: P(A) = {φ, {a}, {b}, {c}, {a,b}, {a,c}, {b,c}, {a,b,c}} - 2³ = 8 subsets.

Power set of {a, b, c} ordered by ⊆ and the set operations as Venn diagramsPower set of {a, b, c} ordered by ⊆ and the set operations as Venn diagrams

Solved (tricky). Show n(P(P(P(φ)))) = 4.

  • P(φ) = {φ} → 1 element
  • P(P(φ)) = {φ, {φ}} → 2 elements
  • P(P(P(φ))) = {φ, {φ}, {{φ}}, {φ, {φ}}} → 4 elements ✅

4. Ordered Pairs and Cartesian Product

An ordered pair (a, b) has (a, b) = (c, d) iff a = c and b = d, so (1, 2) ≠ (2, 1).

A × B = {(a, b) : a ∈ A, b ∈ B} and n(A × B) = n(A) · n(B)

Example. A = {1}, B = {a, b}, C = {2, 3}: A × B × C = {(1,a,2), (1,a,3), (1,b,2), (1,b,3)} - 1·2·2 = 4 triples.

> A × B ≠ B × A in general. They are equal only when A = B or one of them is empty.

5. Set Operations

OperationDefinitionVenn region
Union A ∪ Bx ∈ A or x ∈ Beverything in either circle
Intersection A ∩ Bx ∈ A and x ∈ Boverlap only
Difference A − Bx ∈ A and x ∉ B (= A ∩ B′)A without the overlap
Complement A′x ∈ U and x ∉ Aoutside A
Symmetric difference A ⊕ B(A − B) ∪ (B − A)either but not both

Worked example. A = {1, 2, 3, 4}, B = {2, 3, 5, 6}:

  • A ∪ B = {1, 2, 3, 4, 5, 6}
  • A ∩ B = {2, 3}
  • A − B = {1, 4}, B − A = {5, 6}
  • A ⊕ B = {1, 4, 5, 6}

PYQ-style. A = {x ∣ 3x² − 7x − 6 = 0} = {3, −2/3}, B = {x ∣ 6x² − 5x − 6 = 0} = {3/2, −2/3} → A ∩ B = {−2/3}.

Cardinality of a union

n(A ∪ B) = n(A) + n(B) - n(A ∩ B) = n(A - B) + n(B - A) + n(A ∩ B)

6. Set Identities (Laws)

LawUnion formIntersection form
IdentityA ∪ φ = AA ∩ U = A
DominationA ∪ U = UA ∩ φ = φ
IdempotentA ∪ A = AA ∩ A = A
ComplementA ∪ A′ = UA ∩ A′ = φ
CommutativeA ∪ B = B ∪ AA ∩ B = B ∩ A
Associative(A ∪ B) ∪ C = A ∪ (B ∪ C)(A ∩ B) ∩ C = A ∩ (B ∩ C)
DistributiveA ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C)A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C)
De Morgan(A ∪ B)′ = A′ ∩ B′(A ∩ B)′ = A′ ∪ B′
AbsorptionA ∪ (A ∩ B) = AA ∩ (A ∪ B) = A

Proof of De Morgan's law by element-chasing

To show (A ∪ B)′ = A′ ∩ B′, show each side is a subset of the other:

x ∈ (A ∪ B)′ ⇔ x ∉ A ∪ B ⇔ x ∉ A and x ∉ B ⇔ x ∈ A′ and x ∈ B′ ⇔ x ∈ A′ ∩ B′. ∎

Solved. Simplify (A − B) ∪ (A ∩ B): (A ∩ B′) ∪ (A ∩ B) = A ∩ (B′ ∪ B) = A ∩ U = A.

Solved. Prove A ∩ (B − C) = (A ∩ B) − (A ∩ C). RHS = (A ∩ B) ∩ (A ∩ C)′ = (A ∩ B) ∩ (A′ ∪ C′) = (A ∩ B ∩ A′) ∪ (A ∩ B ∩ C′) = φ ∪ (A ∩ (B ∩ C′)) = A ∩ (B − C) = LHS. ∎

7. Partitions

A partition of a set S is a collection of non-empty subsets A₁, A₂, …, Aₖ such that:

  1. each Aᵢ ≠ φ,
  2. Aᵢ ∩ Aⱼ = φ for i ≠ j (pairwise disjoint),
  3. A₁ ∪ A₂ ∪ … ∪ Aₖ = S.

{1, 2, 3} has exactly 5 partitions (the Bell number B₃ = 5): {{1},{2},{3}}, {{1,2},{3}}, {{1,3},{2}}, {{2,3},{1}}, {{1,2,3}}. Partitions reappear in Lesson 11 as equivalence classes.

🎯 END-TERM EXAM PREP

📝 IPU End-Term Exam Corner (5-10 Marks)

  • Q1. Define power set. Find P(A) for A = {φ, {φ}} and verify n(P(A)) = 2ⁿ. (5 Marks)
  • Write: P(A) = {φ, {φ}, {{φ}}, {φ, {φ}}} - 2² = 4 subsets.
  • Q2. State and prove De Morgan's laws for sets. (5 Marks)
  • Write: both laws, element-chasing proof (⊆ both ways), and a shaded Venn diagram for each.
  • Q3. U = {1,…,10}, A = {1,3,4,5}, B = {1,2,4,8}, C = {1,2,3,5,7}. Find (A ∪ B) ∩ C, A ⊕ (B ∩ C) and C′. (5 Marks)
  • Write: (A ∪ B) ∩ C = {1,2,3,5}; B ∩ C = {1,2} so A ⊕ {1,2} = {2,3,4,5}; C′ = {4,6,8,9,10}.
  • Q4. Prove (A − B) − (B − C) = A − B using set laws. (5 Marks)
  • Write: (A ∩ B′) ∩ (B ∩ C′)′ = (A ∩ B′) ∩ (B′ ∪ C) = A ∩ B′ by absorption.