7 Equivalence Relations

7.3 Equivalence Classes

7.3.1 Beginning Activity 1 (Sets Associated with a Relation)

As was indicated in Section 7.2, an equivalence relation on a set A is a relation with a certain combination of properties (reflexive, symmetric, and transitive) that allow us to sort the elements of the set into certain classes. This is done by means of certain subsets of A that are associated with the elements of the set A. This will be illustrated with the following example. Let A={a,b,c,d,e}, and let R be the relation on the set A defined as follows:
aRa, bRb, cRc, dRd, eRe, aRb, bRa, bRe, eRb, aRe, eRa, cRd, dRc

For each yA, define the subset R[y] of A as follows:

That is, R[y] consists of those elements in A such that xRy. For example, using y=a, we see that aRa,bRa, and eRa, and so R[a]={a,b,e}.

  1. 1.

    Determine R[b],R[c],R[d], and R[e].

  2. 2.

    Draw a directed graph for the relation R and explain why R is an equivalence relation on A.

  3. 3.

    Which of the sets R[a],R[b],R[c],R[d], and R[e] are equal?

  4. 4.

    Which of the sets R[a],R[b],R[c],R[d], and R[e] are disjoint?

As we will see in this section, the relationships between these sets are typical for an equivalence relation. The following example will show how different this can be for a relation that is not an equivalence relation.

Let A={a,b,c,d,e}, and let S be the relation on the set A defined as follows:

  1. 1.

    Draw a digraph that represents the relation S on A. Explain why S is not an equivalence relation on A.

For each yA, define the subset S[y] of A as follows:

For example, using y=b, we see that S[b]={a,b} since (a,b)S and (b,b)S. In addition, we see that S[a]= since there is no xA such that (x,a)S.

  1. 2.

    Determine S[c],S[d], and S[e].

  2. 3.

    Which of the sets S[a],S[b],S[c],S[d], and S[e] are equal?

  3. 4.

    Which of the sets S[b],S[c],S[d], and S[e] are disjoint?

7.3.2 The Definition of an Equivalence Class

We have indicated that an equivalence relation on a set is a relation with a certain combination of properties (reflexive, symmetric, and transitive) that allow us to sort the elements of the set into certain classes. We saw this happen in the beginning activities. We can now illustrate specifically what this means. For example, in Beginning Activity 2, we used the equivalence relation of congruence modulo 3 on to construct the following three sets:

The main results that we want to use now are Theorem 3.31 and Corollary 3.32. This corollary tells us that for any a,a is congruent to precisely one of the integers 0,1, or 2. Consequently, the integer a must be congruent to 0,1, or 2, and it cannot be congruent to two of these numbers. Thus

  1. 1.

    For each a,aC[0],aC[1], or aC[2]; and

  2. 2.

    C[0]C[1]=,C[0]C[2]=, and C[1]C[2]=.

This means that the relation of congruence modulo 3 sorts the integers into three distinct sets, or classes, and that each pair of these sets have no elements in common. So if we use a rectangle to represent , we can divide that rectangle into three smaller rectangles, corresponding to C[0],C[1], and C[2], and we might picture this situation as follows:

The Integers

Each integer is in exactly one of the three sets C[0],C[1], or C[2], and two integers are congruent modulo 3 if and only if they are in the same set. We will see that, in a similar manner, if n is any natural number, then the relation of congruence modulo n can be used to sort the integers into n classes. We will also see that in general, if we have an equivalence relation R on a set A, we can sort the elements of the set A into classes in a similar manner.

Definition. Let be an equivalence relation on a nonempty set A. For each aA, the equivalence class of 𝒂 determined by is the subset of A, denoted by [a], consisting of all the elements of A that are equivalent to a. That is,

We read [a] as "the equivalence class of a" or as "bracket a."

7.3.3 Notes

  1. 1.

    We use the notation [a] when only one equivalence relation is being used. If there is more than one equivalence relation, then we need to distinguish between the equivalence classes for each relation. We often use something like [a], or if R is the name of the relation, we can use R[a] or [a]R for the equivalence class of a determined by R. In any case, always remember that when we are working with any equivalence relation on a set A if aA, then the equivalence class [a] is a subset of A.

  2. 2.

    We know that each integer has an equivalence class for the equivalence relation of congruence modulo 3. But as we have seen, there are really only three distinct equivalence classes. Using the notation from the definition, they are:

7.3.4 Progress Check 7.12 (Equivalence Classes from Beginning Activity 1)

Without using the terminology at that time, we actually determined the equivalence classes of the equivalence relation R in Beginning Activity 1. What are the distinct equivalence classes for this equivalence relation?

7.3.5 Congruence Modulo 𝒏 and Congruence Classes

