Skip to content
๐ŸŒ Relations and Equivalence Relations

๐ŸŒ Relations and Equivalence Relations

A relation $R$ on a set $A$ is any subset of the Cartesian product $A \times A$. That is, itโ€™s a collection of ordered pairs $(x, y)$ where both $x$ and $y$ are elements of $A$.

Notation

  • We write: $x\,R\,y$ to mean โ€œthe pair $(x, y)$ is in the relation.โ€
  • This reads as: โ€œx is related to y under R.โ€

Example

Let $A = \{1, 2, 3\}$ Define $R = \{(1,2), (2,1), (2,2), (3,3)\}$ Then:

  • $1\,R\,2$ โ†’ true
  • $2\,R\,1$ โ†’ true
  • $1\,R\,3$ โ†’ false

๐Ÿ’ก Key Insight

  • A relation is not inherently symmetric, reflexive, or transitive.
  • Itโ€™s just a rule โ€” like โ€œfriends,โ€ โ€œtaller than,โ€ or โ€œsame birthday.โ€
  • Many relations exist โ€” but only some are equivalence relations.

2. ๐Ÿ”— What Makes a Relation an Equivalence Relation?

An equivalence relation is a special kind of relation that captures the idea of โ€œsamenessโ€ under some criterion.

It must satisfy three essential properties:

PropertyDefinitionEmoji
Reflexive$\forall a \in A,\ a\,R\,a$โœ…
Symmetric$\forall a,b \in A,\ a\,R\,b \Rightarrow b\,R\,a$โ†”๏ธ
Transitive$\forall a,b,c \in A,\ (a\,R\,b \land b\,R\,c) \Rightarrow a\,R\,c$โžก๏ธ

โœ… All three must hold for the relation to be an equivalence relation. โŒ If even one fails โ†’ it is not an equivalence relation.


3.1 โœ… Reflexivity โ€” โ€œHolds for Itselfโ€

Does every element relate to itself?

Why it matters

If youโ€™re defining โ€œsameness,โ€ then every object must be the same as itself. Otherwise, the concept breaks.

Example

Let $A = \mathbb{Z}$, and define $x\,R\,y$ iff $x - y$ is even. Check: $x\,R\,x$? โ†’ $x - x = 0$, and $0$ is even โ†’ โœ… Reflexive!

Counterexample

Let $x\,S\,y$ iff $x < y$ โ†’ Is $x < x$? No โ†’ โŒ Not reflexive

Test

For all $a \in A$, compute $a\,R\,a$. If even one fails โ†’ reject.


3.2 โ†”๏ธ Symmetry โ€” โ€œHolds in Both Directionsโ€

If $a$ relates to $b$, does $b$ relate to $a$?

Why it matters

Sameness doesnโ€™t care whoโ€™s first. If Alice is equivalent to Bob, then Bob is equivalent to Alice.

Example

$x\,R\,y$ iff $x - y$ is even โ†’ If $x - y = 4$ โ†’ even โ†’ Then $y - x = -4$ โ†’ also even โ†’ โœ… Symmetric!

Counterexample

$x\,S\,y$ iff $x > y$ โ†’ $5 > 3$ โ†’ true โ†’ But $3 > 5$? False โ†’ โŒ Not symmetric

Test

Take any $(a,b)$ where $a\,R\,b$. Verify $b\,R\,a$. If any counterexample exists โ†’ reject.


3.3 โžก๏ธ Transitivity โ€” โ€œPropagates Through Chainsโ€

If $a \sim b$ and $b \sim c$, then must $a \sim c$?

Why it matters

This ensures global consistency. Sameness must spread โ€” like a virus of equality!

Example

Let $x\,R\,y$ iff $x - y$ is even Suppose:

  • $6\,R\,4$ โ†’ $6 - 4 = 2$ โ†’ even
  • $4\,R\,2$ โ†’ $4 - 2 = 2$ โ†’ even โ†’ Then $6\,R\,2$? $6 - 2 = 4$ โ†’ even โ†’ โœ… Yes!

Counterexample

Let $x\,S\,y$ iff $x - y = 2$

  • $5\,S\,3$ โ†’ $5 - 3 = 2$ โ†’ OK
  • $3\,S\,1$ โ†’ $3 - 1 = 2$ โ†’ OK
  • But $5\,S\,1$? $5 - 1 = 4 \neq 2$ โ†’ โŒ Fails transitivity

Test

Check all triples $(a,b,c)$ where $a\,R\,b$ and $b\,R\,c$. Is $a\,R\,c$ always true? โ†’ If yes โ†’ passes. โ†’ If even one case fails โ†’ reject.

