# Equivalence class

{{#invoke:Hatnote|hatnote}}

In mathematics, when a set has an equivalence relation defined on its elements, there is a natural grouping of elements that are related to one another, forming what are called **equivalence classes**. Notationally, given a set Template:Mvar and an equivalence relation ~ on Template:Mvar, the *equivalence class* of an element Template:Mvar in Template:Mvar is the subset of all elements in Template:Mvar which are equivalent to Template:Mvar. It follows from the definition of the equivalence relations that the equivalence classes form a [[Partition of a set|partition of Template:Mvar]]. The set of equivalence classes is sometimes called the **quotient set** or the **quotient space** of Template:Mvar by ~ and is denoted by *X* / ~.

When Template:Mvar has some structure, and the equivalence relation is defined with some connection to this structure, the quotient set often inherits some related structure. Examples include quotient spaces in linear algebra, quotient spaces in topology, quotient groups, homogeneous spaces, quotient rings, quotient monoids, and quotient categories.

## Notation and formal definition

An equivalence relation is a binary relation ~ satisfying three properties:^{[1]}

- For every element Template:Mvar in Template:Mvar,
*a*~*a*(reflexivity), - For every two elements Template:Mvar and Template:Mvar in Template:Mvar, if
*a*~*b*, then*b*~*a*(symmetry) - For every three elements Template:Mvar, Template:Mvar, and Template:Mvar in Template:Mvar, if
*a*~*b*and*b*~*c*, then*a*~*c*(transitivity).

The equivalence class of an element Template:Mvar is denoted [*a*] and is defined as the set

of elements that are related to Template:Mvar by ~. An alternative notation [*a*]_{R} can be used to denote the equivalence class of the element Template:Mvar, specifically with respect to the equivalence relation Template:Mvar. This is said to be the Template:Mvar-equivalence class of Template:Mvar.

The set of all equivalence classes in Template:Mvar with respect to an equivalence relation *R* is denoted as *X*/*R* and called Template:Mvar **modulo** Template:Mvar (or the **quotient set** of Template:Mvar by *R*).^{[2]} The surjective map from Template:Mvar onto *X*/*R*, which maps each element to its equivalence class, is called the **canonical surjection** or the **canonical projection map**.

When an element is chosen (often implicitly) in each equivalence class, this defines an injective map called a *section*. If this section is denoted by *s*, one has [*s*(*c*)] = *c* for every equivalence class *c*. The element *s*(*c*) is called a **representative** of *c*. Any element of a class may be chosen as a representative of the class, by choosing the section appropriately.

Sometimes, there is a section that is more "natural" than the other ones. In this case, the representatives are called *canonical representatives*. For example, in modular arithmetic, consider the equivalence relation on the integers defined by *a* ~ *b* if *a* − *b* is a multiple of a given integer *n*, called the *modulus*. Each class contains a unique non-negative integer smaller than *n*, and these integers are the canonical representatives. The class and its representative are more or less identified, as is witnessed by the fact that the notation *a* mod *n* may denote either the class or its canonical representative (which is the remainder of the division of *a* by *n*).

## Examples

- If Template:Mvar is the set of all cars, and ~ is the equivalence relation "has the same color as." then one particular equivalence class consists of all green cars.
*X*/~ could be naturally identified with the set of all car colors (cardinality of*X*/~ would be the number of all car colors). - Let Template:Mvar be the set of all rectangles in a plane, and ~ the equivalence relation "has the same area as". For each positive real number
*A*there will be an equivalence class of all the rectangles that have area*A*.^{[3]} - Consider the modulo 2 equivalence relation on the set
**Z**of integers:*x*~*y*if and only if their difference*x*−*y*is an even number. This relation gives rise to exactly two equivalence classes: one class consisting of all even numbers, and the other consisting of all odd numbers. Under this relation [7], [9], and [1] all represent the same element of**Z**/~.^{[4]} - Let Template:Mvar be the set of ordered pairs of integers (
*a*,*b*) with Template:Mvar not zero, and define an equivalence relation ~ on Template:Mvar according to which (*a*,*b*) ~ (*c*,*d*) if and only if*ad*=*bc*. Then the equivalence class of the pair (*a*,*b*) can be identified with the rational number*a*/*b*, and this equivalence relation and its equivalence classes can be used to give a formal definition of the set of rational numbers.^{[5]}The same construction can be generalized to the field of fractions of any integral domain. - If Template:Mvar consists of all the lines in, say the Euclidean plane, and
*L*~*M*means that*L*and*M*are parallel lines, then the set of lines that are parallel to each other form an equivalence class as long as a line is considered parallel to itself. In this situation, each equivalence class determines a point at infinity.

## Properties

Every element Template:Mvar of Template:Mvar is a member of the equivalence class [*x*]. Every two equivalence classes [*x*] and [*y*] are either equal or disjoint. Therefore, the set of all equivalence classes of Template:Mvar forms a partition of Template:Mvar: every element of Template:Mvar belongs to one and only one equivalence class.^{[6]} Conversely every partition of Template:Mvar comes from an equivalence relation in this way, according to which *x* ~ *y* if and only if Template:Mvar and Template:Mvar belong to the same set of the partition.^{[7]}

It follows from the properties of an equivalence relation that

*x*~*y*if and only if [*x*] = [*y*].

In other words, if ~ is an equivalence relation on a set *X*, and Template:Mvar and Template:Mvar are two elements of Template:Mvar, then these statements are equivalent:

## Graphical representation

Any binary relation can be represented by a directed graph and symmetric ones, such as equivalence relations, by undirected graphs. If ~ is an equivalence relation on a set *X*, let the vertices of the graph be the elements of *X* and join vertices Template:Mvar and Template:Mvar if and only if *s* ~ *t*. The equivalence classes are represented in this graph by the maximal cliques forming the connected components of the graph.^{[8]}

## Invariants

If ~ is an equivalence relation on Template:Mvar, and *P*(*x*) is a property of elements of Template:Mvar such that whenever *x* ~ *y*, *P*(*x*) is true if *P*(*y*) is true, then the property Template:Mvar is said to be an invariant of ~, or well-defined under the relation ~.

A frequent particular case occurs when Template:Mvar is a function from Template:Mvar to another set Template:Mvar; if *f*(*x*_{1}) = *f*(*x*_{2}) whenever *x*_{1} ~ *x*_{2}, then Template:Mvar is said to be a *morphism* for ~, a *class invariant under* ~, or simply *invariant under* ~. This occurs, e.g. in the character theory of finite groups. Some authors use "compatible with ~" or just "respects ~" instead of "invariant under ~".

Any function *f* : *X* → *Y* itself defines an equivalence relation on Template:Mvar according to which *x*_{1} ~ *x*_{2} if and only if *f*(*x*_{1}) = *f*(*x*_{2}). The equivalence class of Template:Mvar is the set of all elements in Template:Mvar which get mapped to *f*(*x*), i.e. the class [*x*] is the inverse image of *f*(*x*). This equivalence relation is known as the kernel of Template:Mvar.

More generally, a function may map equivalent arguments (under an equivalence relation ~_{X} on Template:Mvar) to equivalent values (under an equivalence relation ~_{Y} on Template:Mvar). Such a function is known as a morphism from ~_{X} to ~_{Y}.

## Quotient space

In topology, a quotient space is a topological space formed on the set of equivalence classes of an equivalence relation on a topological space using the original space's topology to create the topology on the set of equivalence classes.

In abstract algebra, congruence relations on the underlying set of an algebra allow the algebra to induce an algebra on the equivalence classes of the relation, called a quotient algebra. In linear algebra, a quotient space is a vector space formed by taking a quotient group where the quotient homomorphism is a linear map. By extension, in abstract algebra, the term quotient space may be used for quotient modules, quotient rings, quotient groups, or any quotient algebra. However, the use of the term for the more general cases can as often be by analogy with the orbits of a group action.

The orbits of a group action on a set may be called the quotient space of the action on the set, particularly when the orbits of the group action are the right cosets of a subgroup of a group, which arise from the action of the subgroup on the group by left translations, or respectively the left cosets as orbits under right translation.

A normal subgroup of a topological group, acting on the group by translation action, is a quotient space in the senses of topology, abstract algebra, and group actions simultaneously.

Although the term can be used for any equivalence relation's set of equivalence classes, possibly with further structure, the intent of using the term is generally to compare that type of equivalence relation on a set *X* either to an equivalence relation that induces some structure on the set of equivalence classes from a structure of the same kind on *X*, or to the orbits of a group action. Both the sense of a structure preserved by an equivalence relation and the study of invariants under group actions lead to the definition of invariants of equivalence relations given above.

## See also

- Equivalence partitioning, a method for devising test sets in software testing based on dividing the possible program inputs into equivalence classes according to the behavior of the program on those inputs
- Homogeneous space, the quotient space of Lie groups.

## Notes

## References

- {{#invoke:citation/CS1|citation

|CitationClass=citation }}

- {{#invoke:citation/CS1|citation

|CitationClass=citation }}

- {{#invoke:citation/CS1|citation

|CitationClass=citation }}

- {{#invoke:citation/CS1|citation

|CitationClass=citation }}

- {{#invoke:citation/CS1|citation

|CitationClass=citation }}

## Further reading

This material is basic and can be found in any text dealing with the fundamentals of proof technique, such as any of the following:

- {{#invoke:citation/CS1|citation

|CitationClass=citation }}

- {{#invoke:citation/CS1|citation

|CitationClass=citation }}

- {{#invoke:citation/CS1|citation

|CitationClass=citation }}

- {{#invoke:citation/CS1|citation

|CitationClass=citation }}

- {{#invoke:citation/CS1|citation

|CitationClass=citation }}

- {{#invoke:citation/CS1|citation

|CitationClass=citation }}

- {{#invoke:citation/CS1|citation

|CitationClass=citation }}

- {{#invoke:citation/CS1|citation

|CitationClass=citation }}

- {{#invoke:citation/CS1|citation

|CitationClass=citation }}

- {{#invoke:citation/CS1|citation

|CitationClass=citation }}

- {{#invoke:citation/CS1|citation

|CitationClass=citation }}

- {{#invoke:citation/CS1|citation

|CitationClass=citation }}

- {{#invoke:citation/CS1|citation

|CitationClass=citation }}

de:Äquivalenzrelation#Äquivalenzklassen nl:Equivalentierelatie#Equivalentieklasse