- 1. What is a relation, really?
- 2. Types of relations: empty, universal, reflexive, symmetric, transitive
- 3. When is a relation an equivalence relation?
- 4. Sorting a set into boxes: equivalence classes
- 5. How many relations? Counting with pairs
- 6. Different inputs, different outputs: one-one (injective) functions
- 7. Is every output used? Onto (surjective) functions
- 8. Both at once: bijective functions, and the finite vs infinite surprise
- 9. How many functions? Counting maps between finite sets
- 10. One function after another: composition of functions
- 11. Running a function backwards: invertible functions
- Review
4 of 11·NCERT §1.2·5 min
Sorting a set into boxes: equivalence classes
The big ideaAn equivalence relation cuts its set into separate boxes, called equivalence classes: inside a box everything is related, across boxes nothing is, and every element sits in exactly one box.
In simple words
A school splits its children into four houses: Red, Blue, Green and Yellow. Two children are linked if they are in the same house. Everyone is in one house, and only one. Children in the same house are all linked to each other. Children in different houses are not linked at all. The houses are the boxes.
The class of an element
Let R be an equivalence relation in a set X, and let a be an element of X. The equivalence class of a, written [a], is the set of all elements of X related to a:
\[ [a] = \{ x \in X : x \, R \, a \} \]
Because R is reflexive, a is always in its own class, so no class is empty.
Worked example: even and odd
In \( \mathbf{Z} \), let a R b when 2 divides a − b. Every even number differs from 0 by a multiple of 2, so they are all related to 0; no odd number is. So
\[ [0] = \{ \dots, -4, -2, 0, 2, 4, \dots \} = \text{E}, \qquad [1] = \{ \dots, -3, -1, 1, 3, 5, \dots \} = \text{O}. \]
Notice [0] = [2] = [−6] = [2r] for every integer r, and [1] = [2r + 1]. The same box gets many names. There are only two different classes, E and O, and they satisfy:
- inside E, any two numbers are linked (two evens always differ by an even number), and the same is true inside O;
- an even number and an odd number are never linked, because their difference is odd;
- E and O share no number, E ∩ O = \( \phi \), and between them they hold every integer, E ∪ O = \( \mathbf{Z} \).
Every equivalence relation makes a partition
What happened with E and O happens for every equivalence relation R in any set X. R splits X into subsets \( A_1, A_2, A_3, \dots \), its equivalence classes, such that:
- any two members of the same class \( A_i \) are linked by R;
- a member of \( A_i \) and a member of a different class \( A_j \) are never linked;
- the classes do not overlap, \( A_i \cap A_j = \phi \) for i ≠ j, and together they fill X: \( \bigcup A_i = X \).
Such a splitting is called a partition (or subdivision) of X. A useful test: [a] = [b] exactly when a R b, and if a and b are not related, [a] and [b] share nothing. Two classes are either the same or completely separate; they never partly overlap.
It works backwards too. Start with any partition and declare "a R b when a and b are in the same piece". That relation is always an equivalence relation, and its classes are the pieces you started with. So equivalence relations and partitions are two ways of describing the same thing.
Worked example: remainders on division by 4
In X = {1, 2, 3, …, 10}, let a R b when 4 divides a − b. This is an equivalence relation (same proof as for 5 on the previous page). Its classes are the numbers with the same remainder on division by 4:
- [1] = {1, 5, 9} (remainder 1)
- [2] = {2, 6, 10} (remainder 2)
- [3] = {3, 7} (remainder 3)
- [4] = {4, 8} (remainder 0)
Four classes, no overlaps, 3 + 3 + 2 + 2 = 10 elements in all. The set of elements related to 6 is [6] = [2] = {2, 6, 10}. In all of \( \mathbf{Z} \), "3 divides a − b" gives three classes, [0], [1] and [2], the multiples of 3, the numbers one more than a multiple of 3, and the numbers two more.
Try it: change the set and the divisor, and watch the boxes refill.
One more picture: in the plane, "P and Q are the same distance from the origin" is an equivalence relation. The class of a point P other than the origin is the whole circle through P centred at the origin; the class of the origin is just the origin. The circles are the boxes. And fractions work this way too: \( \frac12, \frac24, \frac36 \) are different pairs of numbers that we treat as "the same", because the pairs (p, q) and (u, v) are related when pv = qu.
How many equivalence relations?
Since each equivalence relation is a partition, count partitions. Guess first, then find them all by hand.
For {1, 2, 3} there are exactly 5:
- {1}, {2}, {3} (only a = b)
- {1, 2}, {3}
- {1, 3}, {2}
- {2, 3}, {1}
- {1, 2, 3} (the universal relation)
So an equivalence relation in {1, 2, 3} containing (1, 2) must keep 1 and 2 in the same box: either {1, 2}, {3} or {1, 2, 3}. That makes 2. A 4-element set has 15 equivalence relations.
Remember
- [a] = all elements related to a. It always contains a.
- The classes of an equivalence relation form a partition: no overlaps, no gaps.
- [a] = [b] if a R b; otherwise [a] ∩ [b] = \( \phi \).
- Equivalence relations in a set match partitions of it one to one: 5 for a 3-element set.
Try it. In A = {1, 2, …, 15}, R = {(a, b) : |a − b| is a multiple of 3}. Find the set of elements related to 2, and the number of classes.
Answer
- Equivalence class [a]
- The set of everything related to a.
- Partition
- A splitting of a set into non-empty, non-overlapping pieces that together make the whole set.
- Disjoint
- Having no elements in common.
- Remainder class
- All integers that leave the same remainder when divided by a fixed number.
Words to know
For R = {(a, b) : 2 divides a − b} in \( \mathbf{Z} \), which is equal to [3]?
- [0]
- [−7]
- [4]
Two equivalence classes [a] and [b] of the same equivalence relation share exactly one element. What can you say?
- They overlap in one place only
- [a] = [b]
- a and b are unrelated
How many equivalence relations in {1, 2, 3} contain the pair (2, 3)?
- 1
- 2
- 5
Picture and video credits