0.5  Relations, Equivalence Classes and Quotients

Mathematics constantly declares different-looking things to be “the same”: 12 and 24 are the same number, 14:00 and 2 p.m. are the same time, and in Chapter 4 two vectors will count as the same when their difference lies in a fixed subspace. This section makes “the same, for present purposes” precise. The notion is an equivalence relation. Gluing equivalent things together produces a new set, the quotient, and the one real danger of working with quotients is defining a function on them that secretly depends on a choice. We will learn to check for that.

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 ≤ on numbers, “divides” on integers, and “has the same birthday as” on people. What such a comparison really amounts to is the list of pairs that are related, and a list of pairs is a subset of the Cartesian product (Definition 0.3.10).

Definition 0.5.1 (Relation)

A relation on a set X is a subset R⊆X×X. When (x,y)∈R we say x is related to y and write xRy, or x∼y when the relation is fixed.

Example (Relations)
  • (a) On Z: a≤b. The pairs (1,2) and (2,2) belong to the relation, (2,1) does not.
  • (b) On Z: a∣b (“a divides b”), meaning b=ka for some k∈Z. So 3∣12 and 3∣0, but 3∤5.
  • (c) On R: x∼y if x2+y2=1. As a subset of R×R=R2 this relation is the unit circle, so a relation can literally be a picture.
  • (d) On any set X: the empty relation R=∅, in which nothing is related to anything, and the full relation R=X×X, in which everything is related to everything. These two extremes are useful test cases for every property below.

Every subset of X×X is a relation, so the definition has no non-examples. The interesting question is which properties a given relation has.

0.5.2. Equivalence relations

What must any reasonable notion of “x is the same as y” satisfy? Think of “has the same birthday as”. Everyone has the same birthday as themselves. If you share a birthday with me, I share one with you. If x shares a birthday with y, and y with z, then x shares one with z. Those three features are exactly what we ask for.

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.

Definition 0.5.2 (Equivalence relation)

A relation ∼ on a set X is an equivalence relation if it satisfies the following three conditions.

  • (E1) Reflexive: x∼x for every x∈X.
  • (E2) Symmetric: for all x,y∈X, if x∼y then y∼x.
  • (E3) Transitive: for all x,y,z∈X, if x∼y and y∼z then x∼z.

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 x∼y we say x and y are equivalent.

The standard move for checking an equivalence relation is to write three short paragraphs, one per condition, each starting from its hypothesis (“Let x∈X.”, “Suppose x∼y.”, “Suppose x∼y and y∼z.”).

Example (Equivalence relations)

Show that each of the following is an equivalence relation.

  • (a) Equality on any set X: x∼y if x=y.
  • (b) Congruence modulo n on Z, for a fixed integer n≥1: a≡b(modn) if n∣a−b.
  • (c) “Same length” on the set S of finite strings of the letters a,b: u∼v if u and v have the same number of letters.
  • (d) “Same value”: for a function f:X→Y, put x∼fx′ if f(x)=f(x′).
  • (e) Fractions: on P=Z×(Z∖{0}), put (a,b)∼(c,d) if ad=bc.

Solution.

  • (a) Every x equals itself; x=y gives y=x; x=y and y=z give x=z. Equality is the degenerate case: it is the equivalence relation that identifies nothing new, and the model the other examples imitate.

  • (b) Reflexive. Let a∈Z. Then a−a=0=0⋅n, so n∣a−a. Symmetric. Suppose a−b=kn with k∈Z. Then b−a=(−k)n, so n∣b−a. Transitive. Suppose a−b=kn and b−c=ℓn with k,ℓ∈Z. Then a−c=(a−b)+(b−c)=(k+ℓ)n, so n∣a−c. For n=2 this is “same parity”: a≡b(mod2) says a and b are both even or both odd.

  • (c) This is the special case of (d) in which f:S→N sends a string to its length, so it follows from (d), whose proof does not use (c).

  • (d) Reflexive: f(x)=f(x). Symmetric: f(x)=f(x′) gives f(x′)=f(x). Transitive: f(x)=f(x′) and f(x′)=f(x″) give f(x)=f(x″). Each condition is inherited from the same property of equality in Y. Many equivalence relations are of this form: “same distance from the origin” on R2 is ∼f for f(x,y)=x2+y2.

  • (e) Reflexive: ab=ba, so (a,b)∼(a,b). Symmetric: ad=bc gives cb=da, which says (c,d)∼(a,b). Transitive: suppose ad=bc and cf=de. Multiplying the first equation by f and the second by b gives adf=bcf=bde. Hence d(af−be)=0. Since d≠0, we get af=be, that is, (a,b)∼(e,f). Transitivity is exactly where second entries must be non-zero: with d=0 allowed, (1,1)∼(0,0)∼(2,1) but (1,1)≁(2,1).

