Relations and Equivalence Relations
A relation just records which pairs of things are connected. When a relation behaves like "is the same as" in some respect (everything relates to itself, it works both ways, and it chains), it's an equivalence relation, and it sorts the whole set into non-overlapping groups of things that count as the same.
What the symbols mean
- Is related to
The relation in question, such as 'has the same remainder mod 3 as'.
- An element
Any element of the set.
Explanation
A relation is simply a yes-or-no question you can ask about any two things in a set: "is related to ?" Think "is a sibling of," "is less than," or "has the same remainder as." The three formulas look abstract, but they're three common-sense rules written in symbols: (everything is related to itself), (it works both ways) and the last one (if is related to and to , then is related to ). The squiggle just means "is related to." Rules like these are what make a relation behave like "is the same as," and that's where this lesson is headed.
Formally, a relation on is a subset of , the set of related pairs, using the Cartesian product from the first lesson of this unit. Picture it as a grid of dots, one for each related pair .
- Reflexive: every element is related to itself (the whole diagonal is filled).
- Symmetric: forces (the picture is mirror-symmetric across the diagonal).
- Transitive: related to related is related.
- Antisymmetric: and only when . We'll need this one for orders in the next lesson.
An equivalence relation is reflexive, symmetric and transitive. Notice those are exactly the properties of "equals," which is the point: an equivalence relation is a way of saying two things are "the same" in some respect, like "has the same birthday as" or "is congruent mod to." Its equivalence classes (everything related to a given element) partition the set: every element lands in exactly one class. Why can't two classes partly overlap? If were in both 's class and 's class, then and (using symmetry), so by transitivity, and the two classes would be the same class after all. Congruence mod 3 splits the integers into , and .
It works in reverse too: any partition defines an equivalence relation, namely "is in the same part as."
A common mistake. It's tempting to think a symmetric, transitive relation is automatically reflexive, because and give by transitivity. That argument only works if is related to something. An element related to nothing at all never gets , so reflexivity has to be checked on its own.
See it
Worked examples
List the equivalence classes of congruence mod 3 on .
- 1
Two numbers are congruent mod 3 exactly when they leave the same remainder on division by 3, so group the numbers by remainder: 0, 1 or 2.
, ,
Practice
Type your answer and check it. Solve them all to complete the lesson.
Is "divides" on the positive integers symmetric?
How many equivalence classes does congruence mod 5 have on the integers?
How many ordered pairs are in the relation on ?
How many different relations are there on a 3-element set?
On a social network, "follows" is a relation on users, while "is friends with" is another. Which property does "follows" usually lack?
Congruence mod 4 splits the integers into four equivalence classes. Which number from 0 to 3 is in the same class as ?
The hardest one here. Get it, and you've got this lesson.
How many different equivalence relations are there on a 3-element set ?
Where it's used
Deduplicating records that refer to the same customer and finding connected regions in an image are both about building equivalence classes.