On this concept: Formula

Not sure which lesson to do first? Find your level and get a plan →

Math · Sets & Logic · Grade 9-12

Equivalence Classes

An equivalence class is the set of all elements equivalent to a given one under an equivalence relation (reflexive, symmetric, transitive).

[a]={x:x∼a} where ∼ is an equivalence relation (reflexive, symmetric, transitive)

Quick Answer

An equivalence class is the set of all elements equivalent to a given one under an equivalence relation (reflexive, symmetric, transitive). You use it when objects that differ in detail should count as the same for your purpose: 12, 24 and 36 are one number, and 15:00 and 3:00 are one position of a clock hand. Grouping by the relation splits the whole set into separate blocks that never overlap, so you can work with one representative from each block instead of every element.

Why This Matters

Equivalence classes let you work with blocks instead of members: twelve remainders instead of every hour that has ever passed, one fraction in lowest terms instead of infinitely many equal fractions, one shape instead of all its congruent copies. The grouping is only safe when the relation is reflexive, symmetric and transitive; with a relation like 'within 1 cm of', the groups overlap and stop making sense.

Intuitive Explanation

Sort a pile of socks by colour. Every sock goes into exactly one pile, socks in the same pile count as interchangeable, and socks in different piles do not. Each pile is an equivalence class of the relation 'has the same colour as'. Integers sort the same way under 'leaves the same remainder when divided by 3': the class of 2 is {…,−4,−1,2,5,8,…}, and the three classes [0], [1], [2] hold every integer exactly once.

Three properties make such clean piles possible. Reflexive: every element is related to itself. Symmetric: if a∼b then b∼a. Transitive: if a∼b and b∼c then a∼c. Transitivity does the heavy lifting, since it guarantees that two classes sharing even one element are the same class. So classes never partly overlap, and any member can serve as the representative: [2]=[5]=[−1].

A relation can sound like sameness and still fail. 'Is within 1 cm of' is reflexive and symmetric, but heights of 150, 150.8 and 151.6 cm break transitivity: the first is within 1 cm of the second and the second within 1 cm of the third, yet the first and third differ by 1.6 cm. Grouping by that relation gives overlapping groups with no consistent boundary, so it has no equivalence classes.

Think of it like this. Equivalence classes work like amounts of money: a $10 note, two $5 notes and ten $1 bills are different objects, but for paying a bill they are the same amount, and every pile of cash has exactly one amount. The picture fits because 'has the same value as' is reflexive, symmetric and transitive.

Core idea. An equivalence class collects every element related to a given one, treating them all as a single object.


When to Use

Use equivalence classes when a problem says objects count as the same if they share a feature: the same remainder, the same value (equal fractions), the same shape up to congruence. First check that the relation is reflexive, symmetric and transitive, then group each element with everything related to it and choose a representative. If the relation fails transitivity, as 'is friends with' or 'is close in size to' do, the groups overlap and you need another tool, such as a graph.

Tip. Ask: Am I grouping all elements 'the same' under a reflexive, symmetric, and transitive relation?

How to Recognize It

Before forming equivalence classes, state the rule that decides when two objects count as the same, and test that rule on three properties rather than trusting that it sounds like sameness.

  1. Is every object related to itself under the rule?

    If yes, the rule is reflexive, as 'has the same remainder as' is. If no, as with 'is taller than', the rule cannot form groups of things that count as the same, and you need another tool, such as an ordering.

  2. Whenever a is related to b, is b related to a?

    If yes, the rule is symmetric: 'is the same height as' works both ways. 'Is a factor of' fails, since 3 divides 6 but 6 does not divide 3, so it describes an ordering, not equal standing.

  3. If a matches b and b matches c, must a match c?

    If yes, the rule is transitive and the groups will not overlap. 'Differs by at most 1' fails: 1 and 2 match, 2 and 3 match, but 1 and 3 do not, so the groups would blur into each other.

  4. Does the question ask for one group rather than the full collection of groups?

    If yes, one group, such as all integers leaving remainder 2 when divided by 5, is an equivalence class. If it wants all five such groups together, that is a partition of the integers; the rule itself is the equivalence relation.

Equivalence Classes compared with Set (general), Equivalence relation, and Partition

All four rows talk about grouping, so the words get swapped. Ask which object you mean: the rule for 'same' (equivalence relation), one group it creates (equivalence class), all those groups together (partition), or any collection at all, however it was chosen (set).

Equivalence Classes

