Definition
Modular Arithmetic is a system of arithmetic for the integers, in which two integers a and b are equivalent (or in the same equivalence class) modulo N if they have the same remainder upon division by N. In mathematical notation,
a≡b(modN).
Here are a few properties of Modular Arithmetic:
A. If a+b=c, then a+b≡c(modN).
B. If a⋅b=c, then a⋅b≡c(modN).
C. If a≡b(modN), then a+k≡(b+k)(modN) for any integer k.
D. If a≡b and c≡d(modN), then a+c≡(b+d)(modN).
E. If a≡b(modN), then ka≡kb(modN) for any integer k.
F. If a≡b and c≡d(modN), then ac≡bd(modN).
These properties show that addition and multiplication on equivalence classes modulo N are well defined. Are subtraction and division also well defined? We have the property:
G. If a≡b(modN), then −a≡−b(modN)
We can then use the properties of addition to show that subtraction is defined.
What about division? Consider 4≡8(mod4). Note that we cannot simply divide both sides of the equation by 2, since 2≡4(mod4). This shows that in general, division is not well defined. As the following property shows, if we add the condition that k,N are coprime, then division becomes well defined:
H. If gcd(k,N)=1 and ka≡kb(modN), then a≡b(modN).
This property is true because if k(a−b) is a multiple of N and gcd(k,N)=1, then N must divide a−b, or equivalently, a≡b(modN). We state one final property.
I. If a and N are integers such that gcd(a,N)=1, then there exists an integer x such that ax≡1(modN). x is called the multiplicative inverse of a modulo N.
Worked Examples
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
1000≡16+(24×41)≡16(mod24),
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 1717?
Solution: The last digit of a number is equivalent to the number taken modulo 10. Working modulo 10, we have
1717≡717≡(49)8⋅7≡(92)4⋅7≡14⋅7≡(72)8⋅7≡98⋅7≡(81)4⋅7≡7(mod10)(mod10)(mod10)(mod10).
#NumberTheory
#ModularArithmetic
#KeyTechniques
#Olympiad
Easy Math Editor
This discussion board is a place to discuss our Daily Challenges and the math and science related to those challenges. Explanations are more than just a solution — they should explain the steps and thinking strategies that you used to obtain the solution. Comments should further the discussion of math and science.
When posting on Brilliant:
*italics*
or_italics_
**bold**
or__bold__
paragraph 1
paragraph 2
[example link](https://brilliant.org)
> This is a quote
\(
...\)
or\[
...\]
to ensure proper formatting.2 \times 3
2^{34}
a_{i-1}
\frac{2}{3}
\sqrt{2}
\sum_{i=1}^3
\sin \theta
\boxed{123}
Comments
Why is 17^17 congruent to 7^17?
Log in to reply
because 17 mod 10 is 7
I got it
Really cool......
How do you find the last two digits of a large number? Can someone explain Euler's Totient Theorem or Carmichael's Theorem to me because I am severely confused...
Log in to reply
You can read up on Euler's Theorem :)
Log in to reply
Thanks, but I still don't understand a few things. Why does phi N = n (1-1/a)(1-1/b)? And what do all the weird symbols on the Euler's Totient Function page mean?
Log in to reply
Π means take the product of, just like Σ means take the sum of.
Which weird symbols?I think you should write a wiki on the Chinese remainder theorem. The current one leaves much to be desired. You should create one with detailed examples, and without the assumption of prior knowledge.
Log in to reply
Have you checked out the chinese remainder theorem wiki?