# 4 Equivalence relations

## 4.2 Equivalence relations

Our formal definition of an equivalence relation involves three key properties. A relation that has these three properties partitions the set on which the relation is defined, as we show later in this subsection.

The reflexive, symmetric and transitive properties are independent, in the sense that relations exist with every combination of these properties. (However, relations which are symmetric and transitive but not reflexive are usually somewhat contrived.)

If a relation is symmetric, then ‘*x* is related to *y*’ means the same as ‘*y* is related to *x*’, and we can use either phrase, or simply say ‘*x* and *y* are related’; we can write either *x* *y* or *y* *x*.

We now consider the examples in the previous subsection to see whether they satisfy any or all of the three properties.

### Examples

- 1. The relation ‘is equal to’ on is reflexive, symmetric and transitive.
- It is reflexive since, for all
*x*,*x*=*x*. - It is symmetric since, for all
*x*,*y*, if*x*=*y*, then*y*=*x*. - It is transitive since, for all
*x*,*y*,*z*, if*x*=*y*and*y*=*z*, then*x*=*z*. - Hence this relation is an equivalence relation.
- 2. The relation ‘is less than’ on is neither reflexive (since it is not true that
*x*<*x*for all*x*) nor symmetric (since, if*x*<*y*, then it does not follow that*y*<*x*), but it is transitive, since, if*x*<*y*and*y*<*z*, then*x*<*z*. - 3. The relation ‘is the derivative of ’ on a set of functions has none of the reflexive, symmetric and transitive properties.
- 4. The relation defined on by
- is reflexive, since |
*z*−*z*| = 0 ≤ 4 for all*z*. It is also symmetric, since, if |*z*_{1}−*z*_{2}| ≤ 4, then |*z*_{2}−*z*_{1}| = |*z*_{1}−*z*_{2}| ≤ 4. However, it is not transitive. The counter-example*z*_{1}= 0,*z*_{2}= 4,*z*_{3}= 4 +*i*shows that property E3 fails:

So only the first of the four examples above is an equivalence relation.

### Example 17

Prove that the relation defined on by

is an equivalence relation on .

### Solution

We show that properties E1, E2 and E3 hold.

Hence this relation is an equivalence relation.

### Exercise 57

For each set *A* and given relation, decide whether the relation has the reflexive, symmetric and transitive properties, and thus whether it is an equivalence relation. For each property,
either prove that it holds or give a counter-example to show that it does not hold.

- (a)
*A*= ;*x**y*if*x*−*y*is odd. - (b)
*A*= ;*x**y*if*x*−*y*is even. - (c)
*A*is the set of all lines in the plane; ℓ_{1}ℓ_{2}if the lines ℓ_{1}and ℓ_{2}are parallel. (Take the definition of parallel to be ‘in the same direction as’.) - (d)
*A*= ;*z*_{1}*z*_{2}if*z*_{1}−*z*_{2}is real.

### Solution

- (a) This relation is not reflexive; for example, 2 2 since 2 − 2 = 0 which is not odd.
- The relation is symmetric; if
*x**y*then*x*−*y*is odd, so*y*−*x*= − (*x*−*y*) is also odd, so*y**x*. - The relation is not transitive; for example, 5 2 since 5 − 2 is odd, 2 1 since 2 − 1 is odd, but 5 1 since 5 − 1 is even.
- The relation is not an equivalence relation.
- (b) This relation is reflexive, since
*x*−*x*= 0, which is even, for all*x*. - It is symmetric, since if
*x**y*, then*x*−*y*is even, so*y*−*x*= − (*x*−*y*) is even, so*y**x*. - It is transitive, since if
*x**y*and*y**z*, then*x*−*y*is even and*y*−*z*is even, so*x*−*z*=*x*−*y*+*y*−*z*is the sum of two even numbers, so is even, so*x**z*. - The relation is an equivalence relation.
- (c) Any line ℓ is parallel to itself, so this relation is reflexive.
- It is symmetric, since if ℓ
_{1}is parallel to ℓ_{2}, then ℓ_{2}is parallel to ℓ_{1}. - It is transitive, since if ℓ
_{1}is parallel to ℓ_{2}and ℓ_{2}is parallel to ℓ_{3}, then ℓ_{1}is parallel to ℓ_{3}. - The relation is an equivalence relation.
- (d) This relation is reflexive, since for all
*z*we have*z*−*z*= 0, which is real, so*z**z*. - It is symmetric, since if
*z*_{1}−*z*_{2}is real, then*z*_{2}−*z*_{1}= − (*z*_{1}−*z*_{2}) is also real. - It is transitive because, if
*z*_{1}−*z*_{2}is real and*z*_{2}−*z*_{3}is real, then*z*_{1}−*z*_{3}=*z*_{1}−*z*_{2}+*z*_{2}−*z*_{3}is the sum of two real numbers and so is real. - The relation is an equivalence relation.

