๐ 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:
| Property | Definition | Emoji |
|---|---|---|
| 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 ๐ง
| Relation | Set | Equivalence? | Why? |
|---|---|---|---|
| $x = y$ | Any set | โ Yes | Identity โ trivially reflexive, symmetric, transitive |
| $x \equiv y \pmod{n}$ | Integers | โ Yes | Classic congruence โ difference divisible by n |
| $x \sim y$ if same parity | Integers | โ Yes | Same as mod 2 |
| $x \sim y$ if same birthday | People | โ Yes | Groups people by birth date |
| $x \sim y$ if parent of | People | โ No | Not reflexive, not symmetric |
| $x \sim y$ if $x < y$ | Reals | โ No | Not reflexive, not symmetric |
| $x \sim y$ if $x \cdot y > 0$ | Nonzero reals | โ Yes | Both positive or both negative โ partition into + and โ |
| $x \sim y$ if $ | x | = | y |
6. ๐๏ธ Why Do We Care? Real-World Applications ๐ผ
| Field | Application |
|---|---|
| Algebra | Modular arithmetic, cosets, group quotients |
| Topology | Gluing edges to form torus from square |
| Computer Science | Hash tables, union-find data structures, type systems |
| Logic | Defining equality in formal systems |
| Database Theory | Grouping records by key fields |
| Physics | Identifying states with same energy level |
| AI / ML | Clustering 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$:
Write down the definition: What does $x\,R\,y$ mean?
Test Reflexivity: For arbitrary $a \in A$, is $a\,R\,a$ true? โ Use algebra: compute $a\,R\,a$
Test Symmetry: Assume $a\,R\,b$. Show $b\,R\,a$. โ Flip the expression and simplify.
Test Transitivity: Assume $a\,R\,b$ and $b\,R\,c$. Show $a\,R\,c$. โ Chain the conditions logically.
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 ๐ซ
| Myth | Truth |
|---|---|
| โ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}$ |