A binary relation R on a set E is an equivalence relation when it is: reflexive (xRx for all x), symmetric (xRy⟹yRx) and transitive (xRy and yRz imply xRz). The equivalence class of x is cl(x)={y∈E:xRy}.
Examples
Example 1.30 (Checking the three axioms)
On R, declare xRy when x−y∈Z. Reflexive: x−x=0∈Z. Symmetric: if x−y∈Z then y−x=−(x−y)∈Z. Transitive: if x−y∈Z and y−z∈Z, then x−z=(x−y)+(y−z)∈Z (a sum of integers). So R is an equivalence relation, and cl(x)=x+Z={x+k:k∈Z}: each class contains exactly one representative in [0,1), its fractional part. By contrast, the relation “∣x−y∣≤1” on R is reflexive and symmetric but not transitive (0R1 and 1R2, yet ∣0−2∣>1): closeness does not propagate, and no partition into classes exists — a useful counterexample to keep in mind when verifying the axioms feels routine.
Example 1.32
On Z, congruence modulo n (x≡y(modn) when n divides x−y) is an equivalence relation; its classes are the n sets of integers with a given remainder upon division by n. This example becomes the ring Z/nZ in Chapter 7.