A relation is just a set of pairs
We built ordered pairs and the product in the last node. Now cash it in. A relation on is simply a subset . The pairs in are the ones that are "related"; the pairs not in aren't. We write (read " is related to ") as shorthand for .
That's the entire definition, and it's deflating in the best way — I love watching students realize it. The relation "" on is the set . The relation "" is the set — the diagonal. "Divides" on is . Every comparison you've ever made is secretly a subset of a Cartesian product you built two lessons ago. Relations aren't a new kind of thing; they're sets of ordered pairs with attitude.
Three properties to check
Relations come in flavors, and we classify them by three properties. Let be a relation on .
- Reflexive: every element relates to itself. .
- Symmetric: the relation doesn't care about direction. .
- Transitive: relating chains through. .
Now drag the usual suspects through the checklist — this is how you build intuition, by interrogating each relation like a detective who won't be fooled by surface appearances:
| relation | reflexive? | symmetric? | transitive? |
|---|---|---|---|
| on | no ( fails) | no ( but not ) | yes |
| on | yes | no | yes |
| on any | yes | yes | yes |
| "same parity" on | yes | yes | yes |
| "divides" on | yes | no (, not ) | yes |
Read that table like a detective who has seen this kind of thing before. flunks reflexivity and symmetry — utterly disqualified. recovers reflexivity but still isn't symmetric. The two relations that pass all three — and "same parity" — are special. They have a name, and they run the rest of this lesson.
Equivalence relations: all three at once
A relation that is reflexive, symmetric, and transitive is called an equivalence relation. It's the mathematical formalization of "these things are the same in the way that matters," which is one of the most productive ideas in all of mathematics. Equality is the strictest one (same in every way), but the useful ones are looser: "same parity," "same remainder," "congruent triangles," "anagrams of each other." Different costumes, same equivalence class. You've seen this move before — it's the same spirit as "the squiggle is not the thing."
Given an equivalence relation on , each element drags along its equivalence class — the set of everything related to it:
The class is the bag of all elements that are "the same as " according to . By reflexivity , so nobody's class is empty.
The headline example: congruence mod n
Fix a positive integer . Say (" is congruent to mod ") when divides — equivalently, and leave the same remainder when divided by . Let me prove this is an equivalence relation, because I refuse to claim something is true and then just wink at you. The proof is three lines. Watch.
- Reflexive: ? Yes, always. ✓
- Symmetric: if , then for some integer , so , so . ✓
- Transitive: if and , then and ; adding, , so . ✓
All three hold, so congruence mod is an equivalence relation. Take . The classes are:
Three classes, sorted by remainder . Every integer lands in exactly one. These classes have a name you'll meet in algebra: , the integers mod .
The fundamental theorem: equivalence relations ARE partitions
Now the punchline, and it's a genuine theorem. Recall partitions from the set-operations lesson: a partition of chops it into pairwise-disjoint, non-empty blocks that cover all of . Here's the deep fact:
An equivalence relation on is the exact same data as a partition of .
Two outfits, one body. Given an equivalence relation, its equivalence classes form a partition — and here's why, in two strokes. (1) They cover : every sits in its own class (reflexivity). (2) They don't overlap: if two classes share even one element, they're identical. Suppose . Then and ; by symmetry , and by transitivity , which forces (everything related to is related to and vice versa). So distinct classes are disjoint. Cover plus disjoint equals partition. Conversely, any partition defines an equivalence relation: declare iff they're in the same block. Same data, two outfits.
For mod : the three classes are disjoint and cover — a partition into three blocks. The theorem in the flesh.
The payoff: how mathematicians forge new objects
Here's the teaser that makes this lesson matter far beyond bookkeeping. The phrase "equal up to something" is how mathematicians build new objects — and this is the move that forges number systems. You declare an equivalence relation, then treat each class as a single new thing. It's one of the most audacious tricks in mathematics, and once you see it you'll never unsee it.
The cleanest case: fractions ARE equivalence classes. The fractions are different pairs of integers , but they name the same rational number. Define when — that's an equivalence relation on pairs — and a rational number is literally an equivalence class of such pairs. Remember when we "invented fractions" to fix 's division defect? This is the forge that does it: glue together all the pairs that should be equal, and call each glued bundle a number. Equivalence relations are the forge. You'll see this exact move every time a new number system or quotient object gets built — file it away, because it pays off forever, and mathematicians who don't know it look like they're doing magic when they're just doing this.