4.3 Equivalence Relations and Partitions
Section 4.2 gave us four independent relation properties. We now combine three of them to model a familiar idea: two objects may be different, yet count as equivalent according to a chosen rule.
For example, and are different integers, but both leave remainder when divided by . Two files may be different byte sequences, yet have the same file type. The word “equivalent” is meaningful only after we specify the criterion.
The three requirements for equivalence
A relation on a set is an equivalence relation when it is:
1. reflexive: for every ;
2. symmetric: implies ;
3. transitive: and imply .
The symbol is commonly used for an equivalence relation, but the three properties—not the symbol—make it one.
Consider the relation “has the same parity as” on , where parity means being even or odd.
- Every integer has the same parity as itself, so the relation is reflexive.
- If has the same parity as , then has the same parity as , so it is symmetric.
- If has the same parity as , and has the same parity as , then and have the same parity, so it is transitive.
Therefore “has the same parity as” is an equivalence relation.
By contrast, “is within distance of” on the integers is reflexive and symmetric but not transitive. We have
but . The missing transitive connection prevents equivalence.
Equivalence classes
Let be an equivalence relation on . For an element , the equivalence class of is
It contains exactly the elements considered equivalent to .
For the same-parity relation on
the classes are
Also,
The notation names a set, not a single transformed value.
Three facts explain why equivalence classes form clean groups:
Every element belongs to its own class
Reflexivity gives , so
No element is left unclassified.
Related representatives have the same class
Suppose . If , then . Combining with and using transitivity gives , so . This proves .
Symmetry gives , and the same reasoning proves . Therefore
Classes are equal or disjoint
If and share an element , then and . Symmetry gives , and transitivity gives . The previous fact then yields
Thus two equivalence classes can never overlap partially: they are identical or have empty intersection.
Partitions describe the same grouping from the other direction
A partition of a set is a collection of subsets, called blocks, satisfying:
1. every block is nonempty;
2. different blocks are disjoint;
3. the union of all blocks is .
For example,
is a partition of .
An equivalence relation produces a partition: collect its distinct equivalence classes.
Conversely, a partition produces an equivalence relation. Given a partition , define
This relation is reflexive because each element shares a block with itself, symmetric because “same block” works in either direction, and transitive because if shares a block with and shares a block with , the disjoint-block rule forces all three into that one block.
So equivalence relations and partitions are two views of the same structure:
Drag artifacts into classification zones—or use the keyboard move controls—and watch the induced relation matrix appear. The challenge system includes incomplete, overlapping, and valid classifications, making the connection between three relation properties and three partition rules tangible.
Congruence modulo
Parity divides the integers into two classes. Modular congruence generalizes this idea to any positive integer modulus.
First recall divisibility: for integers and with ,
means that for some integer .
For a positive integer , we say that integers and are congruent modulo when divides their difference:
For example,
because
Also,
because . Negative integers cause no problem; the quotient witness may be negative.
Why congruence is an equivalence relation
We verify the three properties from their definitions.
Reflexive. For every integer ,
so and .
Symmetric. If , then for some integer . Therefore
so .
Transitive. If and , then
for integers . Adding gives
Since is an integer, .
Residue classes and quotient sets
Every integer has exactly one remainder among
when divided by . These remainders label the distinct equivalence classes:
For modulus ,
The set of all distinct equivalence classes is called a quotient set:
This slash notation does not mean ordinary division. It means “collapse integers that are congruent modulo into the same class.”
Change the modulus and launch positive or negative integers around a clock. Values orbit into their residue stations, while equivalence tests visualize whether their difference completes a whole number of turns.
Section bridge
Equivalence relations group elements that should be treated as the same. The next section studies a different combination of properties: reflexive, antisymmetric, and transitive. That combination does not form clusters; it describes precedence, containment, and hierarchy.