Arithmetic Operations and Solving Linear Equations Modulo m
1. Arithmetic Operations Modulo m
In modular arithmetic, numbers are reduced to their remainders after division by mmm.
The notation:
a (mod m) means we divide a by m and take the remainder.
A. Addition Modulo m
Rule: (a + b) (mod m)
Example:
Find: 7 + 9 (mod 5)
Step 1: Add first: 7 + 9 = 16
Step 2: Divide by 5: 16 ÷ 5 = 3 remainder 1
Therefore: 7 + 9 ≡ 1 (mod 5)
B. Subtraction Modulo m
Rule: (a − b) (mod m)
Example:
Find: 8 − 13 (mod 6)
Step 1: Subtract: 8 – 13 = −5
Step 2: Add 6 until it becomes positive: −5 + 6 = 1
Therefore: 8 − 13 ≡ 1 (mod 6)
C. Multiplication Modulo m
Rule: (a × b) (mod m)
Example:
Find: 4(7) (mod 5)
Step 1: Multiply: 4(7) = 28
Step 2: Divide by 5: 28 ÷ 5 = 5 remainder 3
Therefore: 4(7) ≡ 3 (mod 5)
D. Division Modulo m
Division is different because we need a multiplicative inverse.
The inverse of a modulo mmm is a number x such that:
ax ≡ 1 (mod m)
Example:
Find: (mod 5)
Step 1: Find the inverse of 2:
Try the numbers:
2 × 1 = 2 ≡ 1
2 × 2 = 4 ≡ 1
2 × 3 = 6 ≡ 1 (mod 5)
2 × 4 = 8 ≡ 3 (mod 5)
8 ÷ 5 = 1 remainder 3
So, 2-1 ≡ 3 (mod 5)
2(4) ≡ 3 (mod 5)
Therefore: 3/2 ≡ 4 (mod 5)