In Beginning Activity 2, we used the notation C[k] for the set of all integers that are congruent to k modulo 3. We could have used a similar notation for equivalence classes, and this would have been perfectly acceptable. However, the notation [a] is probably the most common notation for the equivalence class of a. We will now use this same notation when dealing with congruence modulo n when only one congruence relation is under consideration.

Definition. Let n. Congruence modulo n is an equivalence relation on . So for a,

In this case, [a] is called the congruence class of 𝒂 modulo 𝒏.

We have seen that congruence modulo 3 divides the integers into three distinct congruence classes. Each congruence class consists of those integers with the same remainder when divided by 3. In a similar manner, if we use congruence modulo 2, we simply divide the integers into two classes. One class will consist of all the integers that have a remainder of 0 when divided by 2, and the other class will consist of all the integers that have a remainder of 1 when divided by 2. That is, congruence modulo 2 simply divides the integers into the even and odd integers.

7.3.6 Progress Check 7.13 (Congruence Modulo 4)

Determine all of the distinct congruence classes for the equivalence relation of congruence modulo 4 on the integers. Specify each congruence class using the roster method.

7.3.7 Properties of Equivalence Classes

As we have seen, in Beginning Activity 1, the relation R was an equivalence relation. For that activity, we used R[y] to denote the equivalence class of yA, and we observed that these equivalence classes were either equal or disjoint.

However, in Beginning Activity 1, the relation S was not an equivalence relation, and hence we do not use the term "equivalence class" for this relation. We should note, however, that the sets S[y] were not equal and were not disjoint. This exhibits one of the main distinctions between equivalence relations and relations that are not equivalence relations.

In Theorem 7.14, we will prove that if is an equivalence relation on the set A, then we can "sort" the elements of A into distinct equivalence classes. The properties of equivalence classes that we will prove are as follows: (1) Every element of A is in its own equivalence class; (2) two elements are equivalent if and only if their equivalence classes are equal; and (3) two equivalence classes are either identical or they are disjoint.

Theorem 7.14. Let A be a nonempty set and let be an equivalence relation on the set A. Then,

  1. 1.

    For each aA,a[a].

  2. 2.

    For each a,bA,ab if and only if [a]=[b].

  3. 3.

    For each a,bA,[a]=[b] or [a][b]=.

Proof. Let A be a nonempty set and assume that is an equivalence relation on A. To prove the first part of the theorem, let aA. Since is an equivalence relation on A, it is reflexive on A. Thus, aa, and we can conclude that a[a].

The second part of this theorem is a biconditional statement. We will prove it by proving two conditional statements. We will first prove that if ab, then [a]=[b]. So let a,bA and assume that ab. We will now prove that the two sets [a] and [b] are equal. We will do this by proving that each is a subset of the other.

First, assume that x[a]. Then, by definition, xa. Since we have assumed that ab, we can use the transitive property of to conclude that xb, and this means that x[b]. This proves that [a][b].

We now assume that y[b]. This means that yb, and hence by the symmetric property, that by. Again, we are assuming that ab. So we have

We use the transitive property to conclude that ay and then, using the symmetric property, we conclude that ya. This proves that y[a] and, hence, that [b][a]. This means that we can conclude that if ab, then [a]=[b].

We must now prove that if [a]=[b], then ab. Let a,bA and assume that [a]=[b]. Using the first part of the theorem, we know that a[a] and since the two sets are equal, this tells us that a[b]. Hence by the definition of [b], we conclude that ab. This completes the proof of the second part of the theorem.

For the third part of the theorem, let a,bA. Since this part of the theorem is a disjunction, we will consider two cases: Either

In the case where [a][b]=, the first part of the disjunction is true, and hence there is nothing to prove. So we assume that [a][b] and will show that [a]=[b]. Since [a][b], there is an element x in A such that

This means that x[a] and x[b]. Consequently, xa and xb, and so we can use the second part of the theorem to conclude that [x]=[a] and [x]=[b]. Hence, [a]=[b], and we have proven that [a]=[b] or [a][b]=.

Theorem 7.14 gives the primary properties of equivalence classes. Consequences of these properties will be explored in the exercises. The following table restates the properties in Theorem 7.14 and gives a verbal description of each one.

Formal Statement from Theorem 7.14 Verbal Description
For each aA,a[a]. Every element of A is in its own equivalence class.
For each a,bA,ab if and only if [a]=[b].
For each a,bA,[a]=[b] or [a][b]=.

7.3.8 Progress Check 7.15 (Equivalence Classes)

Let f: be defined by f(x)=x24 for each x. Define a relation on as follows:

In Exercise (6) of Section 7.2, we proved that is an equivalence relation on . Consequently, each real number has an equivalence class. For this equivalence relation,

  1. 1.

    Determine the equivalence classes of 5,5,10,10,π, and π.

  2. 2.

    Determine the equivalence class of 0 .

  3. 3.

    If a, use the roster method to specify the elements of the equivalence class [a].