Minimal changes to these examples show that each condition can fail on its own.

Example (Relations that are not equivalence relations)

Decide which of (E1)–(E3) each relation satisfies.

  • (a) ≤ on Z.
  • (b) On R: x∼y if |x−y|≤1.
  • (c) On R: x∼y if xy>0.

Solution.

  • (a) Change “=” to “≤”. Reflexivity survives (a≤a) and so does transitivity (a≤b≤c gives a≤c). Symmetry fails: 1≤2 but 2≰1.

  • (b) Change “|x−y|=0” (which is equality) to “|x−y|≤1”. Reflexivity survives, since |x−x|=0, and so does symmetry, since |y−x|=|x−y|. Transitivity fails: 0∼1 and 1∼2, but |0−2|=2>1. “Close to” cannot be chained; many small steps make a big one.

  • (c) Symmetry holds, since yx=xy. Transitivity holds: if xy>0 and yz>0, then xy2z>0, and since y2>0 this gives xz>0. Reflexivity fails, at exactly one point: 0⋅0=0, so 0≁0. On R∖{0} the same rule is an equivalence relation (“same sign”).

Warning. A tempting argument claims that (E1) follows from (E2) and (E3): “if x∼y, then y∼x by symmetry, so x∼x by transitivity.” The gap is the word “if”. The argument needs some y with x∼y, and there may be none. In Example (Relations that are not equivalence relations) (c), the element 0 is related to nothing, which is exactly why it escapes. Reflexivity must always be checked on its own.

Quick check. On Z, define a∼b if ab≥0. Is ∼ an equivalence relation?

Solution. No. It is reflexive (a2≥0) and symmetric, but not transitive: 1∼0 and 0∼−1 since both products are 0, yet 1⋅(−1)=−1<0, so 1≁−1. Compare Example (Relations that are not equivalence relations) (c): moving from > to ≥ repairs reflexivity at 0 but lets 0 link the positives to the negatives.

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 X cut cleanly into pieces falls apart, as the non-examples above show.

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.

Definition 0.5.3 (Equivalence class)

Let ∼ be an equivalence relation on X, and let x∈X. The equivalence class of x is [x]:={y∈X:y∼x}. Any element of [x] is called a representative of the class.

The word “representative” is chosen carefully. A class is one set, but it usually has many names: [x]=[y] is possible with x≠y.

Example (Equivalence classes)
  • (a) For equality on X, [x]={x}. Every class has one element.
  • (b) For congruence modulo 3 on Z: [0]={…,−6,−3,0,3,6,…},[1]={…,−5,−2,1,4,7,…},[2]={…,−4,−1,2,5,8,…}. Here [0]=[3]=[−3] and [2]=[−1]: one class, many names.
  • (c) For “same length” on strings of a,b, the class of ab is {aa,ab,ba,bb}, and the class of the empty string contains only the empty string.
  • (d) For the full relation X×X on a non-empty set X, there is a single class, [x]=X.
  • (e) For “same distance from the origin” on R2, the class of (x,y) is the circle of radius x2+y2 centered at the origin. The class of the origin is the one-point set {(0,0)}.

In example (e), the classes look like this. Each circle is one class; the origin on its own is another.

Diagram. Labels: x, y, (1,0), (0,1), [(1,0)] = [(0,1)] is the unit circle

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.

Lemma 0.5.1 (Classes are equal or disjoint)

Let ∼ be an equivalence relation on X, and let a,b∈X.

  • (a) [a]=[b] if and only if a∼b.
  • (b) Either [a]=[b] or [a]∩[b]=∅.

