PGD01C01
Module 1 · Set Theory, Relations and Combinatorics

Relations, Equivalence Relations and Partitions

Core Titles
Key headlines and terms for quick recall
  • Relation — subset of A×BA \times B
  • Properties: reflexive, symmetric, transitive, antisymmetric
  • Equivalence relation = reflex + sym + trans
  • Equivalence class [a]={x:x∼a}[a] = \{x : x \sim a\}
  • Partition of a set
  • Correspondence: equivalence relations ↔ partitions
Basic Idea
What it is, why it matters, how it works

What is a relation?

A binary relation RR on a set AA is a subset of A×AA \times A. We write aRba R b when (a,b)∈R(a,b) \in R.

Three key properties

  • Reflexive: aRaa R a for every aa
  • Symmetric: aRb  ⟹  bRaa R b \implies b R a
  • Transitive: aRb and bRc  ⟹  aRca R b \text{ and } b R c \implies a R c
  • Antisymmetric (for partial orders): aRb and bRa  ⟹  a=ba R b \text{ and } b R a \implies a = b

Equivalence relation

A relation that is reflexive + symmetric + transitive. It groups elements that are "the same in some sense".

Examples: equality, congruence mod nn, having the same birthday.

Equivalence classes

For a∈Aa \in A, the class is [a]={x∈A:x∼a}[a] = \{x \in A : x \sim a\}.

Key theorem. Equivalence classes either coincide or are disjoint, and together they cover AA — i.e., they form a partition.

Partition ↔ Equivalence relation

Every partition {A1,A2,… }\{A_1, A_2, \dots\} defines an equivalence: a∼ba \sim b iff they lie in the same block. And every equivalence relation produces a partition via its classes. This is a bijective correspondence.

Why this matters in Data Science

Clustering = partitioning data. Equality of features, hash bucketing, deduplication, "group by" operations — all are equivalence relations under the hood.

Mind Map
Visual structure of the concept
RELATIONS
├── Definition: R ⊆ A × A
├── Properties
│   ├── Reflexive  aRa
│   ├── Symmetric  aRb ⇒ bRa
│   ├── Transitive aRb ∧ bRc ⇒ aRc
│   └── Antisymmetric (for posets)
├── EQUIVALENCE RELATION (R + S + T)
│   ├── Equivalence class [a]
│   ├── Classes are disjoint or equal
│   └── Quotient set A/~
└── PARTITION
    ├── Blocks cover A
    ├── Pairwise disjoint
    └── ↔ equivalence relation
Exam Q&A
Part A (2 marks) and Part B (20 marks) style questions

Part A (2 marks each)

Q1. Define an equivalence relation. A binary relation on AA that is reflexive, symmetric and transitive.

Q2. Give an example of a relation that is symmetric but not transitive. On {1,2,3}\{1,2,3\}: R={(1,2),(2,1),(2,3),(3,2)}R = \{(1,2),(2,1),(2,3),(3,2)\}. Symmetric, but 1R21R2 and 2R32R3 don't give 1R31R3.

Q3. What is an equivalence class? For a∈Aa \in A under equivalence ∼\sim, the class [a]={x∈A:x∼a}[a] = \{x \in A : x \sim a\}.

Q4. Define a partition of a set AA. A collection of non-empty, pairwise-disjoint subsets of AA whose union is AA.


Part B (20 marks)

Q. Show that the equivalence classes of an equivalence relation form a partition. Verify with ∼\sim on Z\mathbb{Z} defined by a∼ba \sim b iff a−ba - b is divisible by 5.

Theorem. Let ∼\sim be an equivalence on AA. Then the classes {[a]:a∈A}\{[a] : a \in A\} form a partition.

Proof.

  1. Non-empty: By reflexivity, a∈[a]a \in [a], so every class is non-empty.
  2. Cover: Every a∈Aa \in A lies in [a][a], so ⋃a∈A[a]=A\bigcup_{a \in A} [a] = A.
  3. Disjoint or equal: Suppose [a]∩[b]≠∅[a] \cap [b] \neq \emptyset, and pick cc in both. Then c∼ac \sim a and c∼bc \sim b. By symmetry a∼ca \sim c, and by transitivity a∼ba \sim b. Take any x∈[a]x \in [a]: x∼a∼b⇒x∈[b]x \sim a \sim b \Rightarrow x \in [b]. Symmetrically [b]⊆[a][b] \subseteq [a]. Hence [a]=[b][a] = [b]. ∎

Verification on Z\mathbb{Z}, congruence mod 5.

  • Reflexive: a−a=0a - a = 0, divisible by 5. ✓
  • Symmetric: if 5∣(a−b)5 \mid (a-b) then 5∣(b−a)5 \mid (b-a). ✓
  • Transitive: 5∣(a−b)5 \mid (a-b) and 5∣(b−c)⇒5∣(a−c)5 \mid (b-c) \Rightarrow 5 \mid (a-c). ✓

The five classes are [0],[1],[2],[3],[4][0], [1], [2], [3], [4] — the residue classes mod 5 — and they partition Z\mathbb{Z}.