The results of Theorem 7.14 are consistent with all the equivalence relations studied in the beginning activities and in the progress checks. Since this theorem applies to all equivalence relations, it applies to the relation of congruence modulo n on the integers. Because of the importance of this equivalence relation, these results for congruence modulo n are given in the following corollary.

Corollary 7.16. Let n. For each a, let [a] represent the congruence class of a modulo n.

  1. 1.

    For each a,a[a].

  2. 2.

    For each a,b,ab(modn) if and only if [a]=[b].

  3. 3.

    For each a,b,[a]=[b] or [a][b]=.

For the equivalence relation of congruence modulo n, Theorem 3.31 and Corollary 3.32 tell us that each integer is congruent to its remainder when divided by n, and that each integer is congruent modulo n to precisely one of one of the integers 0,1,2,,n1. This means that each integer is in precisely one of the congruence classes [0],[1],[2],,[n1]. Hence, Corollary 7.16 gives us the following result.

Corollary 7.17. Let n. For each a, let [a] represent the congruence class of a modulo n.

  1. 1.

    =[0][1][2][n1]

  2. 2.

    For j,k{0,1,2,,n1}, if jk, then [j][k]=.

7.3.9 Partitions and Equivalence Relations

A partition of a set A is a collection of subsets of A that "breaks up" the set A into disjoint subsets. Technically, each pair of distinct subsets in the collection must be disjoint. We then say that the collection of subsets is pairwise disjoint. We introduce the following formal definition.

Definition. Let A be a nonempty set, and let 𝒞 be a collection of subsets of A. The collection of subsets 𝒞 is a partition of 𝑨 provided that

  1. 1.

    For each V𝒞,V.

  2. 2.

    For each xA, there exists a V𝒞 such that xV.

  3. 3.

    For every V,W𝒞,V=W or VW=.

There is a close relation between partitions and equivalence classes since the equivalence classes of an equivalence relation form a partition of the underlying set, as will be proven in Theorem 7.18. The proof of this theorem relies on the results in Theorem 7.14.

Theorem 7.18. Let be an equivalence relation on the nonempty set A. Then the collection 𝒞 of all equivalence classes determined by is a partition of the set A.

Proof. Let be an equivalence relation on the nonempty set A, and let 𝒞 be the collection of all equivalence classes determined by . That is,

We will use Theorem 7.14. to prove that 𝒞 is a partition of A.
Part (1) of Theorem 7.14 states that for each aA,a[a]. In terms of the equivalence classes, this means that each equivalence class is nonempty since each element of A is in its own equivalence class. Consequently, 𝒞, the collection of all equivalence classes determined by , satisfies the first two conditions of the definition of a partition.

We must now show that the collection 𝒞 of all equivalence classes determined by satisfies the third condition for being a partition. That is, we need to show that any two equivalence classes are either equal or are disjoint. However, this is exactly the result in Part (3) of Theorem 7.14.

Hence, we have proven that the collection 𝒞 of all equivalence classes determined by is a partition of the set A.

Note: Theorem 7.18 has shown us that if is an equivalence relation on a nonempty set A, then the collection of the equivalence classes determined by form a partition of the set A.

This process can be reversed. This means that given a partition 𝒞 of a nonempty set A, we can define an equivalence relation on A whose equivalence classes are precisely the subsets of A that form the partition. This will be explored in Exercise (12).