Proof.

  • (a) (⇒) Suppose [a]=[b]. By reflexivity a∼a, so a∈[a]=[b], which means a∼b.

    (⇐) Suppose a∼b. Let x∈[a], so x∼a. Since a∼b, transitivity gives x∼b, so x∈[b]. Hence [a]⊆[b]. By symmetry b∼a, and swapping the roles of a and b in the argument gives [b]⊆[a]. By Theorem 0.3.1, [a]=[b].

  • (b) Suppose [a]∩[b]≠∅, and let c∈[a]∩[b]. Then c∼a and c∼b. By symmetry a∼c, and by transitivity a∼b. By (a), [a]=[b].

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 non-overlapping pieces that cover everything has its own name.

Definition 0.5.4 (Partition)

A partition of a set X is a collection P of subsets of X, called blocks, such that:

  • (P1) every block is non-empty;
  • (P2) distinct blocks are disjoint: if B,B′∈P and B≠B′, then B∩B′=∅;
  • (P3) the blocks cover X: every x∈X lies in some block.

By (P2) and (P3), every element of X lies in exactly one block. For example, {{1,3},{2}} is a partition of {1,2,3}, while {{1,2},{2,3}} is not, because the distinct blocks share 2 and (P2) fails.

Quick check. Is {{1,2,3},∅} a partition of {1,2,3}? Is {{1},{2}}?

Solution. Neither. The first contains the empty block, so (P1) fails, even though (P2) and (P3) hold. The second does not cover 3, so (P3) fails.

The main theorem says that equivalence relations and partitions are two descriptions of the same thing: “which elements are the same” and “how X is cut into pieces”.

Theorem 0.5.2 (Equivalence relations and partitions)