At the beginning of this section we stated that we were looking at a method of classifying objects in a set by *partitioning* them.

### Definition

A collection of non-empty subsets of a set is a **partition** of the set if every two subsets in the collection are disjoint and the union of all the subsets in the collection is the
whole set.

(Two sets are *disjoint* if they have no elements in common.)

We now show why an equivalence relation partitions the set on which the relation is defined. First we need another definition.

### Definition

Let be an equivalence relation defined on a set *X*; then the **equivalence class** of *x* *X*, denoted by *x*, is the set

Thus *x* is the set of all elements in *X* related to *x*.

### Example 18

Find the equivalence classes for the following equivalence relations:

- (a) ‘is equal to’ on a set of real numbers;
- (b) the relation of Example 17:
*z*_{1}*z*_{2}if |*z*_{1}| = |*z*_{2}|, on the set .

### Solution

- (a) Since
*x*=*y*only if*y*is the same real number as*x*, the equivalence class of the real number*x*contains only the number*x*itself. So here each element lies in a single-element equivalence class. - (b) The equivalence class of a particular complex number
*z*_{0}, say, is*z*_{0}= {*z*:*z**z*_{0}}. Now*z**z*_{0}means that |*z*| = |*z*_{0}|, so*z*_{0}= {*z*: |*z*| = |*z*_{0}|}. Hence the equivalence class of*z*_{0}is the set of all complex numbers with the same modulus as*z*_{0}. If |*z*_{0}| =*r*, say, then*z*_{0}= {*z*: |*z*| =*r*}; this set forms the circle with centre 0 and radius*r*in the complex plane. Hence the equivalence classes for this relation are circles with centre 0. (The origin is an equivalence class containing just the complex number 0 + 0*i*; it can be thought of as a circle of radius 0.)

### Theorem 7

The equivalence classes associated with an equivalence relation on a set *X* have the following properties.

- (a) Each
*x**X*is in an equivalence class. - (b) For all
*x*,*y**X*, the equivalence classes*x*and *y* are either equal or disjoint. - (Equivalence classes (being sets) are equal if they have exactly the same elements.)

Thus the equivalence classes form a partition of *X*.

**Proof**

Let be an equivalence relation on a set *X*.

- (a) Let
*x**X*. The relation is reflexive, so*x**x*, and hence*x*belongs to the equivalence class*x*. - (b) Let
*x*and*y*be equivalence classes with at least one element*a*in common. - Then, since
*x*and*y*are not disjoint, we have to prove that they are equal. - First we show that
*x**y*. Suppose that*b**x*; we have to show that*b**y*. - Since
*a**y*,*a**x*and*b**x*, we have - respectively. (By definition,
*a**x*implies that*x**a*, but since is symmetric, this means the same as*a**x*.) - Since is transitive, the first two statements of statements (4.1) together imply that
*y**x*, and this, together with the third statement of statements (4.1), implies that*y**b*. Hence*b**y*. - This shows that
*x**y*. We can show similarly that*y**x*(we interchange the roles of*x*and*y*in the proof that*x**y*). - Hence
*x*=*y*.

As an illustration of Theorem 7, consider the equivalence relation in Example 18(b). We saw that the equivalence classes of this relation are of the form

where *r* . That is, this relation partitions the complex plane into concentric circles with centre the origin.

(Here we think of the class containing the origin alone as a circle of radius 0.)

It follows from Theorem 7 that if two elements *x* and *y* are related by an equivalence relation, then *x* = *y*. Thus, in general, there is more than one way to denote each equivalence class using the notation : a class can be denoted by *x* where *x* is any one of its elements. It is sometimes useful to choose a particular element *x* in each equivalence class and denote the class by *x*. The element *x* that we choose is called a *representative* of the class.

For example,

