Docsity

Modular Arithmetic - Lecture Notes | MATH 409, Assignments of Mathematics

Toggle sidebar
bg1
MODULAR ARITH METIC
G.1
APPENDIX G
Modular Arithmetic
Let n, a, b be any integer. We define
a ≡ b (mod n)
(pronounced “a is congruent to b modulo n”) provided a – b is divisible by n (i.e.,
(a – b)/n is an integer). For instance
7 ≡ 3 (mod 4) 7 ≡ 2 (mod 5) 7 ≡ 1 (mod 3) 7 ≡ 1 (mod 2)
12 ≡ 0 (mod 4) 17 ≡ -3 (mod 5) -7 ≡ 1 (mod 4) -7 ≡ -4 (mod 3)
7x ≡ 3x (mod 4) 7x ≡ 2x (mod 5) 7x ≡ x (mod 3) -17x ≡ -x (mod 16)
where x is also any integer.
pf3

Partial preview of the text

Download Modular Arithmetic - Lecture Notes | MATH 409 and more Assignments Mathematics in PDF only on Docsity!

APPENDIX G

Modular Arithmetic

Let n , a, b be any integer. We define a ≡ b (mod n ) (pronounced “ a is congruent to b modulo n” ) provided a – b is divisible by n (i.e., ( a – b )/ n is an integer). For instance 7 ≡ 3 (mod 4) 7 ≡ 2 (mod 5) 7 ≡ 1 (mod 3) 7 ≡ 1 (mod 2) 12 ≡ 0 (mod 4) 17 ≡ - 3 (mod 5) - 7 ≡ 1 (mod 4) - 7 ≡ - 4 (mod 3) 7 x ≡ 3 x (mod 4) 7 x ≡ 2 x (mod 5) 7 x ≡ x (mod 3) - 17 x ≡ - x (mod 16) where x is also any integer.

If p is a prime integer then arithmetic modulo p consists of the integers {0, 1, 2, …, p - 1}, subject to the usual four arithmetic operations, with the added stipulation that equality is to be replaced by congruence. Thus, in arithmetic modulo 5, 3 + 4 ≡ 2 3 ⋅ 4 ≡ 2 3 – 4 ≡ 4 4 x + 4 x ≡ 3 x and 2 ÷ 4 ≡ 3 (because 3⋅ 4 ≡ 2), whereas in arithmetic modulo 7, 3 + 4 ≡ 0 3 ⋅ 4 ≡ 5 3 – 4 ≡ 6 4 x + 4 x ≡ x and 5 ÷ 4 ≡ 3 (because 3⋅ 4 ≡ 5), Arithmetic modulo a prime p is very similar to the standard arithmetic. The operations of addition and multiplication are commutative, associative, and distributive. Additive and multiplicative identities and inverses exist and are unique. The additive inverse of a is, of course p – a. The multiplicative inverse, on the other hand, is harder to find. Fortunatley, for the purposes of this text, it suffices to know that in arithmetic modulo p each of the numbers {1, 2, …, p - 1} has a mutliplicative inverse.

EXERCISES H