Let X be a set.

  • (a) If ∼ is an equivalence relation on X, then the set of its equivalence classes is a partition of X.
  • (b) If P is a partition of X, then the relation “x∼Py if x and y lie in the same block” is an equivalence relation on X, and its equivalence classes are exactly the blocks of P.
  • (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 x∈[x], and (P2) is Lemma 0.5.1 (b). Part (b) runs the other way, and each block condition pays for one equivalence condition: covering gives reflexivity, and disjointness gives transitivity, because a middle element y can lie in only one block. Part (c) is Lemma 0.5.1 (a) read as a sentence about blocks.

Proof.

  • (a) Let P={[x]:x∈X}. For every x∈X, reflexivity gives x∈[x]. Hence every class is non-empty, which is (P1), and every element lies in some class, which is (P3). If [a]≠[b], then [a]∩[b]=∅ by Lemma 0.5.1 (b), which is (P2). Hence P is a partition of X.

  • (b) Reflexive. Let x∈X. By (P3), x lies in some block, so x∼Px. Symmetric. “x and y lie in a common block” does not depend on the order of x and y. Transitive. Suppose x,y∈B and y,z∈B′ for blocks B,B′. Then y∈B∩B′, so B=B′ by (P2). Hence x,z∈B, and x∼Pz.

    Now let B∈P and x∈B; we show [x]=B, where the class is taken for ∼P. (⊆) If y∈[x], then y and x lie in a common block B′; since x∈B∩B′, (P2) gives B′=B, so y∈B. (⊇) If y∈B, then y and x both lie in B, so y∼Px and y∈[x]. Hence [x]=B by Theorem 0.3.1. Every class [x] is therefore the block containing x, which exists by (P3); and every block B is a class, namely [x] for any x∈B, 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 x∼y, then x,y∈[y], so x≈y. Conversely, if x≈y, then x,y∈[z] for some z; thus x∼z and y∼z, and symmetry and transitivity give x∼y. 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 non-overlapping 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 12.

Definition 0.5.5 (Quotient set)

Let ∼ be an equivalence relation on X. The quotient set of X by ∼ is the set of all equivalence classes, X/∼:={[x]:x∈X}. The function π:X→X/∼, π(x)=[x], is the quotient map.

The elements of X/∼ are sets, but once the quotient is formed we stop looking inside them and treat each class as a single point. The quotient map is surjective, since every class is [x]=π(x) for some x. By Lemma 0.5.1 (a), π(x)=π(y) exactly when x∼y: the quotient map makes equivalent elements literally equal.

Example (Quotient sets)
  • (a) For an integer n≥1, the quotient of Z by congruence modulo n is written Z/nZ. Show that it has exactly n elements, namely [0],[1],…,[n−1].

  • (b) Describe the quotient of the set S of strings in a,b by “same length”, and of R2 by “same distance from the origin”.

Solution.

  • (a) Let a∈Z. By division with remainder (Exercise (C2: Division with remainder)), a=qn+r with q,r∈Z and 0≤r≤n−1. Then a−r=qn, so a≡r(modn), and [a]=[r] by Lemma 0.5.1 (a). Hence every class is one of [0],…,[n−1]. These are distinct: if 0≤r<s≤n−1, then 0<s−r<n, so s−r is not a multiple of n, hence r≢s and [r]≠[s] by Lemma 0.5.1 (a). So Z/nZ={[0],[1],…,[n−1]} has exactly n elements.

  • (b) Two strings are identified exactly when they have the same length, so there is one class for each length k∈N: the set of all 2k strings of length k. Similarly, R2 modulo “same distance” has one class for each radius r∈[0,∞): the circle of radius r, or the origin when r=0. In both cases the quotient is “the same as” the set of values N or [0,∞), 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 Z/12Z. The natural way to define such an operation is through representatives: to add two classes, pick an element of each, add them, and take the class of the result. The danger is that a class has many representatives, and different choices might give different answers. When they do, the “definition” does not define a function at all.

Here is that failure in its simplest form.

Example (The numerator is not well defined)

Let P=Z×(Z∖{0}) with (a,b)∼(c,d) if ad=bc, as in Example (Equivalence relations) (e). Its classes are the rational numbers: the class of (a,b) is the fraction a/b, with all its other names. Is “[(a,b)]↦a” a function P/∼→Z?

Solution. No. Since 1⋅4=2⋅2, we have (1,2)∼(2,4), so [(1,2)]=[(2,4)] by Lemma 0.5.1 (a). The rule assigns to this one class the value 1 through one name and 2 through the other. So it does not assign exactly one value to each element of the domain, and Definition 0.4.1 fails. “The numerator of 12” is a statement about how a fraction is written, not about the number.

By contrast, “[(a,b)]↦1 if a=0, and 0 otherwise” is fine. If (a,b)∼(c,d) and a=0, then bc=ad=0, so c=0 because b≠0. By symmetry, c=0 forces a=0. So equivalent pairs always get the same value.

The contrast in that example is the whole story, and the following theorem turns it into a test. A function f on X passes to the quotient exactly when it cannot tell equivalent elements apart.

Theorem 0.5.3 (Functions on a quotient)

Let ∼ be an equivalence relation on X, let π:X→X/∼ be the quotient map, and let f:X→Y be a function.

  • (a) If f(a)=f(b) whenever a∼b, then there is exactly one function f¯:X/∼→Y with f¯([x])=f(x) for every x∈X, that is, f¯∘π=f.
  • (b) Conversely, if some function f¯:X/∼→Y satisfies f¯∘π=f, then f(a)=f(b) whenever a∼b.

Idea. The formula f¯([x])=f(x) leaves no freedom: if f¯ exists, this is its value. The only question is whether the formula makes sense, since the class C=[x] may also be called [x′]. So look at all the values f takes on C at once, the image f(C). A function needs exactly one value; f(C) is non-empty because C is, and has at most one element because all elements of C are equivalent.

Proof.

  • (a) Let C∈X/∼. By Definition 0.5.5, C=[x] for some x∈X, so C is non-empty, and hence the image f(C) is non-empty. If x′,x″∈C, then [x′]=C=[x″] by Lemma 0.5.1 (a) applied to x′∼x and x″∼x; hence x′∼x″ by the same lemma, and f(x′)=f(x″) by hypothesis. Therefore f(C) has exactly one element, and we define f¯(C) to be that element. This assigns exactly one value to each class, so f¯ is a function. For x∈X, we have x∈[x] by reflexivity, so f¯([x])∈f([x])={f(x)}, that is, f¯([x])=f(x).

    For uniqueness, suppose g:X/∼→Y also satisfies g([x])=f(x) for every x. Every class is [x] for some x, and there g([x])=f(x)=f¯([x]). Hence g=f¯.

  • (b) Suppose f¯∘π=f and a∼b. By Lemma 0.5.1 (a), [a]=[b]. Hence f(a)=f¯([a])=f¯([b])=f(b), as claimed.

In practice we rarely name f and f¯ separately. We write down a rule “[x]↦ (expression in x)” and check that equivalent representatives give the same value. That check is what people mean when they say a function is well defined. For example, “same value” in Example (Equivalence relations) (d) satisfies the hypothesis by its very definition, so every f:X→Y induces a function X/∼f→Y. This f¯ is injective: f¯([x])=f¯([x′]) means f(x)=f(x′), which is x∼fx′, so [x]=[x′]. This makes precise the remark that R2 modulo “same distance” is “the same as” [0,∞): the induced map [(x,y)]↦x2+y2 is a bijection onto [0,∞).

The most important application in this chapter is arithmetic modulo n. The operation takes two classes, so we check both representatives at once.

Example (Addition modulo n is well defined)

Fix an integer n≥1. Show that the rule [a]+[b]:=[a+b] defines a function Z/nZ×Z/nZ→Z/nZ. Then compute [3]+[2] in Z/4Z.

Solution. We must show that the value [a+b] depends only on the classes [a] and [b], not on the representatives a and b. Suppose [a]=[a′] and [b]=[b′]. By Lemma 0.5.1 (a), a≡a′ and b≡b′(modn), so a−a′=kn and b−b′=ℓn for some k,ℓ∈Z. Then (a+b)−(a′+b′)=(a−a′)+(b−b′)=(k+ℓ)n, so a+b≡a′+b′(modn), and [a+b]=[a′+b′] by the same lemma. Hence every choice of representatives gives the same class, and the rule defines a function.

In Z/4Z, [3]+[2]=[5]=[1], since 5−1=4. Choosing other names gives the same answer, as it must: [7]+[−2]=[5]=[1].

This is the same principle as Theorem 0.5.3, applied to a function of two variables. The same check (Exercise (B3: Multiplication modulo n)) shows multiplication [a][b]:=[ab] is well defined. With these operations, Z/pZ for a prime p will become our first finite field later in this chapter, and the identical pattern, now with “v∼w if v−w∈U”, will build quotient vector spaces in Chapter 4.

Warning. A rule written in terms of a representative is not automatically a function on classes. Define it, then check it. For example, “[a]↦a” from Z/5Z to Z is not a function, because [0]=[5] would be sent to both 0 and 5. The check is not a formality: forgetting it is the most common error in any argument that uses quotients.

Quick check. Which of these rules defines a function? (i) Z/6Z→Z/3Z, [a]6↦[a]3. (ii) Z/6Z→Z/4Z, [a]6↦[a]4. Here the subscript records the modulus.

Solution.

  • (i) Yes. If [a]6=[a′]6, then a−a′=6k=3(2k), so [a]3=[a′]3.

  • (ii) No. [0]6=[6]6, but [0]4≠[6]4=[2]4, since 6−0=6 is not a multiple of 4. The first works because 3∣6; the second fails because 4∤6.

0.5.6. Exercises

A. Check your understanding

Exercise (A1)
  • (a) State the three conditions for a relation ∼ on X 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 [a] and [b] have an element in common, then a∼b.
  • (d) You want to define a function on X/∼ by a formula in a representative x. What must you check?
  • (e) How many elements does Z/5Z have? Is [12]=[−3] in Z/5Z?

Solution.

  • (a) Reflexive: x∼x for every x∈X. Symmetric: x∼y implies y∼x. Transitive: x∼y and y∼z imply x∼z.

  • (b) False. On R, x∼y if xy>0 is symmetric and transitive, but 0≁0; 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 a∼b.

  • (d) That equivalent representatives give the same value: if x∼x′, the formula gives the same result for x and x′. By Theorem 0.5.3 this is exactly what is needed.

  • (e) Five, by Example (Quotient sets) (a). Yes: 12−(−3)=15=3⋅5, so 12≡−3(mod5), and both classes equal [2].

B. Practice

Exercise (B1: Which are equivalence relations?)

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 Z: a∼b if a+b is even.
  • (b) On Z: a∼b if a−b is odd.
  • (c) On R: x∼y if x−y∈Z.
  • (d) On {1,2,3,…}: m∼n if m and n have a common divisor greater than 1.
  • (e) On the set of all subsets of {1,2,3}: A∼B if A and B have the same number of elements.

Solution.

  • (a) Equivalence relation. Reflexive: a+a=2a is even. Symmetric: b+a=a+b. Transitive: if a+b and b+c are even, then a+c=(a+b)+(b+c)−2b 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 a+b is even exactly when a−b=(a+b)−2b is even, so this is congruence modulo 2.)

  • (b) Not an equivalence relation. Reflexivity fails: 0−0=0 is even, so 0≁0. (Transitivity also fails: 0∼1 and 1∼2, but 0−2 is even.)

  • (c) Equivalence relation. Reflexive: x−x=0∈Z. Symmetric: if x−y=k∈Z, then y−x=−k∈Z. Transitive: if x−y=k and y−z=ℓ with k,ℓ∈Z, then x−z=k+ℓ∈Z. The class of x is {x+k:k∈Z}, the points at integer distance from x in either direction. Each class contains exactly one number in [0,1), namely x−⌊x⌋.

  • (d) Not an equivalence relation. Reflexivity fails at 1: the only positive divisor of 1 is 1. Transitivity also fails: 2∼6 (common divisor 2) and 6∼3 (common divisor 3), but 2 and 3 have no common divisor greater than 1.

  • (e) Equivalence relation, since it is “same value” (Example (Equivalence relations) (d)) for the function A↦|A|. There are four classes: {∅}; {{1},{2},{3}}; {{1,2},{1,3},{2,3}}; {{1,2,3}}.