is one of the equivalence classes of the equivalence relation in Example 18(b). This class contains 4, −4*i* and 2 + 2*i*, for example, so we could denote it by any of 4, −4*i* or 2+2*i*. We might decide to choose the representative 4 and denote the class by 4. In general, the equivalence class

from Example 18(b) contains the element *r* and so can be denoted by *r*.

### Exercise 58

Determine the equivalence classes for the equivalence relations in Exercise 57(b), (c) and (d).

### Solution

For the equivalence relation in Exercise 57(b), the equivalence class *m* of a particular integer *m* is the set of integers that differ from *m* by an even integer. That is,

In particular,

These are the only equivalence classes (since the equivalence class of any other integer is equal to one of these two). So the equivalence classes are the even integers and the odd integers.

For the equivalence relation in Exercise 57(c), the equivalence class of a particular line is the set of all lines that are parallel to that line. So each equivalence class consists of all lines with a particular gradient. For example, all vertical lines form one equivalence class, and all lines with gradient 3 form another.

For the equivalence relation in Exercise 57(d), the equivalence class of a particular complex number *z*_{0} is

If *z*_{0} = *x*_{0} + *iy*_{0} and *z* = *x* + *iy*, then

which is a real number if and only if *y* = *y*_{0}. Thus *z*_{0} consists of all complex numbers with the same imaginary part as *z*_{0}. So each equivalence class consists of all complex numbers with a particular imaginary part. For example, all complex numbers
of the form *x* + 3*i*, where *x* , form one equivalence class, and all complex numbers of the form *x* − *i*, where *x* , form another. The equivalence classes thus form horizontal lines in the complex plane.

*Remark* These solutions are quite detailed, but you may find that you can determine equivalence classes with less working as you
become more familiar with them.

The solutions to Exercise 57(b) and Exercise 58 show that the relation on given by

is an equivalence relation, with equivalence classes

and

that is, the even integers form one class and the odd integers the other. You have already met this idea in Section 3: the relation ‘*x* *y* if *x* − *y* is even’ is congruence modulo 2.

For any *n*, congruence modulo *n* on , given by

is an equivalence relation; the first three properties given in Theorem 5 are the reflexive, symmetric and transitive properties. The equivalence classes for this relation are the sets

The representatives that we have used to denote the classes are 0, 1, 2, …, *n* − 1, which are the elements of _{n}. Thus _{n} is a *set of representatives* of the equivalence classes of congruence modulo *n*; that is, each equivalence class has exactly one representative in the set _{n}. The definitions of the modular operations +_{n} and ×_{n} can be rephrased using the idea of equivalence classes as follows: for all *a*, *b* _{n},

For example, in _{5},

because 3 + 4 = 7 and the equivalence class 7 of congruence modulo 5 contains the element 2 of _{5}.

So far, we have taken congruences only on , but it is possible to take congruences also on , and the modulus does not need to be an integer.

### Example 19

Show that the relation defined on by

is an equivalence relation, and describe the equivalence classes.

### Solution

We show that properties E1, E2 and E3 hold.

The equivalence class *r* of any real number *r* is the set of all real numbers related to *r* by ; that is, *r* is the set of all real numbers that differ from *r* by a multiple of 2. So

The equivalence relation in Example 19 is congruence modulo 2. For example,

and we write

because

We have seen that congruence modulo *n* on corresponds to modular arithmetic on _{n}, which is a set of representatives of the equivalence classes of congruence modulo *n*. In a similar way, congruence modulo 2 on corresponds to modular arithmetic on a set of representatives of the equivalence classes of congruence modulo 2. A suitable set of representatives is the interval (−, ], since every equivalence class has exactly one representative in this interval. (Other intervals can be used, for example
[0, 2), but (−, ] is useful as it corresponds to our definition of the principal argument of a complex number.) We define modular operations
and on the interval (−, ] as follows: for all *x*, *y* (−, ],

For example,

( and contains ) .

This is effectively what we do when we take the *principal* argument of a complex number arising from some calculation.

Arithmetic modulo 2 on the interval (−, ] gives us a concise way to express some results about complex numbers. For example, we saw earlier that, if *z*_{1} and *z*_{2} are any two complex numbers, then Arg *z*_{1} + Arg *z*_{2} is an argument of *z*_{1}*z*_{2}, but is not necessarily the principal argument. The principal argument is Arg *z*_{1} Arg *z*_{2}, so we can now state that

(Recall that Arg *z* denotes the principal argument of *z*.)