In mathematics, an equivalence relation is a binary relation that is reflexive, symmetric and transitive. The relation "is equal to" is the canonical example of an equivalence relation, where for any objects a, b, and c:
As a consequence of the reflexive, symmetric, and transitive properties, any equivalence relation provides a partition of the underlying set into disjoint equivalence classes.
Various notations are used in the literature to denote that two elements a and b of a set are equivalent with respect to an equivalence relation R; the most common are "a ~ b" and "a ≡ b", which are used when R is implicit, and variations of "a ~Rb", "a ≡Rb", or "aRb" to specify R explicitly. Non-equivalence may be written "a ≁ b" or "a ≢ b".
A given binary relation ~ on a set X is said to be an equivalence relation if and only if it is reflexive, symmetric and transitive. That is, for all a, b and c in X:
X together with the relation ~ is called a setoid. The equivalence class of under ~, denoted , is defined as .