Exercise (B2: Parallel lines as classes)

On R2, define (x,y)∼(x′,y′) if x−y=x′−y′.

  • (a) Prove that ∼ is an equivalence relation.
  • (b) Describe the class of (x0,y0) geometrically, and draw several classes.
  • (c) Show that [(x,y)]↦x−y is a well-defined function R2/∼→R, and that it is a bijection.

Solution.

  • (a) This is “same value” for f:R2→R, f(x,y)=x−y, so it is an equivalence relation by Example (Equivalence relations) (d). Directly: x−y=x−y; equality of the numbers x−y and x′−y′ is symmetric and transitive.

  • (b) Put c=x0−y0. Then [(x0,y0)]={(x,y)∈R2:x−y=c}={(x,y):y=x−c}, the line of slope 1 through (x0,y0), which meets the y-axis at (0,−c). The classes are all the lines parallel to y=x: each point of the plane lies on exactly one of them, as Theorem 0.5.2 predicts.

    Diagram. Labels: x, y, (1,1), x - y = 2, x - y = -2, x - y = 0
  • (c) Let f(x,y)=x−y. If (x,y)∼(x′,y′), then f(x,y)=f(x′,y′) by the definition of ∼. By Theorem 0.5.3 (a), there is a function f¯:R2/∼→R with f¯([(x,y)])=x−y.