๐Ÿ’ก This is recursive propagation: One link implies another, and so on โ€” creating full equivalence classes.


4. ๐Ÿ“ฆ Equivalence Classes โ€” The Big Payoff ๐ŸŽฏ

Once proven to be an equivalence relation, we can partition the entire set into disjoint groups called equivalence classes.

Definition

The equivalence class of an element $a \in A$ is:

$$ [a] = \{ x \in A \mid x\,R\,a \} $$

All elements in $[a]$ are โ€œequivalentโ€ to each other under $R$.

Key Properties

  • Every element belongs to exactly one equivalence class.
  • Classes are disjoint (no overlap).
  • The union of all classes = the full set $A$. โ†’ This is called a partition.

Example

Let $A = \mathbb{Z}$, and $x\,R\,y$ iff $x - y$ is even.

Then there are two equivalence classes:

$$ [0] = \{ \ldots, -4, -2, 0, 2, 4, \ldots \} \quad \text{(all even numbers)} $$

$$ [1] = \{ \ldots, -3, -1, 1, 3, 5, \ldots \} \quad \text{(all odd numbers)} $$

We say: $\mathbb{Z} / R = \{ [0], [1] \}$ โ€” the quotient set.

This is the foundation of modular arithmetic:

$$ x \equiv y \pmod{2} \quad \iff \quad x\,R\,y $$

5. ๐Ÿš€ Common Examples โ€” Practice Recognition ๐Ÿง 

RelationSetEquivalence?Why?
$x = y$Any setโœ… YesIdentity โ€” trivially reflexive, symmetric, transitive
$x \equiv y \pmod{n}$Integersโœ… YesClassic congruence โ€” difference divisible by n
$x \sim y$ if same parityIntegersโœ… YesSame as mod 2
$x \sim y$ if same birthdayPeopleโœ… YesGroups people by birth date
$x \sim y$ if parent ofPeopleโŒ NoNot reflexive, not symmetric
$x \sim y$ if $x < y$RealsโŒ NoNot reflexive, not symmetric
$x \sim y$ if $x \cdot y > 0$Nonzero realsโœ… YesBoth positive or both negative โ†’ partition into + and โ€“
$x \sim y$ if $x=y

6. ๐Ÿ—๏ธ Why Do We Care? Real-World Applications ๐Ÿ’ผ

FieldApplication
AlgebraModular arithmetic, cosets, group quotients
TopologyGluing edges to form torus from square
Computer ScienceHash tables, union-find data structures, type systems
LogicDefining equality in formal systems
Database TheoryGrouping records by key fields
PhysicsIdentifying states with same energy level
AI / MLClustering similar data points

๐Ÿ”— Key takeaway: Whenever you group things that are โ€œthe same in some way,โ€ youโ€™re using an equivalence relation.


7. ๐Ÿ› ๏ธ How to Prove an Equivalence Relation โ€” Step-by-Step Checklist โœ…

When given a relation $R$ on set $A$:

  1. Write down the definition: What does $x\,R\,y$ mean?

  2. Test Reflexivity: For arbitrary $a \in A$, is $a\,R\,a$ true? โ†’ Use algebra: compute $a\,R\,a$

  3. Test Symmetry: Assume $a\,R\,b$. Show $b\,R\,a$. โ†’ Flip the expression and simplify.

  4. Test Transitivity: Assume $a\,R\,b$ and $b\,R\,c$. Show $a\,R\,c$. โ†’ Chain the conditions logically.

  5. Conclusion: If all three pass โ†’ โœ… Itโ€™s an equivalence relation. If any fail โ†’ โŒ It is not.

๐Ÿ“Œ Tip: Always use general elements (like โ€œlet a, b, c be arbitraryโ€) โ€” never test only with numbers!


8. โš ๏ธ Common Pitfalls & Myths ๐Ÿšซ

MythTruth
โ€œIf it looks like equality, itโ€™s an equivalence relation.โ€Not true โ€” many non-equivalence relations look similar (e.g., โ€œis a friend ofโ€)
โ€œSymmetry + Reflexivity implies Transitivity.โ€FALSE โ€” counterexamples exist
โ€œOnly = and โ‰ก are equivalence relations.โ€False โ€” many use ~, โˆผ, or custom rules
โ€œI tested 3 cases โ€” thatโ€™s enough.โ€No. Must hold for all elements in the set.
โ€œEquivalence means identical.โ€No โ€” it means โ€œsame under this rule.โ€ 7 and 12 are not equal, but $7 \equiv 12 \pmod{5}$

9. ๐Ÿงญ Summary Diagram โ€” Mental Model ๐Ÿง 

Last updated on