0% found this document useful (0 votes)
47 views29 pages

Lesson 4.2 1

This document summarizes key concepts in modular arithmetic operations: 1) The main operations are addition, subtraction, multiplication, and finding additive/multiplicative inverses modulo n. 2) Operations yield the remainder when dividing the result by the modulus n. 3) Examples show how to perform each operation and solve congruence equations. 4) Additive inverses are numbers that sum to a multiple of the modulus. Multiplicative inverses are numbers whose product is 1 modulo n.

Uploaded by

Litoy Arquiza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views29 pages

Lesson 4.2 1

This document summarizes key concepts in modular arithmetic operations: 1) The main operations are addition, subtraction, multiplication, and finding additive/multiplicative inverses modulo n. 2) Operations yield the remainder when dividing the result by the modulus n. 3) Examples show how to perform each operation and solve congruence equations. 4) Additive inverses are numbers that sum to a multiple of the modulus. Multiplicative inverses are numbers whose product is 1 modulo n.

Uploaded by

Litoy Arquiza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 29

LESSON 4.

2
OPERATIONS ON
MODULAR
ARITHMETIC
OBJECTIVES:
1. Name and explain the different
operations on modular arithmetic.
2. Perform and solve the operations
on modulo n such as addition,
subtraction, multiplication, the
additive and multiplicative inverse.
3. Solve the congruence equation.
 The different arithmetic
operations modulo n are as
follows: 1) addition modulo
n, 2) subtraction modulo n,
3) multiplication modulo n
and 4) the additive and
multiplicative inverses.
 In 29 ≡ 8 (mod 3), we could verify that its
congruence is true since both 29 and 8 have
remainder 2 when divided by 3 which is the
modulus. There are many other numbers
congruent to 8 modulo 3, but of all these, only
one is a whole number less than the modulus.
This number is the result when evaluating a
modulo expression, and in this case we use
an equal sign. Because 2 ≡ 8 mod 3 and 2 is
less than the modulus, we can write 8 mod 3
= 2. In general, m mod n becomes the
remainder when m is divided by n.
 Arithmetic modulo n (where n is a
natural number) requires us to
evaluate a modular expression after
using the standard rules of
arithmetic. Thus, we perform the
arithmetic operation and then divide
by the modulus. The answer is the
remainder. The result of an
arithmetic operation mod n is always
whole number less than n.
Example:
 Let n = 3, then
14 (mod 3) ≡ 2 since 14 = 3•4 + 2 ( 2
is the remainder)
9(mod 3) ≡ 0 since 9 = 3•3 + 0 (0 is
the remainder)
2(mod 3) ≡ 2 since 2 = 3•0 + 2 ( 2 is
the remainder)
A. Addition Modulo n
 Evaluate (23 + 38) mod 12.
Solution:
 Add 23 + 38 to produce 61. To evaluate 61 mod
12, divide 61 by modulus, 12. The answer is
the remainder.

So (23 + 38) mod 12 ≡ 1 since 61 = 12•5 + 1


where 1 is the remainder.
 Inmodular arithmetic,
adding the modulus to
a number does not
change the equivalent
value of the number.
Example:
13 ≡ 6 (mod 7)
20 ≡ 6 (mod 7) add 7 to 13
27 ≡ 6 (mod 7) add 7 to 20 and so on.

12 ≡ 7 (mod 5)
17 ≡ 7 (mod 5) add 5 to 12
22 ≡ 7 (mod 5) add 5 to 17 and so on.
 This property of modular
arithmetic is sometimes
used in subtraction. It is
possible to use negative
numbers modulo n.
Example:
 -2 ≡ 5 mod 7 is a true
congruence. Why?
Applying the definition; a ≡
b (mod n) where n | a – b,
then
= = -1 ∈ Z
B. Subtraction Modulo n
1. Evaluate (33 – 16)mod 6.
 Here, subtracting 16 from 33, we will
be able to get a positive result, i.e.
17. Divide the difference by the
modulus, 6 we get:
17 = 6•2 + 5.
 So, (33 – 16) mod 6 = 5
2. Evaluate (14 – 27) mod 5.
 If we subtract 27 from 14, we will get