Injective. Suppose f¯([(x,y)])=f¯([(x′,y′)]). Then x−y=x′−y′, so (x,y)∼(x′,y′), and [(x,y)]=[(x′,y′)] by Lemma 0.5.1 (a).

Surjective. Let c∈R. Then f¯([(c,0)])=c−0=c.

Hence f¯ is a bijection: the set of parallel lines is labeled, one to one, by the real number c.

Exercise (B3: Multiplication modulo n)

Fix an integer n≥1.

  • (a) Prove that [a][b]:=[ab] is a well-defined operation on Z/nZ.
  • (b) Write out the multiplication table of Z/4Z, using the representatives 0,1,2,3.
  • (c) Hence find a class [a]≠[0] in Z/4Z with [a][a]=[0].

Solution.

  • (a) Suppose [a]=[a′] and [b]=[b′]. By Lemma 0.5.1 (a), a−a′=kn and b−b′=ℓn for some k,ℓ∈Z. Then ab−a′b′=ab−a′b+a′b−a′b′=(a−a′)b+a′(b−b′)=(kb+a′ℓ)n, so ab≡a′b′(modn) and [ab]=[a′b′] by the same lemma. Hence the value does not depend on the representatives, and the operation is well defined.

  • (b) Reducing each product modulo 4:

    ⋅ [0] [1] [2] [3]
    [0] [0] [0] [0] [0]
    [1] [0] [1] [2] [3]
    [2] [0] [2] [0] [2]
    [3] [0] [3] [2] [1]

    For instance [2][3]=[6]=[2] and [3][3]=[9]=[1].

  • (c) From the table, [2][2]=[4]=[0], while [2]≠[0] since 4∤2. So a product of non-zero classes can be zero in Z/4Z, something that never happens with ordinary numbers.

C. Going deeper

Exercise (C1: Squares and powers modulo n)
  • (a) Let n≥1. Prove that [x]↦[x2] is a well-defined function Z/nZ→Z/nZ.
  • (b) On N, let ≡3 be congruence modulo 3. Show that the rule [x]↦[2x]3 does not define a function from N/≡3 to Z/3Z.
  • (c) On N, let ≡2 be congruence modulo 2. Prove that [x]↦[2x]3 does define a function from N/≡2 to Z/3Z.