7.3.10 Exercises 7.3

  1. 1.

    () Let A={a,b,c,d,e} and let be the relation on A that is represented by the directed graph in Figure 7.4.

    Digraph with vertices a, b, c, d, e. All vertices have self-loops. Symmetric edges (double arrows) connect a and b, and d and e. Vertex c is isolated (except for its self-loop).
    Figure 7.4: Directed Graph for the Relation in Exercise (1)

    Prove that is an equivalence relation on the set A, and determine all of the equivalence classes determined by this equivalence relation.

  2. 2.

    () Let A={a,b,c,d,e,f}, and assume that is an equivalence relation on A. Also assume that it is known that
    ab
    ac
    ef
    ad
    af
    ec.

    Draw a complete directed graph for the equivalence relation on the set A, and then determine all of the equivalence classes for this equivalence relation.

  3. 3.

    () Let A={0,1,2,3,,999,1000}. Define the relation R on A as follows:
    For x,yA,xRy if and only if x and y have the same number of digits.

    Prove that R is an equivalence relation on the set A and determine all of the distinct equivalence classes determined by R.

  4. 4.

    Determine all of the congruence classes for the relation of congruence modulo 5 on the set of integers.

  5. 5.

    Let R9={0,1,2,3,4,5,6,7,8}.

    1. () (a)

      Define the relation on R9 as follows: For all a,bR9,ab if and only if a2b2(mod9). Prove that is an equivalence relation on R9 and determine all of the distinct equivalence classes of this equivalence relation.

    2. (a)

      Define the relation on R9 as follows: For all a,bR9,ab if and only if a3b3(mod9). Prove that is an equivalence relation on R9 and determine all of the distinct equivalence classes of this equivalence relation.

  6. 6.

    Define the relation on as follows: For a,b,ab if and only if ab. In Progress Check 7.9 of Section 7.2, we showed that the relation is an equivalence relation on . Also, see Exercise (9) in Section 7.2.

    1. () (a)

      Prove that [57]={m+57|m}.

    2. (a)

      If a, then what is the equivalence class of a?

    3. (b)

      If a, prove that there is a bijection from [a] to [57].

  7. 7.

    Define the relation on as follows:

    For x,y,xy if and only if xy.

    1. (a)

      Prove that is an equivalence relation on .

    2. (b)

      List four different real numbers that are in the equivalence class of 2.

    3. (c)

      If a, what is the equivalence class of a?

    4. (d)

      Prove that [2]={r+2r}.

    5. (e)

      If a, prove that there is a bijection from [a] to [2].

  8. 8.

    Define the relation on as follows: For a,b,ab if and only if 2a+3b0(mod5). The relation is an equivalence relation on . (See Exercise (13) in Section 7.2). Determine all the distinct equivalence classes for this equivalence relation.

  9. 9.

    Let A=×({0}). That is, A={(a,b)×b0}. Define the relation on A as follows:

    For (a,b),(c,d)A,(a,b)(c,d) if and only if ad=bc.

    1. (a)

      () Prove that is an equivalence relation on A.

    2. (b)

      Why was it necessary to include the restriction that b0 in the definition of the set A?

    3. (c)

      () Determine an equation that gives a relation between a and b if (a,b)A and (a,b)(2,3). [0pt]

    4. (d)

      Determine at least four different elements in [(2,3)], the equivalence class of (2,3).

    5. (e)

      Use set builder notation to describe [(2,3)], the equivalence class of (2,3).

  10. 10.

    For (a,b),(c,d)×, define (a,b)(c,d) if and only if a2+b2=c2+d2. In Exercise (15) of Section 7.2, we proved that is an equivalence relation on ×.

    1. (a)

      Determine the equivalence class of (0,0).

    2. (b)

      Use set builder notation (and do not use the symbol ) to describe the equivalence class of (2,3) and then give a geometric description of this equivalence class.

    3. (c)

      Give a geometric description of a typical equivalence class for this equivalence relation.

    4. (d)

      Let ={xx0}. Prove that there is a one-to-one correspondence (bijection) between and the set of all equivalence classes for this equivalence relation.

  11. 11.

    Let A be a nonempty set and let be an equivalence relation on A. Prove each of the following:

    1. (a)

      For each a,bA,ab if and only if [a][b]=.

    2. (b)

      For each a,bA, if [a][b], then [a][b]=.

    3. (c)

      For each a,bA, if [a][b] then [a]=[b].

7.3.11 Explorations and Activities

  1. 12.

    A Partition Defines an Equivalence Relation. Let A={a,b,c,d,e} and let 𝒞={{a,b,c},{d,e}}.

    1. (a)

      Explain why 𝒞 is a partition of A.

      Define a relation on A as follows: For x,yA,xy if and only if there exists a set U in 𝒞 such that xU and yU.

    2. (b)

      Prove that is an equivalence relation on the set A, and then determine all the equivalence classes for . How does the collection of all equivalence classes compare to 𝒞 ?

    What we did for the specific partition in Part (12b) can be done for any partition of a set. So to generalize Part (12b), we let A be a nonempty set and let 𝒞 be a partition of A. We then define a relation on A as follows:

    For x,yA,xy if and only if there exists a set U in 𝒞 such that xU and yU.

    1. (e)

      Prove that is an equivalence relation on the set A.

    2. (f)

      Let aA and let U𝒞 such that aU. Prove that [a]=U.

  2. 13.

    Equivalence Relations on a Set of Matrices. The following exercises require a knowledge of elementary linear algebra. We let n,n() be the set of all n by n matrices with real number entries.

    1. (a)

      Define a relation on n,n() as follows: For all A,Bn,n(), AB if and only if there exists an invertible matrix P in n,n() such that B=PAP1. Is an equivalence relation on n,n()? Justify your conclusion.

    2. (b)

      Define a relation R on n,n() as follows: For all A,Bn,n(), ARB if and only if det(A)=det(B). Is R an equivalence relation on n,n()? Justify your conclusion.

    3. (c)

      Let be an equivalence relation on . Define a relation on n,n() as follows: For all A,Bn,n(),AB if and only if det(A)det(B). Is an equivalence relation on n,n()? Justify your conclusion.