* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Chap 6
Elementary algebra wikipedia , lookup
Polynomial greatest common divisor wikipedia , lookup
Factorization wikipedia , lookup
Factorization of polynomials over finite fields wikipedia , lookup
History of algebra wikipedia , lookup
Field (mathematics) wikipedia , lookup
Fundamental theorem of algebra wikipedia , lookup
Commutative ring wikipedia , lookup
Birkhoff's representation theorem wikipedia , lookup
Homomorphism wikipedia , lookup
FUNDAMENTALS OF ALGEBRA 37 6. Modular Arithmetic (Last updated 5/16/11) 6.1. Equivalence Classes Modulo m. We know from Definition 5.1 that a ≡ b (mod m) if m (a−b), or, equivalently, a and b have the same remainder upon division by m. By taking the subsets of the integers which consist of numbers congruent to each other, we obtain what is known as the set of equivalence classes modulo m. Each class has no numbers in common with any other class, and every integer lies in a (unique) class. Separating the set of integers into these nonempty, disjoint classes is known as partitioning the set of integers. Since every integer is congruent to its remainder upon division by m, there are exactly m congruence classes (mod m), one for each of the remainders 0, 1, 2, . . . , m − 1. Example 6.1. Consider the congruence a ≡ b (mod 5). Every integer is equivalent to exactly one of 0, 1, 2, 3, 4. The partition of the integers into the five equivalence classes (mod 5) is: {. . . , −10, −5, 0, 5, 10, . . . } {. . . , −9, −4, 1, 6, 11, . . . } {. . . , −8, −3, 2, 7, 12, . . . } {. . . , −7, −2, 3, 8, 13, . . . } {. . . , −6, −1, 4, 9, 14, . . . } Notice that the elements of each of these sets, in increasing order, is an arithmetic sequence with common difference 5. Notice also that every integer is an element of exactly one of these five sets. 6.2. Arithmetic on Equivalence Classes Modulo m. Since we can add and multiply integers, it is natural to ask whether or not we can do the same with these equivalence classes (mod m). In fact, we can, and we have already shown it in Theorem 5.3: If a ≡ b (mod m) and c ≡ d (mod m), then (1) a + c ≡ b + d (mod m) and (2) ac ≡ bd (mod m). Let’s dissect this theorem a bit. The hypothesis, that a ≡ b (mod m) and c ≡ d (mod m), means that a and b lie in the same equivalence class, as do c and d. If we represent the set of integers as the circle below, then the five equivalence classes are represented by the five sectors for m = 5: 38 VAN WYK’S MATH 304 a+c b+d c d ac a bd b The hypothesis of Theorem 5.3 states that a and b lie in the same sector, as do c and d. The first conclusion states that a + c and b + d must lie in the same sector, and the second conclusion states that ac and bd must also lie in the same sector. In other words, no matter which elements in each sector we choose, the sums and products are equivalent. This allows us to compute sums and products by choosing any representatives we want. Example 6.2. Referring to the equivalence classes for m = 5 of Example 6.1 and the letters of Theorem 5.3, take a = 2, b = 112, c = 8, and d = −77. (Notice 2 ≡ 112 (mod 5) and 8 ≡ −77 (mod 5).) Then a + c = 2 + 8 = 10, b + d = 112 − 77 = 35, and 10 ≡ 35 (mod 5). Also, ac = 2 · 8 = 16, bd = 112 · (−77) = −8624, and 16 ≡ −8624 (mod 5). Since we can add and subtract (mod m) by using any representatives we want, we are free to use the m least residues (mod m): 0, 1, 2, . . . , m − 1. Taking the least residue of each sum or product of these elements, we have an algebraic structure on a set with m elements. 6.3. Zm . Definition 6.1. The set of least residues 0, 1, 2, 3, . . . , m − 1 with the addition and multi- plication mentioned above is called the set of integers modulo m, denoted Zm . Example 6.3. The addition and multiplication tables for Z5 are: + 0 1 2 3 4 0 0 1 2 3 4 1 1 2 3 4 0 2 2 3 4 0 1 3 3 4 0 1 2 4 4 0 1 2 3 · 0 1 2 3 4 0 0 0 0 0 0 1 0 1 2 3 4 2 0 2 4 1 3 3 0 3 1 4 2 4 0 4 3 2 1 Notice how we take the least residue of each sum or product, so that every result is one of 0, 1, 2, 3, 4, or 5. For example, 4 + 3 = 7 ≡ 2 (mod 5), and 4 · 4 = 16 ≡ 1 (mod 5). FUNDAMENTALS OF ALGEBRA 39 The addition and multiplication tables in Example 6.3 show that Z5 has many of the same properties as the integers. In particular, (1) 0 is the additive identity since 0 + n = n + 0 = 0 for all n. (2) 1 is the multiplicative identity since 1 · n = n · 1 = n for all n. Since the elements of Zm in general are really equivalence classes of integers, and since the operations of addition and subtraction of integers possess a number of other properties, it is not surprising that many of these properties are inherited by Zm . For example, (1) Addition is associative: (a + b) + c = a + (b + c), for all a, b, and c. (2) Addition is commutative: a + b = b + a, for all a and b. (3) Multiplication is associative: (ab)c = a(bc), for all a, b, and c. (4) Multiplication is commutative: ab = ba, for all a and b. (5) Multiplication distributes over addition: a(b + c) = ab + ac, for all a, b, and c. Furthermore, every element has an additive inverse: the additive inverse of a in Zm is (m − a), since a + (m − a) = (m − a) + a = 0. For example, 1 and 4 are additive inverses in Z5 , as the addition table in Example 6.3 shows. 6.4. Cancellation in Zm . However, there are some important differences between the algebraic structure of Z and that of Zm (other than the fact that the former is an infinite set while the latter is finite): (1) In Z, the equation ax = ay implies x = y; this is not always true in Zm . (2) In Z, the equation xy = 0 implies x = 0 or y = 0; this is not always true in Zm . (3) in Z, the only elements with a multiplicative inverse are 1 and −1; there can be other elements with multiplicative inverses in Zm other than 1 and m − 1. (The element m − 1 plays the role of −1 in Zm since m − 1 ≡ −1 (mod m).) We can see an example of the third difference in the multiplication table for Z5 , where 3 and 2 are multiplicative inverses, since 3 · 2 = 2 · 3 = 1. To illustrate the first two of these differences, we look at Z6 . Example 6.4. The addition and multiplication tables for Z6 are: + 0 1 2 3 4 5 0 0 1 2 3 4 5 1 1 2 3 4 5 0 2 2 3 4 5 0 1 3 3 4 5 0 1 2 4 4 5 0 1 2 3 5 5 0 1 2 3 4 · 0 1 2 3 4 5 0 0 0 0 0 0 0 1 0 1 2 3 4 5 2 0 2 4 0 2 4 3 0 3 0 3 0 3 4 0 4 2 0 4 2 5 0 5 4 3 2 1 40 VAN WYK’S MATH 304 Notice that while 4 · 2 = 4 · 5 = 2, we cannot “cancel” the 4’s to conclude 2 = 5. Notice also that 3 · 2 = 0, but neither 3 nor 2 is 0. It turns out that these two problems – not being able to cancel when we want and having a product of nonzero elements equal to zero – are equivalent. Using the list above, call being able to cancel Property (1) and being able to conclude that x = 0 or y = 0 whenever xy = 0 Property (2). Suppose Property (2) holds, and we have a nonzero element a such that ax = ay. Then it follows that ax − ay = 0, so a(x − y) = 0. We can then conclude that either a = 0 (which is impossible by our assumption) or x − y = 0, so we know x = y. Conversely27, suppose Property (1) holds and we have the equation xy = 0. If x #= 0, then xy = 0 = x · 0, so we can conclude y = 0 by canceling the x’s from the equation xy = x · 0. Thus Property (1) and Property (2) are equivalent. Definition 6.2. If a and b are nonzero elements such that a · b = 0, then a and b are called zero-divisors. Since we can cancel in equations of the form ax = ay (or xa = ya) when no zero-divisors are present, it would be nice to know how to detect zero-divisors. Example 6.5. We can see from the multiplication table in Example 6.4 that 2, 3 and 4 are zero-divisors in Z6 , while 1 and 5 are not. We can also see from the multiplication table in Example 6.3 that Z5 has no zero-divisors. Theorem 6.1. Let a be an integer such that gcd(a, m) = 1. Then (1) If ab ≡ 0 (mod m), then b ≡ 0 (mod m). (2) If ar ≡ as (mod m), then r ≡ s (mod m). (3) There is an integer a! such that a · a! ≡ 1 (mod m). Before proving this theorem, let’s see what it means for elements of Zm : those least residues that are relatively prime to m (1) cannot be zero-divisors, (2) can be cancelled, and (3) must have a multiplicative inverse. Example 6.6. In Z5 , each of 1, 2, 3, and 4 is relatively prime to 5, so none can be zero divisors and all can be cancelled. The multiplicative inverse pairs are: 1 ↔ 1 (always), 2 ↔ 3, and 4 ↔ 4. In Z6 , only 1 and 5 are relatively prime to 6, and each of them is its own multiplicative inverse. 27Recall if we want to prove the statement “If xy = 0, then x = 0 or y = 0,” it suffices to prove “If xy = 0 and x #= 0, then y = 0.” FUNDAMENTALS OF ALGEBRA 41 Proof. Since gcd(a, m) = 1, there exist integers x and y such that ax + my = 1 by Corollary 2.1. If ab ≡ 0 (mod m), then m (ab). Multiplying both sides of ax + my = 1 by b yields (ab)x + mby = b. Since m divides (ab)x and m divides mby, it follows that m divides b, so b ≡ 0 (mod m). Thus a is not a zero-divisor, and so it can be cancelled in the equation ar ≡ as (mod m). Lastly, since ax+my = 1, taking this equation (mod m) yields ax+0 ≡ 1 (mod m), so we can take a! = x. ! Elements that have multiplicative inverses have a special name: Definition 6.3. If a and b are elements such that a · b = 1, then a and b are called units. Notice in Example 6.6, no element is both a zero-divisor and a unit. In fact, no element can be both in Zm , or in any algebraic structure which possesses the distributive laws of multiplication over addition, and which has additive inverses. Theorem 6.2. No element can be both a zero-divisor and a unit. Proof. Suppose a is both; then a #= 0, and there exist both b #= 0 such that ab = 0 and a! such that a! a = 1. But ab = 0 ⇒ a! (ab) = a! · 0 ⇒ (a! a)b = a! · 0 ⇒ 1 · b = a! · 0 ⇒ b = 0, which is a contradiction28. ! The situation in Zm is particularly simple: Theorem 6.3. Every nonzero element of Zm is either a zero-divisor or a unit (but not both). Proof. Given a #= 0, there are two possibilities: either gcd(a, m) = 1 or gcd(a, m) = d > 1. In the former case, a is a unit by Theorem 6.1 (3). In the latter case, both md and ad are integers (since d = gcd(a, m)) and 1 < md < m. But then ( md ) · a = m · ( ad ) ≡ 0 (mod m), so a is a zero-divisor. ! Example 6.7. Consider Z300 . Since 300 = 22 ·3·52, the units in Z300 are the integers between 1 and 299 that do not have 2, 3 or 5 in their prime factorizations, while the zero-divisors are those that do. 28Notice the obvious use of the associative law of multiplication on the left side of the equation above, and the non-obvious use of the distributive law and additive inverse property. For while it is certainly true that a! · 0 = 0 in Zn , it is not obvious that this is true in a more general algebraic setting. Here is why it is true, given the above properties: a! · 0 = a! · (0 + 0) = a! · 0 + a! · 0 ⇒ a! · 0 = 0. 42 VAN WYK’S MATH 304 For example, 208 = 24 ·13 is a zero divisor in Z300 . The proof of Theorem 6.3 actually shows how to find a nonzero element x of Z300 such that 208·x = 0 in Z300 . Since gcd(208, 300) = 4, both 208 and 300 are integers. So 0 ≡ 208 · 300 ≡ 208 · 300 ≡ 208 · 75 (mod 300). Thus 4 4 4 4 208 · 75 = 0 in Z300 . The element 75 is not unique, since it is also true that 208 · 150 = 0 in Z300 . Also, 77 = 7·11 must be a unit in Z300 since it doesn’t contain 2, 3, or 5 in its prime factor- ization. We can find its multiplicative inverse in Z300 using the techniques in Example 2.6 and Example 2.7. That is, we can use the Euclidean Algorithm (forward and backward) to show 77 · (113) + 300 · (−29) = 1. Taking this equation (mod 300) yields 77 · 113 ≡ 1 (mod 300), so the multiplicative inverse of 77 in Z300 is 113. Unlike zero divisor pairs, this multiplicative inverse of 77 is unique; no other element x of Z300 will satisfy the equation 77 · x = 1. Since gcd(199, 300) = 1, 199 is also a unit in Z300 . Completing a computation similar to that above yields 199 · (−101) + 300 · (67) = 1. However, −101 is not an element of Z300 , so we must take its least residue (mod 300). Since −101 ≡ 199 (mod 300) (notice 300 − 101 = 199), 199 is its own multiplicative inverse (mod 300). In other words, 199 satisfies the equation x2 ≡ 1 (mod 300). So, to summarize, the elements of Zm can be partitioned into the following three sets: (1) {0}. (2) The set of units of Zm , which consists of the nonzero elements of Zm relatively prime to m. (3) The set of zero divisors of Zm , which consists of the nonzero elements of Zm not relatively prime to m. Problems. 1. List the elements of the partition of the integers into its equivalence classes (mod 10), as in Example 6.1. 2. Complete the addition table for Z8 and the multiplication table for the nonzero elements of Z8 . Which elements are units? Which are zero-divisors? 3. List the units and the zero-divisors in Z12 . 4. Find two different values of m so that 78 is a zero divisor in Zm . Find two different values of m so that 78 is a unit in Zm . 5. Find all the square roots of 5 in Z11 , that is, find the elements of Z11 that satisfy x2 ≡ 5 (mod 11). FUNDAMENTALS OF ALGEBRA 43 6. Find all the multiples29 of 8 in Z10 . Do the same for 5 and for 3. 7. Find a, b and c in Z15 so that ac = bc but a #= b. 8. Show that (a + b)3 = a3 + b3 when the coefficients are elements of Z3 but not when they are elements of Z, that is, the given equation is always true for elements of Z3 but not always true for elements of Z. Hint. Rather than checking all 9 possible values for a and b in Z3 , expand the left hand side and see what happens30. 9. Determine whether 35 is a unit or a zero-divisor in Z75 . If it is a unit, find its multiplicative inverse (see Example 6.7); if it is a zero-divisor, find a nonzero x in Z75 such that 35·x ≡ 0 (mod 75) (see the proof of Theorem 6.3). 10. Do the same for 16 in Z75 . 11. Do the same for 51 in Z75 . 12. Fill in the addition table for Z10 with the elements reordered as shown below. 0 + 2 4 6 8 1 3 5 7 9 0 2 4 6 8 1 3 5 7 9 Use this to complete the following table summarizing the above for elements of Z10 . + even odd even odd 29Notice 30The Dream. this set consists of 1 · 8 = 8, 2 · 8 = 8 + 8, 3 · 8 = 8 + 8 + 8, . . . , 9 · 8. equation (a + b)p = ap + bp , which holds in certain algebraic structures, is knows as The Freshman’s