a negative answer, i.e., -13. On that
case, we must find x so that -13 ≡ x
mod 5. Thus we must find x so that
the value of = is an integer. Trying
the whole number values of x less
than 5, the modulus, i.e. x = 0, 1, 2,
3, and 4, then;
So, the only value for x is 2. Hence, (14 – 27)
mod 5 = 2.
C. Multiplication Modulo n
 Evaluate (15•23)mod 11.
 We need to find the product of 15
and 23. The product is 345. This
product must be divided by the
modulus, 11 to be able to find its
remainder.
345 = 11•31 + 4
Hence, (15•23)mod 11 = 4
D. Additive and Multiplicative Inverses
in Modular Arithmetic
a. Recall that if the sum of two numbers is
zero (0),i.e. a + (-a) = 0, then the numbers
are additive inverses of each other. For
instance, 5 + (-5) = 0. So 5 is the additive
invers of -5 and -5 is the additive inverse of
5.
The same concept applies in modular
arithmetic. For example;
(3 + 5) ≡ 0 mod 8.
 Thus, in mod 8 arithmetic, 3 is
the additive inverse of 5, and
5 is the additive inverse of 3.
Here, we consider only those
whole number smaller than
the modulus. Note that 3 + 5 =
8; that is, the sum of a number
and its additive inverse equals
the modulus.
Example:
 In mod 11 arithmetic, the
additive inverse of 5 is 6
because 5 + 6 = 11.
Example:
 Find the additive inverse of
7 in mod 16 arithmetic.
Solution:
 In mod 16 arithmetic, 7 + 9
= 16. So, the additive
inverse of 7 is 9.
b. If the product of two number is 1,
then the numbers are multiplicative
inverses of each other. This is one
of the properties of real number,
i.e., (𝑎) () = 1. So, the multiplicative
inverse of 2 is 1/2 and the
multiplicative inverse of 1/2 is 2.
 The same concept applies to modular
arithmetic (although the multiplicative
inverses will always be natural number). For
example in mod 7 arithmetic, 5 is the
multiplicative invers of 3 (and 3 is the
multiplicative inverse of 5) because 5•3 ≡ 1
mod 7. Here, we will concern ourselves only
with natural numbers less than the modulus.
To find the multiplicative inverse of a mod m,
solve the modular equation ax = 1 mod m for
x.
Example:
 In mod 7 arithmetic, find the
multiplicative inverse of 2.
Solution:
 To find the multiplicative inverse
of 2, solve the equation 2x ≡ 1
mod 7 by trying different natural
number values of x less than the
modulus.
 Here, x = 1,2,3,4,5, and 6.
2x ≡ 1 mod 7
2(1) ≡ 1 mod 7 (this is not a true congruence)
2(2) ≡ 1 mod 7 (this is not a true congruence)
2(3) ≡ 1 mod 7 (this is not a true congruence)
2(4) ≡ 1 mod 7 (this is a true congruence)
2(5) ≡ 1 mod 7 (this is not a true congruence)
2(6) ≡ 1 mod 7 (this is not a true congruence)
Hence, in mod 7 arithmetic, the multiplicative
of 2 is 4.
SOLVING CONGRUENCE
EQUATION

 Solving a congruence
equation means finding all
whole numbers values of
the variable for which the
congruence is true.
Example:
 Solve 3x + 5 ≡ 3 mod 4. Here,
we need to search for whole
number values of x for which
the congruence is true.
Solution:
 3x + 5 ≡ 3 mod 4
 Now, if we continue trying to find the other
values to be a solution, we could find that
10 and 14 are also a solution. Note that 6,
10 and 14 are all congruent to 2 mod 4.
Thus the solutions of 3x + 5 ≡ 3 mod 4 are
2, 6, 10, 14, 18, …
 Solve 3x + 4 = 2x + 8 (mod 9)
Solution:

The solution is x = 4 (mod 9)


3x + 4 = 2x + 8 (mod 9)
(3x – 2x) = (8 – 4)(mod 9)
x = 4(mod 9)
Hence, the solution is x =
4 (mod 9)

You might also like