Meaning
Use this when you want to treat differing objects as identical for a purpose and partition them into 'same' groups.
Key test
Am I grouping all elements 'the same' under a reflexive, symmetric, and transitive relation?
Formula
[a]={x:x∼a} where ∼ is an equivalence relation (reflexive, symmetric, transitive)
Example
Group the integers 0,1,2,3,4,5,6 by 'same remainder when divided by 3.' What is the class of 2?

Set (general)

Meaning
Any collection; an equivalence class is specifically the block generated by one element under ∼.
Key test
Use 'set' for any grouping not built from an equivalence relation.
Example
{2,5,7} — arbitrary collection

Equivalence relation

Meaning
The rule ∼ itself; the class is the resulting group of related elements.
Key test
Use when naming the relation, not the set it produces.
Formula
a∼b
Example
'≡ mod 5' as a rule

Partition

Meaning
The full collection of all classes covering the set; one class is a single block of it.
Key test
Use when referring to all the disjoint blocks together.
Example
All remainder-classes mod 5: {[0],[1],[2],[3],[4]}

Formula & Notation

[a]={x:x∼a} where ∼ is an equivalence relation (reflexive, symmetric, transitive)
[a]={x∈S:x∼a}; ∼ is an equivalence relation iff it is reflexive (a∼a), symmetric (a∼b⇒b∼a), and transitive (a∼b∧b∼c⇒a∼c); S/∼ partitions S into disjoint classes

How to read it: [a] denotes the equivalence class of a; a∼b means a is equivalent to b

Worked Examples

Example 1 — Integers mod 3

Easy

Group the integers 0,1,2,3,4,5,6 by 'same remainder when divided by 3.' What is the class of 2?
Show the steps and the answer
  1. Check the relation: 'same remainder when divided by 3' is reflexive, symmetric and transitive.

    Every number shares its own remainder; sharing works both ways; and if a,b share a remainder and b,c do, then a,c do.

  2. Find each remainder: 0,1,2,3,4,5,6 leave 0,1,2,0,1,2,0.

    The remainder is the feature that decides which class a number joins.

  3. Collect the numbers with remainder 2: [2]={2,5}.

    Only 2 and 5 among the listed integers leave remainder 2; 8 would, but it is not in the set.

  4. List all the classes: [0]={0,3,6}, [1]={1,4}, [2]={2,5}.

    Each of the 7 numbers appears in exactly one class, and 3+2+2=7, so the classes form a partition.

Answer: [2]={2,5}

Takeaway: An equivalence class contains only elements of the set being grouped. Over all integers, [2] would be {…,−4,−1,2,5,8,…}.

Example 2 — Not an equivalence relation

Standard

Group people by 'has shaken hands with.' Does that form equivalence classes?
Show the steps and the answer
  1. Test reflexivity: nobody shakes hands with themselves.

    An equivalence relation needs a∼a for every a, so handshaking already fails one property.

  2. Test symmetry: if Ana shook Ben's hand, then Ben shook Ana's.

    This property holds, which is why the relation can look like a kind of sameness.

  3. Test transitivity: Ana shook Ben's hand and Ben shook Cal's, but Ana and Cal never met.

    Ben would sit in a group with Ana and in a group with Cal, while Ana and Cal are unrelated.

  4. Conclude: the group around Ana and the group around Cal overlap at Ben without being equal.

    Equivalence classes are either identical or completely separate, and these groups are neither.

Answer: No clean classes form

Takeaway: Before grouping, test all three properties. A symmetric relation like handshaking can still fail transitivity, and then the groups it suggests overlap.

Example 3 — Find the mistake: one class under two names

Application

Group the integers 1 to 12 by 'same remainder when divided by 4'. Sam writes: "[1]={1,5,9}, [2]={2,6,10}, [3]={3,7,11}, [4]={4,8,12} and [5]={5,9}, so there are 5 classes." Find the mistake and correct it.
Show the steps and the answer
  1. Compare [5] with [1]: both contain 5 and 9.

    Two equivalence classes that share even one element must be the same class.

  2. Check directly: 5÷4 leaves remainder 1, so 5∼1 and [5]=[1]={1,5,9}.

    Any member can name its class; [5] is another name for [1], and Sam's version even left out 1.

  3. Note that [4]={4,8,12} is the class of remainder 0.

    Calling it [4] is fine, since [8] and [12] name the same class.

  4. Count: 4 classes of 3 numbers each, and 4×3=12 covers every number from 1 to 12 exactly once.

    Classes that do not overlap and together cover the set confirm the partition is right.

Answer: There are 4 classes: {1,5,9}, {2,6,10}, {3,7,11}, {4,8,12}.

Takeaway: Distinct equivalence classes never overlap. If two of your classes share an element, they are one class under two names.

