Modular Arithmetic

Modular Arithmetic

Modular arithmetic This corresponds to chapter 2 in your book, and especially sections 2.1, 2.2, and 2.3. 1 Examples and introduction We will reconsider the example before, that a2 + b2 = c2 with a = 2m, m odd implies b; c are even. But first, let's do a slightly easier problem: Problem: Suppose n = 2m with m odd. Then there are not integers x; y with x2 − y2 = n. The idea is to consider remainder when dividing by 4. n = 2m = 2(2r + 1) = 4r + 2, so the remainder is 2. Now, x2 is either 2 2 2 • a multiple of 4, if x is even: x = (2x1) = 4x1, 2 2 2 • or is one more than a multiple of 4, if x = 2x1 + 1 is odd: x = (2x1 + 1) = 4x1 + 4x1 + 1 = 2 4(x1 + x1) + 1. Same goes with y2. But now n + y2 = x2: the LHS is either 2 or 3 more than a multiple of 4, while the RHS is 0 or 1 more than a multiple of 4. So, they cannot be equal. There is a much more efficient way of making this sort of argument. 2 Definition and first properties Suppose m 6= 0 is an integer. Definition 1. We say a is congruent to b modulo m, and write a ≡ b (mod m), if mja − b (m divides a − b.) Note that a ≡ b (mod m) if and only if a and b have the same remainder upon dividing by m. Example 7 ≡ −1 (mod 8), if n is odd, then n2 ≡ 1 ≡ 9 (mod 4). You can add, subtract and multiply modular congruences: 7 ≡ 2 (mod 3) and 2 ≡ 11 (mod 3). Consequently: • 7 + 2 ≡ 1 + 11 ≡ 0 (mod 3) • 7 · 2 ≡ 1 · 11 ≡ 2 (mod 3) • 7 − 2 ≡ 1 − 11 ≡ 2 (mod 3). The following theorem explains that you can always do this. Theorem 2 (Theorem 2.1 in NZM1). Suppose a; b; cd 2 Z (are integers). 1. a ≡ b (mod m), b ≡ a, and mja − b are equivalent 2. a ≡ b and b ≡ c mod m implies a ≡ c mod m 1Niven, Zuckerman, and Montgomery 1 3. a ≡ b and c ≡ d implies a + c ≡ b + d and ac ≡ bd mod m 4. a ≡ b, djm and d > 0 implies a ≡ b (mod d) 5. a ≡ b mod m implies ac ≡ bc (mod mc). Proof. Let's write out the proof of the multiplication property: If a ≡ b (mod m) and c ≡ d (mod m), then a = b + m`1 and c = d + m`2 for certain integers `1 and `2. Multiplying, ac = bd + m(b`2 + d`1 + m`1`2). Thus mj(ac − bd), as needed. Theorem 3 (Thereom 2.2 in NZM). If f is a polynomial with integer coefficients, and a ≡ b (mod m), then f(a) ≡ f(b) modulo m. For example, −2 ≡ 5 (mod 7) and thus • (−2)2 + (−2) ≡ 52 + 5 (mod 7) by taking f(x) = x2 + x • (−2)3 + 53 ≡ −1 (mod 7) by taking f(x) = x3. Please see the textbook for the proof of this. Example: (2m)2 = c2 − b2 with m odd implies b; c even. Proof. The LHS is 4 × odd, so is 4 modulo 8. Looking at squares modulo 8, the only possibilities are 0; 1; 4. One sees that in order for the RHS to be 4 mod 8, b and c must both be even. In the first lecture, we claimed that we would eventually prove the following statement: Theorem 4. A prime number p is a sum of two squares x2 + y2 if and only if p = 2 or p is one more than a multiple of 4. We are not ready to prove the entirety of this statement, but we can prove part of now. Namely, if p is one less than a multiple of 4 then p is not the sum of two squares: Lemma 5. Suppose p ≡ −1 modulo 4. Then there does not exist integers x; y so that p = x2 + y2. Proof. The only possible squares modulo 4 are 0 or 1 (e.g., by checking that 02 ≡ 0, 12 ≡ 1, 22 ≡ 0 and 32 ≡ 1 modulo 4). Adding, x2 + y2 can be 0; 1 or 2 modulo 4. In particular, it can never be 3, or equivalently, −1 modulo 4. Because we cannot solve the congruence p ≡ x2 + y2 (mod 4) for such p, we certainly cannot solve the equality p = x2 + y2. Here is one more example Example: Prove that x3 − 7y3 = 9 has no solutions with x; y integers. Proof. There are probably many ways to do this, but one way that works quickly is to take the equality modulo 7. Then one obtains x3 ≡ 2 modulo 7. By going through the possibilities, one checks quickly that the only cubes modulo 7 are 0; 1 and −1 modulo 7. Thus we cannot solve x3 ≡ 2 (mod 7). We will soon prove a general theorem about the powers xn modulo prime numbers (such as 7) which will imply that 0; −1; and 1 are the only possible cubes modulo p = 7.. 2 3 Inverses Above we discussed addition, multiplication, and subtraction modulo an integer m. But what about division, or said differently, multiplicative inverses? We postponed division until now because it is a little more subtle. We start with an example and a non-example. Example Can we solve 5x ≡ 3 (mod 7) for x? Well, by trial and error, one sees quickly that x ≡ 2 modulo 7 works. But is there another possibility for x (other that 2 plus multiples of 7)? Well, if we were working with regular numbers and trying to 5x = 3, we would divide both sides by 5 to 3 get x = 5 , and that would be the only solution. So, can we divide by 5 modulo 7? The thing to do is multiple both sides by 3. Then, one gets 15x ≡ 9 (mod 7). But 15x = 1 14x + x ≡ x mod 7 because 7 divides 14. Thus x ≡ 9 ≡ 2 (mod 7) as desired. So, 3 acts like \ 5 ", the inverse of 5. So, similarly, if I wanted to solve 5x ≡ 2 modulo 7, I would multiply both sides by 3 to get x ≡ 6 (mod 7), the only solution (modulo 7). Here is a non-example: Can I solve 5x ≡ 3 modulo 10? Well, no. In this case, the LHS is always 0 or 5 modulo 10, never 3. The problem is that 5 and 10 have a common divisor, namely 5. We these examples, we can state the way inverses work modulo m. Theorem 6. Suppose a; m are integers which have no common divisor. Then there exists an integer b so that a · b ≡ 1 modulo m. Moreover, the class of b is unique modulo m in the sense that if ab1 ≡ 1 and ab2 ≡ 1 then b1 ≡ b2 (mod m). In other words, a has an inverse modulo m, the integer b of the above theorem; we write a−1 for this element. To prove this theorem, let us first state something from chapter 1 that we skipped over, that is very useful. Theorem 7 (Theorem 1.3 in NZM). If g is the gcd of the integers b and c, then there exists integers x0 and y0 so that g = bx0 + cy0. For example, if b = 7 and c = 9, then the gcd is 1 and 1 = 7(4) + 9(−3). We discussed the proof of this in class. Please see your textbook to look at the proof again. Using the theorem, one obtains the various consequences. First, we prove Theorem 6. Proof of Theorem 6. Because a and m are relatively prime we can write 1 = ax0 + my0. Taking b = x0 proves the first part. For the second part, if ab1 ≡ 1 ≡ ab2, then b1 ≡ b1(ab2) ≡ (ab1)b2 ≡ b2 (mod m) as desired. Definition For integers m1; m2 we let (m1; m2) denote the gcd of m1 and m2. Thus, for example, (7; 9) = 1 while (20; 8) = 4. That integers a and m are relatively prime is equivalent to the state- ment (a; m) = 1. Here is another consequence: Proposition 8. Suppose a; b; m; p are integers, and p is prime. 3 1. If (a; m) = 1 and (b; m) = 1 then (ab; m) = 1. 2. If mjab and (a; m) = 1 then mjb. 3. In particular, if p is prime and pjab then pja or pjb. Proof. This proposition is intuitive from the unique factorization of integers into powers of primes that you learned in grade school. However, if you really want to prove that unique factorization statement, you'd actually prove this proposition first, and then use it on the way to proving unique factorization. So, let's prove this proposition from more basic principles, namely Theorem 7. For the first part, we can write ax0 + my0 = 1 and ax1 + my1 = 1. Multiplying the two expressions gives abx2 + my2 = 1, where x2 = x0x1 and you can find y2 by multiplying everything out. For the second part, (a; m) = 1 implies 1 = ax0 + my0 and thus b = abx0 + mby0. Because m divides ab, m divides the RHS and thus m divides b, which is the LHS. For the third part, because p is prime, either pja or (a; p) = 1. If pja then we are done. If p does not divide a, then (a; p) = 1 and so pjb by part 2. As an application of what we have already worked out, one has the result that is known as Fermat's little theorem: Theorem 9.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    7 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us