8.4 Equivalence Relations
We can bring these properties together to define a particular type of relation.
Definition 8.30 (Equivalence Relation).
Let be a set. Let be a relation on . If is reflexive, symmetric and transitive, then we call an equivalence relation.
Equivalence relations are important as they give us a notion of ’equivalence’ or ’sameness’ between mathematical objects.
We’ve already seen in Example 8.23 that on is an equivalence relation. Let us look at some other examples.
Theorem 8.31.
Let . Congruence modulo on the set is an equivalence relation.
Proof.
To show that congruence modulo is an equivalence relation, we need to show it is reflexive, symmetric and transitive.
First we show that is reflexive. Take any integer , and observe that , so for any . By definition of congruence modulo , we have . This shows for every , so is reflexive.
Next, we will show that is symmetric. For this, we must show that for all , the condition implies that . We use a direct proof. Suppose . Thus by definition of congruence modulo . Then for some by definition of divisibility. Multiplying both sides by gives . Therefore , and this means . We’ve shown that implies that , and this means is symmetric.
Finally we will show that is transitive. For this we must show that if and , then . Again, we use direct proof. Suppose and . This means and . Therefore there are integers and for which and . Therefore, we obtain . Consequently, with , and so . Hence . This completes the proof that congruence modulo is transitive.
We have shown that congruence modulo is reflexive, symmetric and transitive, and hence an equivalence relation.
We can also look at equivalence relations between functions:
Theorem 8.32.
Let be the set of all sets and be a relation on such that if there exists a bijective function where . Then is an equivalence relation.
Proof.
Recall that a bijective function is both surjective and injective.
-
•
To show is reflexive, consider the identity function where for all . This is a bijective function. Indeed, implies for all immediately from the definition of so this function is injective. It is also surjective since for all .
-
•
For to be symmetric, recall that bijective functions are invertible. Therefore, if , then there exists a bijection . As this is a bijection, there exists which is also a bijection meaning so is symmetric.
-
•
For transitivity, recall that the composition of bijective functions is a bijection by Proposition 6.47 so if and , then there exist bijections and . Consider . As both and are bijections, then is also a bijection so .
We have shown that is reflexive, symmetric and transitive meaning it is an equivalence relation.
8.4.1 Cyclic Relations
Definition 8.33.
Let be a relation on a set . We call cyclic if, for every such that and , we have .
Notice that this differs from the definition of a transitive relation since the conclusion is instead of .
If we know our relation is cyclic, we only need to check that it is also reflexive to confirm that it is an equivalence relation.
Proposition 8.34.
Let be a relation over a set .
is an equivalence relation if and only if is reflexive and cyclic.
Proof.
Let be a relation over a set .
We first assume that is an equivalence relation and aim to show that it is reflexive and cyclic.
Since is an equivalence relation, we know that is reflexive, symmetric, and transitive. Consequently, is reflexive, so we just need to show that is cyclic.
To prove that is cyclic, let where and . We need to show that . As and and since is transitive, . Then, since is symmetric, we see that , which is what we needed to prove.
Hence, if is an equivalence relation, it is reflexive and cyclic.
On the other hand, assuming is reflexive and cyclic, we can prove that is an equivalence relation. We need to show that is reflexive, symmetric, and transitive. Since we already know by assumption that is reflexive, we just need to show that is symmetric and transitive.
First, we prove that is symmetric. To do so, consider any arbitrary where holds. Since is reflexive, we know that . Therefore, by cyclicity, since and , we learn that meaning is symmetric.
Finally, we prove that is transitive. Let , and be any elements of where and . We need to prove that . Since is cyclic, from and we see that . We’ve already proven is symmetric so we also have and so is transitive.
Overall, we have shown that is cyclic and reflexive if and only if it is an equivalence relation.
8.4.2 Equivalence Classes
As we’ve already seen, it can be very helpful in a proof to reduce the number of cases that need considering. Equivalence relations are often a very useful way to do this as they can tell us which objects are “the same". Instead of working with each individual object, we can therefore work with sets consisting of the ’same’ object.
Definition 8.35.
Let be an equivalence relation on a set , and let . The equivalence class of is
The set of equivalence classes is the set .
Example 8.36.
We are already very familiar with equivalence classes in relation to rational numbers. Consider the set
Let be the equivalence relation on such that if . Since as , the equivalence class is the set of all pairs whose corresponding fraction is equal to . So, for example,
since
In particular, this means we can view as the set of all equivalence classes of , since no fraction is repeated in this set.
We do have to take care with notation here as does not tell us which equivalence relation we are defining equivalence classes with respect to. So we must always make sure that the context in which we are using this notation is clear.
Exercise 8.37.
Prove that in Example 8.36 is an equivalence relation.
Solution (please try for yourself before looking)
Proof.
We first show that is reflexive i.e. for every . So suppose . Then there exist with such that . Then since . So and thus, is reflexive.
Next we show that is symmetric. So we need to prove that for every . So suppose such that . Then there exist where such that and . Since , we have and thus . This means that . Therefore and thus , which proves that is symmetric.
Finally, to show that is transitive, we need to prove that and implies that for all . So suppose that such that and . Then there exist where such that , and . Since and , we have and . This means that and . Thus, , since . Hence,
since . Thus, which means that . Hence, is transitive.
Having shown that is reflexive, symmetric and transitive, we’ve therefore shown is an equivalence relation on .
Example 8.38.
We saw in Theorem 8.31 that congruence modulo is an equivalence relation. The equivalence classes for this relation are:
For congruence modulo , we can prove that there are finitely many equivalence classes. This is not always the case.
Theorem 8.39.
Let . Congruence modulo on the set has exactly equivalence classes.
Proof.
We saw in Corollary 8.5 that every integer is congruent to exactly one of . Setting such that , then This means that we have at most equivalence classes.
Moreover, for , Theorem 8.4 says that if and only if which means that there are at least equivalence classes.
Taken together, there are exactly equivalence classes congruence modulo on .
We also have examples where there are an infinite number of equivalence classes. This was true for our relation defined on the set in Example 8.36. Here’s another example.
Example 8.40.
Consider the set with the relation if and only if .
Let us consider the equivalence class of . Let . Then a general point is related to if . This is the equation of a circle centred at the origin with radius so the equivalence classes consist of concentric circles. Note that the equivalence class is a circle of radius and consists of a single point .
Examples of these equivalence classes are shown in Figure 8.9.
Exercise 8.41.
Prove that the relation given in Example 8.40 is an equivalence relation.
Solution (please try for yourself before looking)
Proof.
Consider the set with the relation if and only if . We need to show reflexivity, symmetry and transitivity.
-
•
To show is reflexive, we note that so .
-
•
For to be symmetric, we assume so This is equivalent to so and is symmetric.
-
•
For transitivity, if and , then and but this means and which gives transitivity.
We have shown that is reflexive, symmetric and transitive meaning it is an equivalence relation.
8.4.3 Equivalence Classes and Partitions
We now consider some properties of equivalence classes.
Theorem 8.42.
Let be a non-empty set and let be an equivalence relation on the set . Then, for all :
-
a)
.
-
b)
if and only if .
-
c)
Either or .
Proof.
-
a)
Let . As is an equivalence relation on , then by reflexivity, we necessarily have that . Therefore by Definition 8.35.
-
b)
We first show that if , then . We are therefore showing that two sets are equal so we need to show that and vice versa.
Let . Then by Definition 8.35. By assumption and, by the transitivity and symmetry of , we therefore have so . Therefore .
Similarly, if , then and, by transitivity with , so and .
We have then shown that if , then . On the other hand, we assume and show that .
By a), we have that so, as , we have that . By definition, this means so by the symmetry of .
This completes the proof for b).
-
c)
Consider the set .
Case 1: is non-empty.
This means there is an element and . As , then so, by b), . Similarly, . Hence, .
Case 2: is empty.
As the intersection must be either empty or non-empty, we have covered all possible cases and hence, we must have either or .
Exercise 8.43.
In b), why did we have to use both transitivity and symmetry when showing but only needed transitivity when showing ?
Solution (please try for yourself before looking)
Transitivity is sufficient for showing because we already know that and (no swapping of order is necessary), which immediately gives us .
This theorem means we can sort the elements of a set into distinct equivalence classes. Note that all the equivalence classes we found in the previous section are disjoint.
The map which maps elements to their equivalence classes is often called the canonical projection and will continue to appear in your later studies33 3 In particular, your algebra courses. If you are interested, you may want to read about quotient spaces.. By Theorem 8.42, is a surjective map which can be used to decompose any function into the composition of a surjective and injective function.
Proposition 8.44.
Let be a function and consider the equivalence relation on where if and only if for .
Define the function where . Then is injective and where is the canonical projection.
Proof.
We first show that the function where is injective.
Assume such that . To prove injectivity, we want to show .
By definition of , if , then so, by definition of the equivalence relation , we necessarily have . However, by Theorem 8.42, this means . Hence, we have shown is an injective function.
Finally, we consider . Then, for , so and any function can be decomposed into the composition of a surjective and injective function.
Theorem 8.42 is not the first time we’ve seen a set being discomposed into disjoint subsets. Recall from Block 2, Definition 4.9:
Definition 8.45.
Let be a (possibly infinite) set of subsets of the set such that
-
1.
and
-
2.
for every .
Then we call the collection a partition of the set .
Theorem 8.46.
Let be a non-empty set. If is an equivalence relation on , then , the set of equivalence classes, is a partition of .
Proof.
Let be an equivalence relation on the set with equivalence classes . We need to show that and the equivalence classes are pairwise disjoint.
We first show that . Let . Then is an element of at least one equivalence class. By Definition 8.35, this means so .
Alternatively, let . By Theorem 8.42 part a), . As is an equivalence class of , there exists some such that . Therefore, and, overall, we have .
Finally, let and be two equivalence classes. Then, by Theorem 8.42 part c), either or so the equivalence classes are pairwise disjoint.
Example 8.47.
Consider congruence modulo 2. The equivalence classes here are
Alternatively, we can say congruences modulo 2 partitions the integers into odd and even numbers.
Sometimes, it’s more useful to start with a partition on a set and it turns out, we can define a relation on the set from a partition.
Definition 8.48.
Let be a partition on the non-empty set with sets . Let be a relation on with if there exists some such that and . We call this the relation induced by the partition .
Example 8.49.
Consider the set with the partition , then the corresponding equivalence relation is given by the graph in Figure 8.10.
Looking at the properties of this induced relation, we get the following fundamental theorem.
Theorem 8.50.
Let be a non-empty set with a partition . The relation induced by the partition is an equivalence relation.
Proof.
We have to show that the relation induced by a partition on a non-empty set is reflexive, symmetric and transitive.
Reflexivity: Let . Then, as is a partition of , there exists some (unique) subset such that . Therefore for all by Definition 8.48 but so as required.
Symmetry: Suppose such that . This means there is a set such that and . However, if both and , then by Definition 8.48.
-
Transitivity: Let such that and . Therefore there are some sets such that and .
By definition of a partition, is empty if . However, and by assumption so we must have . But this means and so and is transitive.
Therefore induced by is an equivalence relation.
Together, we’ve therefore seen that partitions define equivalence relations and equivalence relations define partitions: there is a bijective correspondence between them. They are therefore really just two different ways of looking at the same thing!
We can now also address the question posed at the beginning of this section: what is equality?
Definition 8.51 (Equality).
Given a non-empty set , equality on is the equivalence relation on whose equivalence classes all contain a single element.