Mathwords logoMathwords

Equivalence Class — Definition, Formula & Examples

An equivalence class is the set of all elements that are related to a particular element under an equivalence relation. If two elements are equivalent, they belong to the same class.

Given a set SS and an equivalence relation \sim on SS, the equivalence class of an element aSa \in S is the set [a]={xSxa}[a] = \{x \in S \mid x \sim a\}. The collection of all distinct equivalence classes forms a partition of SS.

Key Formula

[a]={xSxa}[a] = \{x \in S \mid x \sim a\}
Where:
  • [a][a] = The equivalence class of element a
  • SS = The underlying set
  • \sim = An equivalence relation on S
  • xx = Any element of S that is equivalent to a

How It Works

An equivalence relation must satisfy three properties: reflexivity (aaa \sim a), symmetry (if aba \sim b then bab \sim a), and transitivity (if aba \sim b and bcb \sim c then aca \sim c). Once you verify a relation is an equivalence relation, you can group elements into classes. Every element of SS belongs to exactly one equivalence class, and two equivalence classes are either identical or completely disjoint. You can pick any element of a class as its representative — the class [a][a] and [b][b] are the same set whenever aba \sim b.

Worked Example

Problem: Let S = {0, 1, 2, 3, 4, 5} and define the relation a ~ b if and only if a and b have the same remainder when divided by 3. Find all equivalence classes.
Verify equivalence relation: Any integer has the same remainder as itself (reflexive), the relation is symmetric, and if a and b share a remainder and b and c share that remainder, so do a and c (transitive). This is an equivalence relation.
Find [0]: Elements with remainder 0 when divided by 3:
[0]={0,3}[0] = \{0, 3\}
Find [1]: Elements with remainder 1 when divided by 3:
[1]={1,4}[1] = \{1, 4\}
Find [2]: Elements with remainder 2 when divided by 3:
[2]={2,5}[2] = \{2, 5\}
Answer: The three equivalence classes are {0, 3}, {1, 4}, and {2, 5}. Notice these are disjoint and their union is all of S, forming a partition.

Why It Matters

Equivalence classes appear throughout abstract algebra (cosets in group theory, congruence classes in modular arithmetic) and in topology (quotient spaces). In computer science, they underpin data structures like union-find, which efficiently tracks partitions of elements into equivalence classes.

Common Mistakes

Mistake: Assuming two different representatives always yield different equivalence classes.
Correction: If aba \sim b, then [a]=[b][a] = [b]. Different representatives can name the same class. Always check whether two elements are related before concluding their classes are distinct.