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:xa}[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 aAa \in A, the class is [a]={xA:xa}[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: aba \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 aAa \in A under equivalence \sim, the class [a]={xA:xa}[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 aba \sim b iff aba - b is divisible by 5.

Theorem. Let \sim be an equivalence on AA. Then the classes {[a]:aA}\{[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 aAa \in A lies in [a][a], so aA[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 cac \sim a and cbc \sim b. By symmetry aca \sim c, and by transitivity aba \sim b. Take any x[a]x \in [a]: xabx[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: aa=0a - a = 0, divisible by 5. ✓
  • Symmetric: if 5(ab)5 \mid (a-b) then 5(ba)5 \mid (b-a). ✓
  • Transitive: 5(ab)5 \mid (a-b) and 5(bc)5(ac)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}.