150 likes | 475 Views
6. Modular Arithmetic. After this module. Modular mathematical system Modular Arithmetic and Multiplication Caley’s table. Congruence of Numbers. If a and b are integers and m is a positive integer, then “ a is congruent to b modulo m” if m divides a-b
E N D
Afterthis module • Modularmathematical system • ModularArithmetic and Multiplication • Caley’s table
Congruence of Numbers • If a and bare integers andm is a positive integer, then • “a is congruent to b modulo m” if m divides a-b • Notation: a ≡ b (mod m) • Rephrased: m | a-b • Rephrased: a mod m = b mod m • If they are not congruent: a ≡ b (mod m) • Example: Is 17 congruent to 5 modulo 6? • Rephrased: 17 ≡ 5 (mod 6) • As 6 divides 17-5, they are congruent • Example: Is 24 congruent to 14 modulo 6? • Rephrased: 24 ≡ 14 (mod 6) • As 6 does not divide 24-14 = 10, they are not congruent
Properties of the Congruence Relation Proposition: Let a, b, c, n be integers with m>0 • a 0 (mod m) if and only if n | a • a a (mod m) Reflexivity • a b (mod m) if and only if b a (mod m) Symmetry • if a b and b c (mod m), then a c (mod m) Transitivity Corollary: Congruence modulo m is an equivalence relation. Every integer is congruent to exactly one number in {0, 1, 2, …, m–1} modulo m
Congruence Relation Definition: Let a, b, m be integers with m>0, we say that a b (mod m), if a – b is a multiple of m. Properties:a b (mod m) if and only if m | (a – b) if and only if m | (b – a) if and only if a = b+k·mfor some integer k if and only if b = a+k·mfor some integer k E.g., 327 (mod 5), -1237 (mod 7), 1717 (mod 13)
Residues • The result of a mod n is always a nonnegative integer less than n • We can say that the modulo operation creates a set, which in modular arithmetic is referred to as the set of least residues modulo n, or Zn.