0.5 Relations, Equivalence Classes, and Quotients
Mathematics constantly declares different-looking
things to be “the same”:
0.5.1. Relations
Before we can say what a good notion of sameness is,
we need a word for any way of comparing two elements of
a set, good or bad. Examples are
A relation on a set
- (a) On
: . The pairs and belong to the relation, does not. - (b) On
: (“ divides ”), meaning for some . So and , but . - (c) On
: if . As a subset of this relation is the unit circle, so a relation can literally be a picture. - (d) On any set
: the empty relation , in which nothing is related to anything, and the full relation , in which everything is related to everything. These two extremes are useful test cases for every property below.
Every subset of
0.5.2. Equivalence relations
What must any reasonable notion of “
An equivalence relation is a way of declaring elements “the same” that behaves like equality: everything is the same as itself, sameness goes both ways, and it can be chained.
A relation
- (E1)
Reflexive:
for every . - (E2)
Symmetric: for all
, if then . - (E3)
Transitive: for all
, if and then .
In words: (E1) asks every single element to be
related to itself, with no exceptions. (E2) says the
relation cannot be one-way. (E3) says a chain of two
links can be shortened to one link, and so, by applying
it repeatedly, can any finite chain. When
The standard move for checking an equivalence
relation is to write three short paragraphs, one per
condition, each starting from its hypothesis (“Let
Show that each of the following is an equivalence relation.
- (a) Equality on any
set
: if . - (b)
Congruence modulo
on , for a fixed integer : if . - (c) “Same length” on
the set
of finite strings of the letters : if and have the same number of letters. - (d) “Same value”:
for a function
, put if . - (e) Fractions: on
, put if .
Solution.
(a) Every
equals itself; gives ; and give . Equality is the degenerate case: it is the equivalence relation that identifies nothing new, and the model the other examples imitate.(b) Reflexive. Let
. Then , so . Symmetric. Suppose with . Then , so . Transitive. Suppose and with . Then , so . For this is “same parity”: says and are both even or both odd.(c) This is the special case of (d) in which
sends a string to its length, so it follows from (d), whose proof does not use (c).(d) Reflexive:
. Symmetric: gives . Transitive: and give . Each condition is inherited from the same property of equality in . Many equivalence relations are of this form: “same distance from the origin” on is for .(e) Reflexive:
, so . Symmetric: gives , which says . Transitive: suppose and . Multiplying the first equation by and the second by gives . Hence . Since , we get , that is, . Transitivity is exactly where second entries must be nonzero: with allowed, but .
Minimal changes to these examples show that each condition can fail on its own.
Decide which of (E1)–(E3) each relation satisfies.
- (a)
on . - (b) On
: if . - (c) On
: if .
Solution.
(a) Change “
” to “ ”. Reflexivity survives ( ) and so does transitivity ( gives ). Symmetry fails: but .(b) Change “
” (which is equality) to “ ”. Reflexivity survives, since , and so does symmetry, since . Transitivity fails: and , but . “Close to” cannot be chained; many small steps make a big one.(c) Symmetry holds, since
. Transitivity holds: if and , then , and since this gives . Reflexivity fails, at exactly one point: , so . On the same rule is an equivalence relation (“same sign”).
Warning. A tempting argument claims
that (E1) follows from (E2) and (E3): “if
Quick check. On
Solution. No. It is reflexive
(
Why these three conditions. They are
precisely what the next subsection needs. Reflexivity
will guarantee that every element lies in its own class,
so no class is empty and nothing is lost. Symmetry and
transitivity together will guarantee that two classes
are either identical or disjoint. Drop any one of them
and the picture of
Remark. Two equivalence relations on matrices are central later: row equivalence, which records that one matrix can be reached from another by row operations, and similarity, which records that two square matrices describe the same linear map in different coordinates. Both are introduced once matrices are available, later in this chapter, and studied in Chapters 3 and 4.
0.5.3. Equivalence classes and partitions
Once we have decided which elements count as the same, it is natural to collect everything that is the same as a given element into one set.
Let
The word “representative” is chosen carefully. A
class is one set, but it usually has many names:
- (a) For equality on
, . Every class has one element. - (b) For congruence
modulo
on : Here and : one class, many names. - (c) For “same
length” on strings of
, the class of is , and the class of the empty string contains only the empty string. - (d) For the full
relation
on a nonempty set , there is a single class, . - (e) For “same
distance from the origin” on
, the class of is the circle of radius centered at the origin. The class of the origin is the one-point set .
In example (e), the classes look like this. Each circle is one class; the origin on its own is another.
The picture suggests two facts: every point lies on exactly one circle, and two different circles never meet. Both hold for every equivalence relation, and the proof is where the three conditions do their work.
Let
- (a)
if and only if . - (b) Either
or .
Proof.
- (a)
Suppose . By reflexivity , so , which means . Suppose . Let , so . Since , transitivity gives , so . Hence . By symmetry , and swapping the roles of and in the argument gives . By Theorem 0.3.1, . - (b) Suppose
, and let . Then and . By symmetry , and by transitivity . By (a), .
Part (a) is the working form of the lemma: to show two classes are equal, show one representative is equivalent to the other. The picture of nonoverlapping pieces that cover everything has its own name.
A partition of a set
- (P1) every block is nonempty;
- (P2)
distinct blocks are disjoint: if
and , then ; - (P3) the blocks
cover
: every lies in some block.
By (P2) and (P3), every element of
Quick check. Is
Solution. Neither. The first
contains the empty block, so (P1) fails, even though
(P2) and (P3) hold. The second does not cover
The main theorem says that equivalence relations and
partitions are two descriptions of the same thing:
“which elements are the same” and “how
Let
- (a) If
is an equivalence relation on , then the set of its equivalence classes is a partition of . - (b) If
is a partition of , then the relation “ if and lie in the same block” is an equivalence relation on , and its equivalence classes are exactly the blocks of . - (c) The two
constructions undo each other: starting from
, the relation defined in (b) by the partition in (a) is again.
Idea. Part (a) is the lemma plus
reflexivity: (P1) and (P3) come from
Proof.
(a) Let
. For every , reflexivity gives . Hence every class is nonempty, which is (P1), and every element lies in some class, which is (P3). If , then by Lemma 0.5.1 (b), which is (P2). Hence is a partition of .(b) Reflexive. Let
. By (P3), lies in some block, so . Symmetric. “ and lie in a common block” does not depend on the order of and . Transitive. Suppose and for blocks . Then , so by (P2). Hence , and .Now let
and ; we show , where the class is taken for . If , then and lie in a common block ; since , (P2) gives , so . If , then and both lie in , so and . Hence by Theorem 0.3.1. Every class is therefore the block containing , which exists by (P3); and every block is a class, namely for any , which exists by (P1). So the classes are exactly the blocks.- (c) Let
be an equivalence relation, and let be the relation built by (b) from the classes of . If , then , so . Conversely, if , then for some ; thus and , and symmetry and transitivity give . Hence and are the same relation. This proves the theorem.
So whenever you meet an equivalence relation, you may think of it as a way of cutting the set into nonoverlapping pieces, and vice versa. Exercise C2 uses this to count equivalence relations by counting partitions instead.
0.5.4. Quotient sets
Now we take the decisive step: treat each piece as a
single new element. The time of day is the classic case.
Hours counted from some starting moment are integers,
but a clock only records the class of the hour modulo
Let
The elements of
(a) For an integer
, the quotient of by congruence modulo is written . Show that it has exactly elements, namely .(b) Describe the quotient of the set
of strings in by “same length”, and of by “same distance from the origin”.
Solution.
(a) Let
. By division with remainder (Exercise (C2: Division with remainder)), with and . Then , so , and by Lemma 0.5.1 (a). Hence every class is one of . These are distinct: if , then , so is not a multiple of , hence and by Lemma 0.5.1 (a). So has exactly elements.(b) Two strings are identified exactly when they have the same length, so there is one class for each length
: the set of all strings of length . Similarly, modulo “same distance” has one class for each radius : the circle of radius , or the origin when . In both cases the quotient is “the same as” the set of values or , and the next subsection makes that precise.
0.5.5. Functions on a quotient
We want to compute with classes. On a clock, “three
hours after 11 o’clock” is 2 o’clock, which is really
addition on
Here is that failure in its simplest form.
Let
Solution. No. Since
By contrast, “
The contrast in that example is the whole story, and
the following theorem turns it into a test. A function
Let
- (a) If
whenever , then there is exactly one function with for every , that is, . - (b) Conversely, if
some function
satisfies , then whenever .
Idea. The formula
Proof.
- (a) Let
. By Definition 0.5.5, for some , so is nonempty, and hence the image is nonempty. If , then by Lemma 0.5.1 (a) applied to and ; hence by the same lemma, and by hypothesis. Therefore has exactly one element, and we define to be that element. This assigns exactly one value to each class, so is a function. For , we have by reflexivity, so , that is, .For uniqueness, suppose
also satisfies for every . Every class is for some , and there . Hence . - (b) Suppose
and . By Lemma 0.5.1 (a), . Hence , as claimed.
In practice we rarely name
The most important application in this chapter is
arithmetic modulo
Fix an integer
Solution. We must show that the
value
In
This is the same principle as Theorem 0.5.3, applied
to a function of two variables. The same check (Exercise (B3: Multiplication modulo
Warning. A rule written in terms of
a representative is not automatically a function on
classes. Define it, then check it. For example, “
Quick check. Which of these rules
defines a function? (i)
Solution.
(i) Yes. If
, then , so .(ii) No.
, but , since is not a multiple of . The first works because ; the second fails because .
0.5.6. Exercises
A. Check your understanding
- (a) State the three
conditions for a relation
on to be an equivalence relation. - (b) True or false: a symmetric and transitive relation is automatically reflexive. Give a reason.
- (c) True or false:
if two equivalence classes
and have an element in common, then . - (d) You want to
define a function on
by a formula in a representative . What must you check? - (e) How many
elements does
have? Is in ?
Solution.
(a) Reflexive:
for every . Symmetric: implies . Transitive: and imply .(b) False. On
, if is symmetric and transitive, but ; see Example (Relations that are not equivalence relations) (c) and the warning after it.(c) True. By Lemma 0.5.1 (b) the classes are equal, and by part (a) of the same lemma
.(d) That equivalent representatives give the same value: if
, the formula gives the same result for and . By Theorem 0.5.3 this is exactly what is needed.(e) Five, by Example (Quotient sets) (a). Yes:
, so , and both classes equal .
B. Practice
Determine which of the following are equivalence relations. For those that are, describe the equivalence classes. For those that are not, name a condition that fails with a specific witness.
- (a) On
: if is even. - (b) On
: if is odd. - (c) On
: if . - (d) On
: if and have a common divisor greater than . - (e) On the set of
all subsets of
: if and have the same number of elements.
Solution.
(a) Equivalence relation. Reflexive:
is even. Symmetric: . Transitive: if and are even, then is a sum of even integers, hence even (Proposition 0.2.1). There are two classes: the even integers and the odd integers. (In fact is even exactly when is even, so this is congruence modulo .)(b) Not an equivalence relation. Reflexivity fails:
is even, so . (Transitivity also fails: and , but is even.)(c) Equivalence relation. Reflexive:
. Symmetric: if , then . Transitive: if and with , then . The class of is , the points at integer distance from in either direction. Each class contains exactly one number in , namely .(d) Not an equivalence relation. Reflexivity fails at
: the only positive divisor of is . Transitivity also fails: (common divisor ) and (common divisor ), but and have no common divisor greater than .(e) Equivalence relation, since it is “same value” (Example (Equivalence relations) (d)) for the function
. There are four classes: ; ; ; .
On
- (a) Prove that
is an equivalence relation. - (b) Describe the
class of
geometrically, and draw several classes. - (c) Show that
is a well-defined function , and that it is a bijection.
Solution.
(a) This is “same value” for
, , so it is an equivalence relation by Example (Equivalence relations) (d). Directly: ; equality of the numbers and is symmetric and transitive.(b) Put
. Then , the line of slope through , which meets the -axis at . The classes are all the lines parallel to : each point of the plane lies on exactly one of them, as Theorem 0.5.2 predicts.- (c) Let
. If , then by the definition of . By Theorem 0.5.3 (a), there is a function with .
Injective. Suppose
Surjective. Let
Hence
Fix an integer
- (a) Prove that
is a well-defined operation on . - (b) Write out the
multiplication table of
, using the representatives . - (c) Hence find a
class
in with .
Solution.
(a) Suppose
and . By Lemma 0.5.1 (a), and for some . Then so and by the same lemma. Hence the value does not depend on the representatives, and the operation is well defined.(b) Reducing each product modulo
:For instance
and .- (c) From the table,
, while since . So a product of nonzero classes can be zero in , something that never happens with ordinary numbers.
C. Going deeper
- (a) Let
. Prove that is a well-defined function . - (b) On
, let be congruence modulo . Show that the rule does not define a function from to . - (c) On
, let be congruence modulo . Prove that does define a function from to .
Hint for (c): compute
Solution.
(a) Suppose
. By Exercise (B3: Multiplication modulo ) (a) with and , we get , that is, . Hence the value depends only on the class, and the function is well defined.(b) In
, , so . The rule sends this class to through the representative , and to through the representative . Since is not a multiple of , . So one class receives two different values, and the rule is not a function.(c) By Theorem 0.5.3 (a), it suffices to show that
implies . By symmetry of both relations we may assume , so with . First, for every , by induction on (Theorem 0.2.7): , and if , then . Hence is a multiple of , so , as claimed. The difference between (b) and (c) is that the powers of modulo repeat with period , and is not a multiple of .
- (a) List all
partitions of
. - (b) Hence deduce
that there are exactly
equivalence relations on . - (c) Write the
equivalence relation corresponding to the partition
as a subset of .
Solution.
(a) Sort by the number of blocks. One block:
. Two blocks: one block is a single element and the other the remaining pair, giving , , . Three blocks: . Four or more nonempty disjoint blocks are impossible in a three-element set. That is partitions.(b) By Theorem 0.5.2 (a), every equivalence relation gives a partition, its set of classes. By Theorem 0.5.2 (c), the relation can be recovered from that partition, so distinct equivalence relations give distinct partitions. By Theorem 0.5.2 (b), every partition arises this way. Hence equivalence relations on
correspond one to one with partitions, and there are exactly of them.(c) Two elements are related exactly when they lie in a common block:
Let
- (a) Prove that
is an equivalence relation on . - (b) Show by an
example that
need not be an equivalence relation. Which condition fails? - (c) For congruence
modulo
and modulo on , identify as a familiar relation.
Hint for (b): try congruence modulo
Solution.
(a) Reflexive. Let
. Then and , since both are reflexive, so . Symmetric. Suppose . Since and are symmetric, and , so . Transitive. Suppose . Both pairs lie in , which is transitive, so ; likewise . Hence .(b) Let
be congruence modulo and congruence modulo on . The union is still reflexive and symmetric, since each of is. But transitivity fails: since , and since , yet lies in neither, because is not a multiple of or of .(c)
means and . This holds exactly when . Indeed, if and with , then . Conversely, if , then . So is congruence modulo . The same phenomenon, where intersections behave well and unions do not, will reappear for subspaces in Chapter 1.