Equivalence relations show up in every chapter that follows relations — congruences, fractions, rotations, symmetries. And almost every problem ends the same way: "list the equivalence classes." If the definition of an equivalence class has never clicked, the instruction sounds cryptic. Once the definition is in place, listing classes is a mechanical procedure that never takes more than a minute.

The definition

Equivalence class of $a$

Let \sim be an equivalence relation on a set A, and pick an element a \in A. The equivalence class of a is the set of all elements of A that are related to a:

[a] = \{x \in A \mid x \sim a\}

The element a itself is called a representative of the class. Two different elements can be representatives of the same class.

Read that carefully. An equivalence class is a set, not a single element. It is the bucket holding every element that shares some common feature with a, where "common feature" is the feature \sim is testing.

If \sim is "has the same last digit as" on \{12, 17, 22, 27, 35\}, then [17] = \{17, 27\} — both end in 7. And [22] = \{12, 22\} — both end in 2. The class of 35 is just \{35\} because no other number in the set ends in 5.

The class is determined by any of its members

Here is the subtle and important fact. If you pick any element from a class and compute its class, you get the same set back.

Take \sim = "has the same last digit as" again. Compute [12] and [22]:

[12] = \{x \mid x \sim 12\} = \{12, 22\} \qquad [22] = \{x \mid x \sim 22\} = \{12, 22\}

Both give the same two-element set. So [12] = [22] — they are not two different classes, just two different names for the one class.

Same-class principle

If a \sim b, then [a] = [b]. In words: if two elements are related, their equivalence classes are identical. You can swap one representative for another without changing the class.

Why: if x \in [a] then x \sim a. Combined with a \sim b (given) and transitivity, x \sim b, so x \in [b]. This shows [a] \subseteq [b]. The reverse inclusion follows by swapping a and b and using symmetry.

This is what "representative" means — every element of a class represents the whole class equally well.

How to list all the equivalence classes of a finite set

Here is the procedure. You want the distinct classes, not the redundant renaming of the same class.

  1. Pick the first element of A. Compute its class.
  2. Remove every element of that class from A.
  3. Pick the next un-used element. Compute its class.
  4. Repeat until A is empty.
  5. The list of classes you computed is the complete list of distinct equivalence classes.

The procedure must terminate because each step removes at least one element (the representative itself). And because the classes partition A, no element ever shows up in two classes — so removing them as you go does not lose any information.

Stepping through the listing procedure for equivalence classesA horizontal slider from 0 to 3 with a draggable red point. The readout shows the step number of the class-listing procedure for the relation 'same remainder mod 3' on the set 1, 2, 3, 4, 5, 6, 7, 8, 9. At step 0 no classes have been picked. At step 1 the first class 1, 4, 7 is complete. At step 2 the second class 2, 5, 8 is complete. At step 3 the third class 3, 6, 9 is complete. step 0 (start) pick 1 → {1,4,7} pick 2 → {2,5,8} pick 3 → {3,6,9} A = {1, 2, …, 9}, relation: same remainder mod 3 drag to walk through step by step
The procedure in action on $A = \{1, 2, \dots, 9\}$ with "same remainder mod $3$." Step 1: pick $1$, find its class $[1] = \{1, 4, 7\}$. Step 2: $1, 4, 7$ are used up; pick next unused element $2$, find $[2] = \{2, 5, 8\}$. Step 3: pick $3$, find $[3] = \{3, 6, 9\}$. Every element is now used. Three classes found.

Worked procedure: "mod 5" on \{1, 2, \dots, 14\}

Let A = \{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14\}, with a \sim b if a - b is a multiple of 5.

Step 1. Pick 1. Compute [1] = \{x \in A \mid x - 1 \text{ is a multiple of } 5\} = \{1, 6, 11\}.

Step 2. Remove \{1, 6, 11\} from A. Pick next unused: 2. Compute [2] = \{2, 7, 12\}.

Step 3. Remove, pick 3. Compute [3] = \{3, 8, 13\}.

Step 4. Remove, pick 4. Compute [4] = \{4, 9, 14\}.

Step 5. Remove, pick 5. Compute [5] = \{5, 10\}. (Only two elements because 15 would be next but it is not in A.)

Step 6. A is now empty. Done.

The distinct equivalence classes are \{1, 6, 11\}, \{2, 7, 12\}, \{3, 8, 13\}, \{4, 9, 14\}, \{5, 10\} — five classes.

The trap: do not confuse "class" with "representative"

A common error on exams is to answer "the equivalence classes are 1, 2, 3, 4, 5" instead of the five sets above. The representative is not the class. The class is the collection of elements sharing the relation with the representative.

The grade depends on the distinction. Write out each class as an explicit set — with curly braces and all its members — and you will never lose marks to this.

Two sanity checks for your final answer

After you list the classes, do two checks.

Check 1: no element is missing. Union all your classes. The result must equal A. If you have left some element uncovered, you picked a non-empty class without checking every related element.

Check 2: no element is in two classes. Any two listed classes must be disjoint (or identical — but you collected distinct ones, so disjoint). If an element shows up twice, either the relation is not actually an equivalence, or you misidentified two distinct-looking representatives that were actually in the same class.

These two checks together confirm the partition property: the classes of an equivalence relation partition A.

Partition property of equivalence classesA large rectangle representing the set A divided into several coloured boxes with no overlap. Each box is labelled as one equivalence class. The caption notes that union of the boxes equals A and the boxes are pairwise disjoint. A (any equivalence relation) class [a₁] class [a₂] class [a₃] [a₄]
Any equivalence relation on $A$ partitions $A$ into pairwise-disjoint classes whose union is all of $A$. The classes can have different sizes, but no element is in two classes and no element is left out. This is both the defining property of a partition and the sanity check for any list of classes.

When the set is infinite: list the types, not every class

If A is infinite (say, \mathbb{Z}), you cannot literally list all classes by enumerating elements — there are infinitely many elements and sometimes infinitely many classes. Instead, list the classes by giving a canonical representative for each.

For the relation "congruent mod 5" on \mathbb{Z}, the canonical representatives are 0, 1, 2, 3, 4. So the equivalence classes are [0], [1], [2], [3], [4] — five classes, each one an infinite set of integers. The class [0] is \{\dots, -10, -5, 0, 5, 10, \dots\}, the class [1] is \{\dots, -9, -4, 1, 6, 11, \dots\}, and so on.

In this style, you write the classes using representatives but remember that each [k] is an infinite set, not just the number k.

The one-minute recipe

Related: Relations · Equivalence Relations · Equivalence-Class Partition View · Sets — Introduction