An equivalence relation on a set S is a binary relation that is reflexive, symmetric, and transitive. Every element is related to itself, the relation goes both ways, and relatedness chains. Written .
The three properties together force a clean partition. Every element belongs to exactly one equivalence class — the set of all elements related to it: . Two classes are either identical or disjoint. The classes cover all of S with no overlap. An equivalence relation and a partition of a set are the same information in two forms.
Equality is the finest equivalence relation: each class has exactly one element. The total relation (everything related to everything) is the coarsest: one class containing all of S. Every other equivalence relation sits between these two extremes, grouping elements that are “the same” in some respect while distinguishing those that are not.
Equivalence relations formalize the act of treating different things as the same. Integers modulo treats numbers as equivalent when they have the same remainder after division by . Isomorphism in a category treats objects as equivalent when there is a structure-preserving bijection between them. Equality of sets treats collections as equivalent when they have the same elements. In each case, the equivalence relation says: these things differ in some ways, but for this purpose they are interchangeable.
An equivalence relation contrasts with a partial order. Both are reflexive and transitive. A partial order adds antisymmetry — if and then — which ranks elements. An equivalence relation adds symmetry — if then — which groups elements. Ranking and grouping are the two basic things you can do with a reflexive transitive relation.
The quotient set is the set of equivalence classes. A function that respects the equivalence — — descends to a function on the quotient: . This is how equivalence relations interact with functions: they define which inputs a function is allowed to distinguish.