Modular Arithmetic is a system of arithmetic for the integers, in which two integers and are equivalent (or in the same equivalence class) modulo if they have the same remainder upon division by . In mathematical notation,
Here are a few properties of Modular Arithmetic:
A. If , then .
B. If , then .
C. If , then for any integer .
D. If and , then .
E. If , then for any integer .
F. If and , then .
These properties show that addition and multiplication on equivalence classes modulo are well defined. Are subtraction and division also well defined? We have the property:
G. If , then
We can then use the properties of addition to show that subtraction is defined.
What about division? Consider . Note that we cannot simply divide both sides of the equation by 2, since . This shows that in general, division is not well defined. As the following property shows, if we add the condition that are coprime, then division becomes well defined:
H. If and , then .
This property is true because if is a multiple of and , then must divide , or equivalently, . We state one final property.
I. If and are integers such that , then there exists an integer such that . is called the multiplicative inverse of modulo
1. It is currently 7:00 PM. What time will it be in 1000 hours?
Solution: Time repeats every 24 hours, so we work modulo 24. Since
the time in 1000 hours is equivalent to the time in 16 hours. Therefore, it will be 11:00AM in 1000 hours.
2. What is the last digit of ?
Solution: The last digit of a number is equivalent to the number taken modulo 10. Working modulo 10, we have