Where You'll See It

  • Clock arithmetic

    A clock face groups all hours by remainder mod 12, so 15:00 and 3:00 put the hour hand in the same place. To find where the hand points 100 hours after 9 o'clock, use 100=8⋅12+4: the hand moves the same as 4 hours, landing on 1.

  • Which weekday a date falls on

    Days fall into 7 classes by remainder mod 7. If 1 March is a Tuesday, so is 29 March, since 28 days is exactly 4 weeks. And 1 April, 31 days after 1 March, is a Friday, because 31 leaves remainder 3 and Tuesday plus 3 days is Friday.

  • Mixing the same shade of paint

    Mixing 2 cans of blue with 3 of yellow gives the same green as 4 with 6, or 10 with 15. All these ratios form one class, written in lowest terms as 2:3, which is the only number a paint shop needs to record.

Common Mistakes

  1. The slip: Grouping by a relation that is not reflexive, symmetric, and transitive

    Instead: only a true equivalence relation makes clean classes.

  2. The slip: Letting classes overlap

    Instead: distinct equivalence classes are always disjoint; an element belongs to exactly one.

  3. The slip: Confusing one class with the whole partition

    Instead: [2] is one block; the partition is all blocks together.


Mini Practice

Try these on your own. Tap Reveal when you want to check.

  1. Under the relation "same remainder when divided by 4", list the class of 3 among the integers 0 to 15.

    Hint: Start at 3 and keep adding 4.

  2. How many equivalence classes does "same remainder when divided by 5" create on the integers, and which class contains −7?

    Hint: Write −7 as 5q+r with 0≤r<5.

  3. Group 12,26,36,48,515,39 by the relation "equal in value". What are the classes?

    Hint: Reduce each fraction to lowest terms.

  4. Points in the plane are related when they are the same distance from the origin. Describe the equivalence class of (3,4) and name two other members.

    Hint: Find the distance of (3,4) from the origin first.

  5. Question A: which integers have the same remainder as 7 when divided by 3? Question B: sort all integers by their remainder when divided by 3. Which asks for one class and which for the partition?

    Hint: Is the answer one block, or all the blocks together?

  6. Sam groups integers by the relation "differ by at most 1" and says {1,2,3} is one class. Correct him.

    Hint: Check transitivity: 1 is related to 2, and 2 to 3. Is 1 related to 3?

Want the full set?

50 practice questions for this concept — free to try, every one with a complete worked solution showing the why, not just the answer.

Frequently Asked Questions

What does 'up to rotation' mean in a counting question?

It names an equivalence relation: arrangements that turn into each other count as one. Colouring 3 beads on a ring red or blue gives 8 arrangements, but only 4 up to rotation: all red, all blue, one blue, or two blue. Each class collects the arrangements that are rotations of one another. Whenever you meet 'up to', ask which change is being ignored, because that change defines the classes.

Is clock arithmetic just equivalence classes?

Yes. On a 12-hour clock, 3, 15, 27 and −9-9 all give the same hour position, so they form one class, written [3][3] in arithmetic modulo 12. You can add classes using any member: 15+10=2515 + 10 = 25 lands in [1][1], and so does 3+10=133 + 10 = 13. This works because the relation respects addition and multiplication, which is what makes modular arithmetic reliable.

Are the rational numbers really built from equivalence classes?

In the formal sense, yes. Mathematicians define a rational number as a whole class of integer pairs (a,b)(a, b) with b≠0b \ne 0, where (a,b)∼(c,d)(a, b) \sim (c, d) means ad=bcad = bc. So (2,4)(2, 4) and (3,6)(3, 6) are related because 2×6=4×32 \times 6 = 4 \times 3. The number one-half is the entire class, and the fraction you write down is just one member chosen to name it.

Can a relation be symmetric and transitive but not reflexive?

Yes, and it is a classic trap. On the numbers 1, 2 and 3, take the relation containing only the pairs (1,1)(1, 1), (1,2)(1, 2), (2,1)(2, 1) and (2,2)(2, 2). It is symmetric and transitive, yet 3 is not related to itself. The tempting argument 'from a∼ba \sim b and b∼ab \sim a, transitivity gives a∼aa \sim a' only works when aa is related to something in the first place.

Learning Path

← Before

SetEquivalence
Equivalence Classes

You are here

Next →

Abstraction
You need Set and Equivalence first: collections of elements, and a relation that behaves like 'equals'. Equivalence classes add the grouping: every element belongs to exactly one class, and any member can stand for its class. Next, Abstraction builds on this habit by treating a whole class as one new object, as when the fraction 12 stands for all of 12,24,36,… at once.

See Also