Professional Documents
Culture Documents
in the
Modern World
GEd 102
Lesson 4: Modular Arithme4c
Modular Arithmetic
• Special type of
arithme4c which
involves only integer
(Z) is what we called
“modular arithme4c”.
• The concept of
modular arithme4c
was developed by Carl
Friedrich Gauss in his
book Disquisi&ones
Arithme&cae.
De4inition of Modular
Arithmetic
• It is also known as the
‘clock arithme4c’.
• It is a system of
arithme4c for integers,
where numbers wrap
aMer they reach a certain
value.
• It is the remainder in
division.
Concept on Modular
Arithmetic
• If we want to determine a 4me in the future or in the past, it
is necessary to consider whether we have passed 12 o’clock.
• To determine 4me 8 hours aMer 3 o’clock, we add 3 and 8.
Because we did not pass 12 o’clock, the 4me is 11 o’clock.
Concept on Modular
Arithmetic
• Zn = {0, 1, 2, … , n-1} modulo n
• Z3 = {0, 1, 2} modulo 3
• Z5 = {0, 1, 2, 3, 4} modulo 5
• In Z4, what is 11 5?
• 3
• 3 = 55 (mod 4)
• 22 ≡ 14 (mod 8)
Modulo Congruence
• a ≡ b (mod n)
• a is congruent to b modulo n
• If n divides (a – b)
• That is: n |(a – b)
• 22 ≡ 14 (mod 8)
• 26 ≡ 10 (mod 8)
Modulo Congruence
• Tell whether the congruence is true or not.
• 29 ≡ 8 (mod 3)
• This is a true congruence!
• 7 ≡ 12 (mod 5)
• This is a true congruence!
• 15 ≡ (4 mod 6)
• This is not a true congruence.
Solving Modulo Congruence in
an Equation
• Solve 3x + 5 ≡ 3 mod 4
• If x = 0, is 3(0) + 5 ≡ 3 mod 4?
• If x = 1, is 3(1) + 5 ≡ 3 mod 4?
• If x = 2, is 3(2) + 5 ≡ 3 mod 4?
• If x = 3, is 3(3) + 5 ≡ 3 mod 4?
• If x = 4, is 3(4) + 5 ≡ 3 mod 4?
• If x = 5, is 3(5) + 5 ≡ 3 mod 4?
• If x = 6, is 3(6) + 5 ≡ 3 mod 4?
• If x = 7?
• If x = 8?
• If x = 9?
• If x = 10?
• Since 2, 6, 10, … are solu4ons to 3x + 5 ≡ 3 mod 4
Properties of Modulo
Congruence
• Reflexive Property:
• a ≡ a mod n
• Symmetric Property:
• If a ≡ b mod n, then b ≡ a mod n
• Transi<ve Property:
• If a ≡ b mod n & b ≡ c mod n, then a ≡ c
mod n.
Modulo Congruence
• Addi<ve Inverse
• In Zn, two numbers a and b are addi4ve
inverse of each other if a + b ≡ 0 mod n.
• Example: Find the addi4ve inverse of 7 in
mod 16.
• 9
• 9 + 7 ≡ 0 mod 16.
Modulo Congruence
• Addi<ve Inverse
• Example: Find the addi4ve inverse of 2 in
mod 12.
• 10
• 2 + 10 ≡ 0 mod 12.
• Example: Find the addi4ve inverse of 11
in mod 9.
• 7
• 11 + 7 ≡ 0 mod 9.
Modulo Congruence
• Mul<plica<ve Inverse
• In Zn, two numbers a and b are
mul4plica4ve inverse of each other
if ab ≡ 1 mod n.
• Example: Find the mul4plica4ve
inverse of 5 in Z7.
• 3
• 3x5 = 15, and it is ≡ 1 mod 7
Modulo Congruence
• Mul<plica<ve Inverse
• Example: Find the mul4plica4ve inverse
of 3 in Z10.
• 7
• 3x7 = 21, and it is ≡ 1 mod 10
• Example: Find the mul4plica4ve inverse
of 4 in mod 6.
• none
• No number when mul4plied to 4, will
give ≡ 1 mod 6
Modular Arithmetic and
Modulo Congruence
• Therefore, every number has an
addi4ve inverse, but not necessarily a
mul4plica4ve inverse.
• Both concepts are founda4ons many
areas of mathema4cs, such as
number theory.
• Applica4ons of these include:
cryptography, computer science,
visual arts, musical arts, etc.