Ch. 7 Equivalence Relations
Ch. 7 Equivalence Relations
Ch. 7 Equivalence Relations
Equivalence Relations
7.1 Relations
For example, since California and Oregon have a land border, we can say that
.California, Oregon/ 2 R and .Oregon, California/ 2 R. Also, since Califor-
nia and Michigan do not share a land border, (California, Michigan) … R and
.Michigan, California/ … R.
1. Use the roster method to specify the elements in each of the following sets:
(a) B D fy 2 A j.Michigan, y/ 2 R g
(b) C D fx 2 A j.x; Michigan/ 2 R g
(c) D D fy 2 A j.Wisconsin, y/ 2 R g
2. Find two different examples of two ordered pairs, .x; y/ and .y; z/ such that
.x; y/ 2 R, .y; z/ 2 R, but .x; z/ 62 R, or explain why no such example
exists. Based on this, is the following conditional statement true or false?
362
7.1. Relations 363
4x 2 C y 2 D 16
is an open sentence with two variables. An element of the truth set of this open
sentence (also called a solution of the equation) is an ordered pair .a; b/ of real
numbers so that when a is substituted for x and b is substituted for y, the predicate
becomes a true statement (a true equation in this case). We can use set builder
notation to describe the truth set S of this equation with two variables as follows:
˚
S D .x; y/ 2 R R j 4x 2 C y 2 D 16 :
When a set is a truth set of an open sentence that is an equation, we also call the
set the solution set of the equation.
Introduction to Relations
In Section 6.1, we introduced the formal definition of a function from one set to
another set. The notion of a function can be thought of as one way of relating the
elements of one set with those of another set (or the same set). A function is a
364 Chapter 7. Equivalence Relations
special type of relation in the sense that each element of the first set, the domain,
is “related” to exactly one element of the second set, the codomain.
This idea of relating the elements of one set to those of another set using or-
dered pairs is not restricted to functions. For example, we may say that one integer,
a, is related to another integer, b, provided that a is congruent to b modulo 3. No-
tice that this relation of congruence modulo 3 provides a way of relating one integer
to another integer. However, in this case, an integer a is related to more than one
other integer. For example, since
Definition. Let A and B be sets. A relation R from the set A to the set B
is a subset of A B. That is, R is a collection of ordered pairs where the first
coordinate of each ordered pair is an element of A, and the second coordinate
of each ordered pair is an element of B.
A relation from the set A to the set A is called a relation on the set A. So a
relation on the set A is a subset of A A.
In Section 6.1, we defined the domain and range of a function. We make similar
definitions for a relation.
Definition. If R is a relation from the set A to the set B, then the subset of
A consisting of all the first coordinates of the ordered pairs in R is called the
domain of R. The subset of B consisting of all the second coordinates of the
ordered pairs in R is called the range of R.
We use the notation dom.R/ for the domain of R and range.R/ for the range
of R. So using set builder notation,
So from the results in Preview Activity 2, we can say that the domain of the relation
S is the closed interval Œ 2; 2 and the range of S is the closed interval Œ 4; 4.
2. From Preview Activity 1, A is the set of all states in the United States, and
There are many different relations in mathematics. For example, two real numbers
can be considered to be related if one number is less than the other number. We
366 Chapter 7. Equivalence Relations
call this the “less than” relation on R. If x; y 2 R and x is less than y, we often
write x < y. As a set of ordered pairs, this relation is R< , where
R< D f.x; y/ 2 R R j x < yg:
With many mathematical relations, we do not write the relation as a set of ordered
pairs even though, technically, it is a set of ordered pairs. Table 7.1 describes some
standard mathematical relations.
Name Open Relation as a Set of
Sentence Ordered Pairs
The “less than” re- x<y f.x; y/ 2 R R j x < yg
lation on R
The “equality” rela- xDy f.x; y/ 2 R R j x D yg
tion on R
The “divides” rela- mjn f.m; n/ 2 Z Z j m divides ng
tion on Z
The “subset” rela- S T f.S; T / 2 P .U / P .U / j S T g
tion on P .U /
The “element of” x2S f.x; S / 2 U P .U / j x 2 S g
relation from U to
P .U /
The “congruence a b .mod n/ f.a; b/ 2 Z Z j a b .mod n/g
modulo n” relation
on Z
The mathematical relations in Table 7.1 all used a relation symbol between the two
elements that form the ordered pair in A B. For this reason, we often do the same
thing for a general relation from the set A to the set B. So if R is a relation from A
to B, and x 2 A and y 2 B, we use the notation
In some cases, we will even use a generic relation symbol for defining a new rela-
tion or speaking about relations in a general context. Perhaps the most commonly
7.1. Relations 367
used symbol is “”, read “tilde” or “squiggle” or “is related to.” When we do this,
we will write
1. What is the domain of the “divides” relation? What is the range of the “di-
vides” relation?
Functions as Relations
Progress Check
˚ 7.4 (A Set of Ordered Pairs)
Let F D .x; y/ 2 R R j y D x 2 . The set F can then be considered to be
relation on R since it is a subset of R R.
3. Since each real number x produces only one value of y for which y D x 2 ,
the set F can be used to define a function from the set R to R. Draw a graph
of this function.
In Progress Check 7.4, we were able to draw a graph of a relation as a way to visu-
alize the relation. In this case, the relation was a function from R to R. In addition,
in Progress Check 7.2, we were also able ˚to use a graph to represent a relation.
In this case, the graph of the relation T D .x; y/ 2 R R j x 2 C y 2 D 64 is a
circle of radius 8 whose center is at the origin.
When R is a relation from a subset of the real numbers R to a subset of R,
we can often use a graph to provide a visual representation of the relation. This is
especially true if the relation is defined by an equation or even an inequality. For
example, if ˚
R D .x; y/ 2 R R j y x 2 ;
7.1. Relations 369
then we can use the following graph as a way to visualize the points in the plane
that are also in this relation.
The points .x; y/ in the relation R are the points on the graph of y D x 2 or are in
the shaded region. This because for these points, y x 2 . One of the shortcomings
of this type of graph is that the graph of the equation and the shaded region are
actually unbounded and so we can never show the entire graph of this relation.
However, it does allow us to see that the points in this relation are either on the
parabola defined by the equation y D x 2 or are “inside” the parabola.
When the domain or range of a relation is infinite, we cannot provide a visu-
alization of the entire relation. However, if A is a (small) finite set, a relation R
on A can be specified by simply listing all the ordered pairs in R. For example, if
A D f1; 2; 3; 4g, then
R D f.1; 1/; .4; 4/; .1; 3/; .3; 2/; .1; 2/; .2; 1/g
1 2
3 4
1 2
6 3
5 4
Exercises 7.1
?
1. Let A D fa; b; cg, B D fp; q; rg, and let R be the set of ordered pairs
defined by R D f.a; p/ ; .b; q/ ; .c; p/ ; .a; q/g.
7.1. Relations 371
(a) Use the roster method to list all the elements of A B. Explain why
A B can be considered to be a relation from A to B.
(b) Explain why R is a relation from A to B.
(c) What is the domain of R? What is the range of R?
? 2. Let A D fa; b; cg and let R D f.a; a/ ; .a; c/ ; .b; b/ ; .b; c/ ; .c; a/ ; .c; b/g
(so R is a relation on A). Are the following statements true or false? Explain.
3. Let A be the set of all females citizens of the United States. Let D be the
relation on A defined by
? 4. Let U be a nonempty set, and let R be the “subset relation” on P.U /. That
is,
R D f.S; T / 2 P.U / P.U / j S T g:
(a) Write the open sentence .S; T / 2 R using standard subset notation.
(b) What is the domain of this subset relation, R?
(c) What is the range of this subset relation, R?
(d) Is R a function from P.U / to P.U /? Explain.
5. Let U be a nonempty set, and let R be the “element of” relation from U to
P .U /. That is,
?
˚
6. Let S D .x; y/ 2 R R j x 2 C y 2 D 100 .
(a) Determine the set of all values of x such that .x; 6/ 2 S , and determine
the set of all values of x such that .x; 9/ 2 S.
(b) Determine the domain and range of the relation S and write each set
using set builder notation.
(c) Is the relation S a function from R to R? Explain.
(d) Since S is a relation on R, its elements can be graphed in the coordinate
plane. Describe the graph of the relation S . Is the graph consistent with
your answers in Exercises (6a) through (6c)? Explain.
What is the connection between this relation and the relation in Exercise (6)?
8. Determine the domain and range of each of the following relations on R and
sketch the graph of each relation.
˚
(a) R D .x; y/ 2 R R j x 2 C y 2 D 10
˚
(b) S D .x; y/ 2 R R j y 2 D x C 10
(c) T D f.x; y/ 2 R R j jxj C jyj D 10g
˚
(d) R D .x; y/ 2 R R j x 2 D y 2
? (a) Use set builder notation to describe the relation R as a set of ordered
pairs.
? (b) Determine the domain and range of the relation R .
(c) Use the roster method to specify the set of all integers x such that x R 5
and the set of all integers x such that 5 R x.
(d) If possible, find integers x and y such that x R 8, 8 R y, but x 6R y.
7.1. Relations 373
(e) If b 2 Z, use the roster method to specify the set of all x 2 Z such that
x R b.
10. Let R< D f.x; y/ 2 R R j x < yg. This means that R< is the “less than”
relation on R.
Now that we know about relations, we see that f 1 is always a relation from
B to A. The concept of the inverse of a function is actually a special case of
the more general concept of the inverse of a relation, which we now define.
Definition. Let R be a relation from the set A to the set B. The inverse of R,
written R 1 and read “R inverse,” is the relation from B to A defined by
1
R D f.y; x/ 2 B A j .x; y/ 2 Rg , or
1
R D f.y; x/ 2 B A j x R yg:
That is, R 1 is the subset of B A consisting of all ordered pairs .y; x/ such
that x R y.
For example, let D be the “divides” relation on Z. See Progress Check 7.3.
So
D D f.m; n/ 2 Z Z j m divides ng:
374 Chapter 7. Equivalence Relations
This means that we can write m j n if and only if .m; n/ 2 D. So, in this
case,
D 1 D f.n; m/ 2 Z Z j .m; n/ 2 Dg
D f.n; m/ 2 Z Z j m divides ng:
Now, if we would like to focus on the first coordinate instead of the second
coordinate in D 1 , we know that “m divides n” means the same thing as “n
is a multiple of m.” Hence,
1
D D f.n; m/ 2 Z Z j n is a multiple of mg:
We can say that the inverse of the “divides” relation on Z is the “is a multiple
of” relation on Z.
Theorem 7.6, which follows, contains some elementary facts about inverse
relations.
Theorem 7.6. Let R be a relation from the set A to the set B. Then
The domain of R 1 is the range of R. That is, dom R 1 D range.R/.
1 1
The range of R is the domain of R. That is, range R D dom.R/.
1 1
1
The inverse of R is R. That is, R D R.
To prove the first part of Theorem 7.6, observe that the goal is to prove that
two sets are equal,
dom R 1 D range.R/:
One way to do this is to prove that each is a subset of the other. To prove
that dom R 1 range.R/, we can start by choosing an arbitrary ele-
1 1
ment of dom R . So let y 2 dom R . The goal now is to prove that
y 2 range.R/. What does it mean to say that y 2 dom R 1 ? It means
that there exists an x 2 A such that
1
.y; x/ 2 R :
1
Now what does it mean to say that .y; x/ 2 R ? It means that .x; y/ 2 R.
What does this tell us about y?
Complete the proof of the first part of Theorem 7.6. Then, complete the
proofs of the other two parts of Theorem 7.6.
7.2. Equivalence Relations 375
1. Carefully explain what it means to say that the relation R is not reflexive on
the set A.
2. Carefully explain what it means to say that the relation R is not symmetric.
3. Carefully explain what it means to say that the relation R is not transitive.
376 Chapter 7. Equivalence Relations
To illustrate these properties, we let A D f1; 2; 3; 4g and define the relations R and
T on A as follows:
R D f.1; 1/; .2; 2/; .3; 3/; .4; 4/; .1; 3/; .3; 2/g
T D f.1; 1/; .1; 4/; .2; 4/; .4; 1/; .4; 2/g
4. Draw a directed graph for the relation R. Then explain why the relation R is
reflexive on A, is not symmetric, and is not transitive.
3. Carefully review Theorem 3.30 and the proofs given on page 148 of Sec-
tion 3.5. In terms of the properties of relations introduced in Preview Activ-
ity 1, what does this theorem say about the relation of congruence modulo n
on the integers?
4. Write a complete statement of Theorem 3.31 on page 150 and Corollary 3.32.
5. Write a proof of the symmetric property for congruence modulo n. That is,
prove the following:
Let a; b 2 Z and let n 2 N. If a b .mod n/, then b a .mod n/.
x y
x y
z
378 Chapter 7. Equivalence Relations
R D f.a; a/; .b; b/; .a; c/; .c; a/; .b; d /; .d; b/g:
Draw a directed graph for the relation R and then determine if the relation R is
reflexive on A, if the relation R is symmetric, and if the relation R is transitive.
the other hand, are defined by conditional sentences. We often use a direct proof
for these properties, and so we start by assuming the hypothesis and then showing
that the conclusion must follow from the hypothesis.
Now assume that x M y and y M z. Then there exist integers p and q such
that
x D yp and y D zq:
Using the second equation to make a substitution in the first equation, we see
that x D z .pq/. Since pq 2 Z, we have shown that x is a multiple of z and
hence x M z. Therefore, M is a transitive relation.
3 7 3 7
since D 1 and 1 2 Z.
4 4 4 4
3 1 3 1 1 1
6 since D and … Z.
4 2 4 2 4 4
Congruence Modulo n
One of the important equivalence relations we will study in detail is that of con-
gruence modulo n. We reviewed this relation in Preview Activity 2.
Theorem 3.30 on page 148 tells us that congruence modulo n is an equivalence
relation on Z. Recall that by the Division Algorithm, if a 2 Z, then there exist
unique integers q and r such that
a D nq C r and 0 r < n:
Theorem 3.31 and Corollary 3.32 then tell us that a r .mod n/. That is, a is
congruent modulo n to its remainder r when it is divided by n. When we use the
term “remainder” in this context, we always mean the remainder r with 0 r < n
that is guaranteed by the Division Algorithm. We can use this idea to prove the
following theorem.
Proof. Let n 2 N and let a; b 2 Z. We will first prove that if a and b have the
same remainder when divided by n, then a b .mod n/. So assume that a and b
have the same remainder when divided by n, and let r be this common remainder.
Then, by Theorem 3.31,
We can now use the transitive property to conclude that a b .mod n/. This
proves that if a and b have the same remainder when divided by n, then
a b .mod n/.
We will now prove that if a b .mod n/, then a and b have the same re-
mainder when divided by n. Assume that a b .mod n/, and let r be the least
nonnegative remainder when b is divided by n. Then 0 r < n and, by Theo-
rem 3.31,
b r .mod n/:
7.2. Equivalence Relations 381
Now, using the facts that a b .mod n/ and b r .mod n/, we can use the
transitive property to conclude that
a r .mod n/:
a D nq C r:
Since we already know that 0 r < n, the last equation tells us that r is the
least nonnegative remainder when a is divided by n. Hence we have proven that if
a b .mod n/, then a and b have the same remainder when divided by n.
a b D 2k:
. 1/.a b/ D . 1/.2k /
b a D 2. k/:
For the definition of the cardinality of a finite set, see page 223. This relation states
that two subsets of U are equivalent provided that they have the same number of
elements. Prove that is an equivalence relation on
7.2. Equivalence Relations 383
Exercises 7.2
? 1. Let A D fa; bg and let R D f.a; b/g. Is R an equivalence relation on A? If
not, is R reflexive, symmetric, or transitive? Justify all conclusions.
2. Let A D fa; b; cg. For each of the following, draw a directed graph that
represents a relation with the specified properties.
IA D f.1; 1/; .2; 2/; .3; 3/; .4; 4/; .5; 5/g :
11. Let U be a finite, nonempty set and let P.U / be the power set of U . That
is, P.U / is the set of all subsets of U . Define the relation on P.U / as
follows: For A; B 2 P .U /, A B if and only if A \ B D ;. That is, the
ordered pair .A; B/ is in the relation if and only if A and B are disjoint.
Is the relation an equivalence relation on P.U /? If not, is it reflexive,
symmetric, or transitive? Justify all conclusions.
12. Let U be a nonempty set and let P.U / be the power set of U . That is, P .U /
is the set of all subsets of U .
For A and B in P.U /, define A B to mean that there exists a bijection
f W A ! B. Prove that is an equivalence relation on P.U /.
Hint: Use results from Sections 6.4 and 6.5.
7.2. Equivalence Relations 385
2 .a C 2b/ 2 0 .mod 3/
.2a C 4b/ 0 .mod 3/
.2a C b/ 0 .mod 3/
.b C 2a/ 0 .mod 3/ :
(e) Carefully explain what it means to say that a relation on a set A is not
antisymmetric.
(f) Let A D f1; 2; 3g. Draw a directed graph of a relation on A that is
antisymmetric and draw a directed graph of a relation on A that is not
antisymmetric.
(g) Are the following propositions true or false? Justify all conclusions.
If a relation R on a set A is both symmetric and antisymmetric,
then R is transitive.
If a relation R on a set A is both symmetric and antisymmetric,
then R is reflexive.
RŒy D fx 2 A j x R yg :
388 Chapter 7. Equivalence Relations
That is, RŒy consists of those elements in A such that x R y. For example, using
y D a, we see that a R a, b R a,and e R a, and so RŒa D fa; b; eg.
2. Draw a directed graph for the relation R and explain why R is an equivalence
relation on A.
3. Which of the sets RŒa, RŒb, RŒc, RŒd , and RŒe are equal?
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 is 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 D fa; b; c; d; eg, and let S be the relation on the set A defined as follows:
bS b cS c dSd eS e
aS b aS d bS c
cS d dSc
S Œy D fx 2 A j x S yg D fx 2 A j .x; y/ 2 S g :
For example, using y D b, we see that S Œb D fa; bg since .a; b/ 2 S and
.b; b/ 2 S . In addition, we see that S Œa D ; since there is no x 2 A such that
.x; a/ 2 S .
7. Which of the sets S Œa, S Œb, S Œc, S Œd , and S Œe are equal?
C Œ0 D f; : : : ; 9; 6; 3; 0; 3; 6; 9; : : :g :
(a) The set C Œ1 of all integers a that are congruent to 1 modulo 3. That is,
C Œ1 D fa 2 Z j a 1 .mod 3/g:
(b) The set C Œ2 of all integers a that are congruent to 2 modulo 3. That is,
C Œ2 D fa 2 Z j a 2 .mod 3/g:
(c) The set C Œ3 of all integers a that are congruent to 3 modulo 3. That is,
C Œ3 D fa 2 Z j a 3 .mod 3/g:
(a) Determine the intersection of any two of these sets. That is, determine
C Œ0 \ C Œ1, C Œ0 \ C Œ2, and C Œ1 \ C Œ2.
(b) Let n D 734. What is the remainder when n is divided by 3? Which of
the three sets, if any, contains n D 734?
(c) Repeat Part (2b) for n D 79 and for n D 79.
(d) Do you think that C Œ0 [ C Œ1 [ C Œ2 D Z? Explain.
(e) Is the set C Œ3 equal to one of the sets C Œ0; C Œ1, or C Œ2?
(f) We can also define C Œ4 D fa 2 Z j a 4 .mod 3/g: Is this set equal
to any of the previous sets we have studied in this part? Explain.
390 Chapter 7. Equivalence Relations
The main results that we want to use now are Theorem 3.31 and Corollary 3.32 on
page 150. This corollary tells us that for any a 2 Z, 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
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 Z, 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
C Œ0 consisting of C Œ1 consisting of C Œ2 consisting of
all integers with a all integers with a all integers with a
remainder of 0 when remainder of 1 when remainder of 2 when
divided by 3 divided by 3 divided by 3
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.
7.3. Equivalence Classes 391
Œa D fx 2 A j x ag:
Notes
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 ŒaR 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 a 2 A, then
the equivalence class Œa is a subset of A.
2. We know that each integer has an equivalence class for the equivalence rela-
tion 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:
In Preview 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.
392 Chapter 7. Equivalence Relations
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.
a b and b y.
We use the transitive property to conclude that a y and then, using the symmetric
property, we conclude that y a. This proves that y 2 Œa and, hence, that
Œb Œa. This means that we can conclude that if a b, then Œa D Œb.
We must now prove that if Œa D Œb, then a b. Let a; b 2 A and assume
that Œa D Œb. Using the first part of the theorem, we know that a 2 Œa and since
the two sets are equal, this tells us that a 2 Œb. Hence by the definition of Œb, we
conclude that a b. This completes the proof of the second part of the theorem.
For the third part of the theorem, let a; b 2 A. Since this part of the theorem is
a disjunction, we will consider two cases: Either
Œa \ Œb D ; or Œa \ Œb ¤ ;:
In the case where Œa \ Œb D ;, 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 D Œb. Since Œa \ Œb ¤ ;, there is an element x in A such that
x 2 Œa \ Œb:
This means that x 2 Œa and x 2 Œb. Consequently, x a and x b, and so we
can use the second part of the theorem to conclude that Œx D Œa and Œx D Œb.
Hence, Œa D Œb, and we have proven that Œa D Œb or Œa \ Œb D ;.
394 Chapter 7. Equivalence Relations
The results of Theorem 7.14 are consistent with all the equivalence relations
studied in the preview 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.
7.3. Equivalence Classes 395
Corollary 7.16. Let n 2 N. For each a 2 Z, let Œa represent the congruence class
of a modulo n.
For the equivalence relation of congruence modulo n, Theorem 3.31 and Corol-
lary 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; : : : ; n 1. This means that each integer is in precisely one of the congru-
ence classes Œ0, Œ1, Œ2; : : : ; Œn 1. Hence, Corollary 7.16 gives us the following
result.
Corollary 7.17. Let n 2 N. For each a 2 Z, let Œa represent the congruence class
of a modulo n.
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.
1. For each V 2 C, V ¤ ;.
3. For every V; W 2 C, V D W or V \ W D ;.
396 Chapter 7. Equivalence Relations
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 C 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 C be the
collection of all equivalence classes determined by . That is,
C D fŒa j a 2 Ag:
Exercises 7.3
?
1. Let A D fa; b; c; d; eg and let be the relation on A that is represented by
the directed graph in Figure 7.4.
7.3. Equivalence Classes 397
b c
d e
Prove that is an equivalence relation on the set A, and determine all of the
equivalence classes determined by this equivalence relation.
?
2. Let A D fa; b; c; d; e; f g, and assume that is an equivalence relation on
A. Also assume that it is known that
ab a 6 c ef
ad a 6 f e 6 c.
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. Let A D f0; 1; 2; 3; : : : ; 999; 1000g. Define the relation R on A as follows:
For x; y 2 A, x R y 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. Determine all of the congruence classes for the relation of congruence mod-
ulo 5 on the set of integers.
(d) Determine at least four different elements in Œ.2; 3/, the equivalence
class of .2; 3/.
(e) Use set builder notation to describe Œ.2; 3/, the equivalence class of
.2; 3/.
(b) Prove that is an equivalence relation on the set A, and then deter-
mine all the equivalence classes for . How does the collection of all
equivalence classes compare to C?
400 Chapter 7. Equivalence Relations
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 C be a partition of A. We then define a relation on A as follows:
For x; y 2 A, x y if and only if there exists a set U in C such that
x 2 U and y 2 U.
1. Find five different integers a such that a 3 .mod 6/ and find five different
integers b such that b 4 .mod 6/. That is, find five different integers in
Œ3, the congruence class of 3 modulo 6 and five different integers in Œ4, the
congruence class of 4 modulo 6.
2. Calculate s D a Cb using several values of a in Œ3 and several values of b in
Œ4 from Part (1). For each sum s that is calculated, find r so that 0 r < 6
and s r .mod 6/. What do you observe?
7.4. Modular Arithmetic 401
4. Calculate q D a2 using several values of a in Œ3 from Part (1). For each
product q that is calculated, find r so that 0 r < 6 and q r .mod 6/.
What do you observe?
a D bq C r and 0 r < b:
In this activity, we are interested in the remainder r. Notice that r D a bq. So,
given a and b, if we can calculate q, then we can calculate r.
We can use the “int” function on a calculator to calculate q. [The “int” function
is the “greatest integer function.” If x is a real number, then int.x/ is the greatest
integer that is less than or equal to x.]
a
So, in the context of the Division Algorithm, q D int . Consequently,
b
a
r D a b int :
b
If n is a positive integer, we will let s .n/ denote the sum of the digits of n. For
example, if n D 731, then
s.731/ D 7 C 3 C 1 D 11:
Do we get the same result if we add Œ9 and Œ7 in the way we did when we added
Œ4 and Œ2? The following computation confirms that we do:
Œ9 ˚ Œ7 D Œ9 C 7
D Œ16
D Œ1:
This is one of the ideas that was explored in Preview Activity 1. The main differ-
ence is that in this preview activity, we used the relation of congruence, and here
we are using congruence classes. All of the examples in Preview Activity 1 should
have illustrated the properties of congruence modulo 6 in the following table. The
left side shows the properties in terms of the congruence relation and the right side
shows the properties in terms of the congruence classes.
If a 3 .mod 6/ and b 4 .mod 6/, then If Œa D Œ3 and Œb D Œ4 in
Z6 , then
.a C b/ .3 C 4/ .mod 6/;
Œa C b D Œ3 C 4;
.a b/ .3 4/ .mod 6/.
Œa b D Œ3 4.
These are illustrations of general properties that we have already proved in Theo-
rem 3.28. We repeat the statement of the theorem here because it is so important
for defining the operations of addition and multiplication in Zn .
Theorem 3.28 Let n be a natural number and let a; b; c; and d be integers. Then
Since x y .mod n/ if and only if Œx D Œy, we can restate the result of this
Theorem 3.28 in terms of congruence classes in Zn .
Corollary 7.19. Let n be a natural number and let a; b; c and d be integers. Then,
in Zn ,
404 Chapter 7. Equivalence Relations
Because of Corollary 7.19, we know that the following formal definition of ad-
dition and multiplication of congruence classes in Zn is independent of the choice
of the elements we choose from each class. We say that these definitions of addi-
tion and multiplication are well defined.
2. Verify that the following addition and multiplication tables for Z5 are cor-
rect.
˚ Œ0 Œ1 Œ2 Œ3 Œ4 ˇ Œ0 Œ1 Œ2 Œ3 Œ4
Œ0 Œ0 Œ1 Œ2 Œ3 Œ4 Œ0 Œ0 Œ0 Œ0 Œ0 Œ0
Œ1 Œ1 Œ2 Œ3 Œ4 Œ0 Œ1 Œ0 Œ1 Œ2 Œ3 Œ4
Œ2 Œ2 Œ3 Œ4 Œ0 Œ1 Œ2 Œ0 Œ2 Œ4 Œ1 Œ3
Œ3 Œ3 Œ4 Œ0 Œ1 Œ2 Œ3 Œ0 Œ3 Œ1 Œ4 Œ2
Œ4 Œ4 Œ0 Œ1 Œ2 Œ3 Œ4 Œ0 Œ4 Œ3 Œ2 Œ1
4. In the integers, the following statement is true. We sometimes call this the
zero product property for the integers.
For all a; b 2 Z, if a b D 0, then a D 0 or b D 0.
Write the contrapositive of the conditional statement in this property.
(a) For all Œa; Œb 2 Z5 , if Œa ˇ Œb D Œ0, then Œa D Œ0 or Œb D Œ0.
(b) For all Œa; Œb 2 Z6 , if Œa ˇ Œb D Œ0, then Œa D Œ0 or Œb D Œ0.
Divisibility Tests
Congruence arithmetic can be used to proof certain divisibility tests. For example,
you may have learned that a natural number is divisible by 9 if the sum of its
digits is divisible by 9. As an easy example, note that the sum of the digits of
5823 is equal to 5 C 8 C 2 C 3 D 18, and we know that 18 is divisible by 9.
It can also be verified that 5823 is divisible by 9. (The quotient is 647.) We can
actually generalize this property by dealing with remainders when a natural number
is divided by 9.
Let n 2 N and let s.n/ denote the sum of the digits of n. For example, if
n D 7319, then s.7319/ D 7 C 3 C 1 C 9 D 20. In Preview Activity 2, we saw
that
406 Chapter 7. Equivalence Relations
In fact, for every example in Preview Activity 2, we saw that n and s.n/ were
congruent modulo 9 since they both had the same remainder when divided by 9.
The concepts of congruence and congruence classes can help prove that this is
always true.
We will use the case of n D 7319 to illustrate the general process. We must
use our standard place value system. By this, we mean that we will write 7319 as
follows:
7319 D 7 103 C 3 102 C 1 101 C 9 100 : (1)
The idea is to now use the definition of addition and multiplication in Z9 to convert
equation (1) to an equation in Z9 . We do this as follows:
Œ7319 D Œ 7 103 C 3 102 C 1 101 C 9 100
D Œ7 103 ˚ Œ3 102 ˚ Œ1 101 ˚ Œ9 100
D Œ7 ˇ Œ103 ˚ Œ3 ˇ Œ102 ˚ Œ1 ˇ Œ101 ˚ .Œ9 ˇ Œ1/ : (2)
Since 103 1 .mod 9/, 102 1 .mod 9/ and 10 1 .mod 9/, we can conclude
that Œ103 D Œ1, Œ102 D Œ1 and Œ10 D Œ1. Hence, we can use these facts and
equation (2) to obtain
Œ7319 D Œ7 ˇ Œ103 ˚ Œ3 ˇ Œ102 ˚ .Œ1 ˇ Œ10/ ˚ .Œ9 ˇ Œ1/
D .Œ7 ˇ Œ1/ ˚ .Œ3 ˇ Œ1/ ˚ .Œ1 ˇ Œ1/ ˚ .Œ9 ˇ Œ1/
D Œ7 ˚ Œ3 ˚ Œ1 ˚ Œ9
D Œ7 C 3 C 1 C 9: (3)
Equation (3) tells us that 7319 has the same remainder when divided by 9 as the
sum of its digits. It is easy to check that the sum of the digits is 20 and hence has a
remainder of 2. This means that when 7319 is divided by 9, the remainder is 2.
To prove that any natural number has the same remainder when divided by 9
as the sum of its digits, it is helpful to introduce notation for the decimal represen-
tation of a natural number. The notation we will use is similar to the notation for
the number 7319 in equation (1).
In general, if n 2 N, and n D ak ak 1 a1 a0 is the decimal representation of
n, then
n D ak 10k C ak 1 10k 1 C C a1 101 C a0 100 :
7.4. Modular Arithmetic 407
Part (3) of Theorem 7.22 is called a divisibility test. If gives a necessary and
sufficient condition for a natural number to be divisible by 9. Other divisibility tests
will be explored in the exercises. Most of these divisibility tests can be proved in a
manner similar to the proof of the divisibility test for 9.
408 Chapter 7. Equivalence Relations
Exercises 7.4
?
(a) Œx2 D Œ1 in Z4 ?
(e) Œx2 ˚ Œ1 D Œ0 in Z5
(b) Œx2 D Œ1 in Z8 (f) Œ3 ˇ Œx ˚ Œ2 D Œ0 in Z5
(c) Œx4 D Œ1 in Z5 ? (g) Œ3 ˇ Œx ˚ Œ2 D Œ0 in Z6
(d) Œx2 ˚ Œ3 ˇ Œx D Œ3 in Z6 (h) Œ3 ˇ Œx ˚ Œ2 D Œ0 in Z9
?
3. In each case, determine if the statement is true or false.
(a) For all Œa 2 Z6 , if Œa ¤ Œ0, then there exists a Œb 2 Z6 such that
Œa ˇ Œb D Œ1.
(b) For all Œa 2 Z5 , if Œa ¤ Œ0, then there exists a Œb 2 Z5 such that
Œa ˇ Œb D Œ1.
(a) For all Œa; Œb 2 Z6 , if Œa ¤ Œ0 and Œb ¤ Œ0, then Œa ˇ Œb ¤ Œ0.
(b) For all Œa; Œb 2 Z5 , if Œa ¤ Œ0 and Œb ¤ Œ0, then Œa ˇ Œb ¤ Œ0.
8. Let n 2 N and let s.n/ denote the sum of the digits of n. So if we write
n D ak 10k C ak 1 10k 1 C C a1 101 C a0 100 ;
Use the result in Exercise (9) to help prove each of the following:
Use the result in Exercise (11) to help prove each of the following:
Use the result in Exercise (13) to help develop a divisibility test for 8. Prove
that your divisibility test is correct.
Use the result in Exercise (15) to help prove each of the following:
P
k
(a) n . 1/j aj .mod 11/.
j D0
k
P
(b) Œn D Œ . 1/j aj , using congruence classes modulo 11.
j D0
P
k
(c) 11 divides n if and only if 11 divides . 1/j aj .
j D0
21. Using Congruence Modulo 4. The set Zn is a finite set, and hence one
way to prove things about Zn is to simply use the n elements in Zn as the n
cases for a proof using cases. For example, if n 2 Z, then in Z4 , Œn D Œ0,
Œn D Œ1, Œn D Œ2, or Œn D Œ3.
(a) Prove that if n 2 Z, then in Z4 , Œn2 D Œ0 or Œn2 D Œ1. Use this to
conclude that in Z4 , Œn2 D Œ0 or Œn2 D Œ1.
(b) Translate the equations n2 D Œ0 and n2 D Œ1 in Z4 into congru-
ences modulo 4.
(c) Use a result in Exercise (12) to determine the value of r so that r 2 Z,
0 r < 3, and
Important Definitions
412 Chapter 7. Equivalence Relations
Theorem 7.6. Let R be a relation from the set A to the set B. Then
1 1
1. The domain of R is the range of R. That is, dom.R / D range.R/.
1 1
2. The range of R is the domain of R. That is, range.R / D dom.R/.
1 1
1
3. The inverse of R is R. That is, R D R.
Corollary 7.16. Let n 2 N. For each a 2 Z, let Œa represent the congruence
class of a modulo n.
Corollary 7.17. Let n 2 N. For each a 2 Z, let Œa represent the congruence
class of a modulo n.