Miniconference on the Mathematics of Computation MTH 210 Modular Arithmetic 1 Dr. Anthony Bonato Ryerson University
Even vs odd simple way to “split up” integers: a number n is even if it has 2 as a divisor we write 2 | n otherwise, it is odd
use [0] to denote even integers use [1] to denote odd integers [0] = 0, ±2, ±4, ±6 … [1] = ±1, ±3, ±5 …
Weird arithmetic [0] + [0] = [0] [0] + [1] = [1] [1] + [1] = [0] “even plus even is even” [0] + [1] = [1] “even plus odd is odd” [1] + [1] = [0] “odd plus odd is even”
Weird arithmetic [0] x [0] = [0] [0] x [1] = [1] [1] x [1] = [1] “even times even is even” [0] x [1] = [1] “even times odd is even” [1] x [1] = [1] “odd times odd is odd”
Congruences x ≡ y (mod 2) if 2 divides x – y write: 2 | (x-y) eg: 4 ≡ 0 (mod 2), 17 ≡ 1 (mod 2)
Key facts x ≡ y (mod 2) then y ≡ x (mod 2) x ≡ x (mod 2) If x ≡ y (mod 2) and y ≡ z (mod 2), then x ≡ z (mod 2)
General congruences m > 2 an integer x ≡ y (mod n) if n | (x-y) eg 13 ≡ 1 (mod 12), 23 ≡ 3 (mod 5)
Key facts x ≡ y (mod n) then y ≡ x (mod n) x ≡ x (mod n) If x ≡ y (mod n) and y ≡ z (mod n), then x ≡ z (mod n)
[2] = {x: remainder of 2 when 3 divides x} [m] = {x | x ≡ m (mod n)} called equivalence classes (mod n) or congruence classes eg if n = 3, then [2] = {x: remainder of 2 when 3 divides x}
Exercises
Miniconference on the Mathematics of Computation MTH 210 Modular Arithmetic II Dr. Anthony Bonato Ryerson University
Key facts Given a ≡ c (mod n) and b ≡ d (mod n) a + b ≡ c + d (mod n) For all integers k > 0, ak ≡ ck (mod n)
Exercises