# Equivalence Classes and Relations
### Equivalence Relations
In mathematics an **equivalence relation** is a [binary relation](https://en.wikipedia.org/wiki/Binary_relation "Binary relation") that is [reflexive](https://en.wikipedia.org/wiki/Reflexive_relation "Reflexive relation"), [symmetric](https://en.wikipedia.org/wiki/Symmetric_relation "Symmetric relation") and [transitive](https://en.wikipedia.org/wiki/Transitive_relation "Transitive relation"). The relation "is equal to" is the canonical example of an equivalence relation.
An example of an equivalence relationship is **congruence**. The leftmost two triangles are congruent, while the third and fourth are not congruent to any other triangle shown here. Thus, the first two triangles are in the same equivalence class, while the third and fourth triangles are each in their own equivalence class.

We can formally define our equivalence relation as:
A **binary relation** $\sim$ 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$:
* $a \sim a$. (*Reflexivity*)
* $a \sim b$ if and only if $b \sim a$. (*Symmetry*)
* If $a \sim b$ and $b \sim c$ then $a \sim c$. (*Transitivity*)
### Equivalence Classes
In mathematics, when the elements of some set $S$ have a notion of equivalence (formalized as an [equivalence relation](https://en.wikipedia.org/wiki/Equivalence_relation "Equivalence relation")) defined on them, then one may naturally split the set $S$ into **equivalence classes**. These equivalence classes are constructed so that elements $a$ and $b$ belong to the same **equivalence class** they are equivalent.
Formally, given a set $S$ and an equivalence relation $\sim$ on $S$, the equivalence class of an element $a$ in $S$, denoted $[a]$, is the set:
$\{ x \in S : x \sim a \}$
of elements which are equivalent to $a$.
---
Date: 20211015
Links to:
Tags:
References:
* [Equivalence class wikipedia](https://en.wikipedia.org/wiki/Equivalence_class)
* [Equivalence relation wikipedia](https://en.wikipedia.org/wiki/Equivalence_relation)