Hint for (c): compute 22 modulo 3.

Solution.

  • (a) Suppose [x]=[x′]. By Exercise (B3: Multiplication modulo n) (a) with a=b=x and a′=b′=x′, we get [x][x]=[x′][x′], that is, [x2]=[x′2]. Hence the value depends only on the class, and the function is well defined.

  • (b) In N, 0≡3(mod3), so [0]=[3]. The rule sends this class to [20]3=[1]3 through the representative 0, and to [23]3=[8]3=[2]3 through the representative 3. Since 8−1=7 is not a multiple of 3, [1]3≠[2]3. 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 x≡x′(mod2) implies 2x≡2x′(mod3). By symmetry of both relations we may assume x≤x′, so x′=x+2k with k∈N. First, 4k≡1(mod3) for every k∈N, by induction on k (Theorem 0.2.7): 40=1, and if 4k−1=3m, then 4k+1−1=4(4k−1)+3=3(4m+1). Hence 2x′−2x=2x(4k−1) is a multiple of 3, so [2x′]3=[2x]3, as claimed. The difference between (b) and (c) is that the powers of 2 modulo 3 repeat with period 2, and 3 is not a multiple of 2.

Exercise (C2: Counting equivalence relations)
  • (a) List all partitions of {1,2,3}.
  • (b) Hence deduce that there are exactly 5 equivalence relations on {1,2,3}.
  • (c) Write the equivalence relation corresponding to the partition {{1,3},{2}} as a subset of {1,2,3}×{1,2,3}.

Solution.

  • (a) Sort by the number of blocks. One block: {{1,2,3}}. Two blocks: one block is a single element and the other the remaining pair, giving {{1},{2,3}}, {{2},{1,3}}, {{3},{1,2}}. Three blocks: {{1},{2},{3}}. Four or more non-empty disjoint blocks are impossible in a three-element set. That is 5 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 {1,2,3} correspond one to one with partitions, and there are exactly 5 of them.

  • (c) Two elements are related exactly when they lie in a common block: {(1,1),(2,2),(3,3),(1,3),(3,1)}.

Exercise (C3: Intersections and unions of equivalence relations)

Let R1 and R2 be equivalence relations on a set X, viewed as subsets of X×X.

  • (a) Prove that R1∩R2 is an equivalence relation on X.
  • (b) Show by an example that R1∪R2 need not be an equivalence relation. Which condition fails?
  • (c) For congruence modulo 2 and modulo 3 on Z, identify R1∩R2 as a familiar relation.

Hint for (b): try congruence modulo 2 and modulo 3 on Z.

Solution.

  • (a) Reflexive. Let x∈X. Then (x,x)∈R1 and (x,x)∈R2, since both are reflexive, so (x,x)∈R1∩R2. Symmetric. Suppose (x,y)∈R1∩R2. Since R1 and R2 are symmetric, (y,x)∈R1 and (y,x)∈R2, so (y,x)∈R1∩R2. Transitive. Suppose (x,y),(y,z)∈R1∩R2. Both pairs lie in R1, which is transitive, so (x,z)∈R1; likewise (x,z)∈R2. Hence (x,z)∈R1∩R2.

  • (b) Let R1 be congruence modulo 2 and R2 congruence modulo 3 on Z. The union is still reflexive and symmetric, since each of R1,R2 is. But transitivity fails: (0,2)∈R1 since 2∣2, and (2,5)∈R2 since 3∣3, yet (0,5) lies in neither, because 5 is not a multiple of 2 or of 3.

  • (c) (a,b)∈R1∩R2 means 2∣a−b and 3∣a−b. This holds exactly when 6∣a−b. Indeed, if a−b=2k and a−b=3m with k,m∈Z, then a−b=3(a−b)−2(a−b)=3⋅2k−2⋅3m=6(k−m). Conversely, if a−b=6j, then a−b=2(3j)=3(2j). So R1∩R2 is congruence modulo 6. The same phenomenon, where intersections behave well and unions do not, will reappear for subspaces in Chapter 1.

Found a typo or a mistake? Report it, or read this page’s source

The text of this book is licensed under CC BY-NC-SA 4.0.