In the last section we saw that congruence mod is an equivalence relation. In this section we will explore this relation in more detail. We will also introduce the concept of modular arithmetic.
In some applications, and often in computer science, the remainder, , when is divided by is denoted . When using equals (=), we will mean the specific remainder. When using congruence (), we will mean the relation. For example, , but many numbers can satisfy the congruence: , etc.
We use modular arithmetic and equivalence mod when we want to think about remainders when dividing by . A familiar example is clock time. Suppose it is 11 am and you have an appointment in 3 hours. In general, you would not think of your appointment for 14 o’clock. You would think of noon as 0, and get that your appointment is at 2 o’clock. There are many more applications in algebra, cryptography, and computer science where we want to classify integers by their remainders mod .
Find the equivalence classes for congruence mod 5. List several elements of each equivalence class. What do the elements of each congruence class look like?
Modular arithmetic is just the process of adding, subtracting, and multiplying, where we treat integers with the same remainder mod , as equivalent. Thus, we can replace any integer with it’s remainder.
We define , where represents the equivalence class . Although this sounds complicated, we just do regular arithmetic with and reduce to the remainder mod .
The previous problem will be helpful, as will writing as a decimal expansion (see Activity 8.4.7). It can be useful in proving that a number is divisible by 9 to instead show that it is congruent to 0 mod 9. Also note, this is an “if and only if” statement so your proof requires two parts.