## 1.3. Equivalence Relations and Classes

### Example 1.3.4(b):

Consider the set Z of all integers. Define a relation

*r*by saying that*x*and*y*are related if their difference*y - x*is divisible by*m*. Then we have:- This relation is an equivalence relation (i.e. the three conditions are satisfied)
- There are
*m*equivalence classes:- all numbers divisible by
*m*with no remainder are in class 0 - all numbers divisible by
*m*with remainder 1 are in class 1 - all numbers divisible by
*m*with remainder 2 are in class 2 - ...
- all numbers divisible by
*m*with remainder*m-1*are in class*m-1*

- all numbers divisible by
- Addition can be defined by adding modulo
*m*. That is, if we consider the equivalence classes obtained by dividing the differences by, say, 5, then we have, as an example:- [(2)] + [(1)] = [(3)]
- [(2)] + [(4)] = [(1)]
- [(3)] + [(4)] = [(3)]
- etc...

- The (important) details are left as an exercise.