Introduction to Number Theory Integers Z3 2 1
Introduction to Number Theory Integers: Z={…-3, -2, -1, 0, 1, 2, 3, …} Operations: addition, multiplication, subtraction. Given any two integers a, b Z we can define a + b Z a b Z Integers Z are closed under operations ‘+’, ‘ ’. Closure properties under +, , If a, b are integers, then a+b, a b are integers. 1
Commutative Law If a, b are integers, then a+b=b+a; a b=b a Associative Law If a, b are integers, then a+(b+c) = (a+b)+c; a ( b c ) = (a b) c Distributive Law If a, b are integers, then a (b+c) = a b+ a c Identity elements for addition and multiplication For all integer a, a+0=a; a 1= a Additive inverse For all integer a, a + ( a) = ( a)+a = 0 2
If a, b Z, b 0, then it may be that (a / b) Z, so integers are not closed under division. Example. If we divide 10 by 5, the result is an integer again. So, we say, that 10 is divisible by 5 because there exists an integer n (2 in this case) such that 10=5 n. But 10 is not divisible by 3 (within integer domain). Definition. Given two integers a, b Z, b 0, we say that a is divisible by b and denote it b | a, if there exists an integer n Z, such that a = b n. multiple of b divisor of a 3
Integers divisible by the positive integer d … 3 d 2 d d 0 d 2 d 3 d 4 d … Divisors of 6 are: 1, 2, 3, 6. 4
Some properties of divisibility For any a Z : 1) a | 0 2) 1 | a because 0= a 0 because a =1 a For any a, b Z 3) If a | b and b | a, then a = b 4) If a | b and b>0 and a>0, then a b 5) If m Z, m 0, then a | b if and only if (m a)|(m b) 5
For any a, b, c 6) If a | b and b | c, then a | c. Proof. a | b b = a x for some x Z (by defn of divisibility) b | c c = b y for some y Z (by defn of divisibility) By substitution we have c = (a x) y. By associative law, c = a (x y). x y=k is an integer by the closure property of integers under multiplication. c = a k means that a | c. 6
7) If a | b then a | b c. Proof. By the definition of divisibility a | b implies that there is some integer x such that b = a x. For any integer c, b c = (a x) c = a (x c) by associative property of multiplication. By the closure property integers under multiplication x c = k, an integer, so b c =a k, i. e. a | b c 8) If a | b and a | c then a | (bx + cy) for any x, y Z Proof is left as an exercise. Does the linear equation 21 x + 3 y= 133 has integer solution ? No, because for any integer x, y, 3| (21 x + 3 y), but 133 is not divisible by 3. 7
What is the outcome when any integer b is divided by any positive integer a >0 in general case? For example, if 25 is divided by 7, the quotient is 3 and the remainder is 4. These numbers are related by 25=3 7+4. Division Algorithm. Given any integers a and b, with a>0, there exist unique integers q and r such that b = a q + r, with 0 r <a. dividend divisor quotient remainder Example. a =35, b =11. What are q and r ? … 33 22 35 = 11 1+24 11 0 35 = 11 4 9 11 22 33 35 = 11 3 + 2 0 2<11 … 44 8
Proof. Consider the multiples of a on the real line: 3 a b 2 a a 0 a 2 a 4 a r … a +(b +a)= b=a+(b a)=2 a+(b 2 a)= 3 a+(b 3 a)=4 a+(b 4 a)=… We can always find such a multiple a q, that the remainder r = b a q satisfies 0 r <a. 9
Consider set R ={… b + 2 a, b+a, b, b a, b 2 a , … } 2 a a 0 a 3 a 2 a b 3 a b 2 a b 4 a b b+a b +2 a Among nonnegative terms of R there exists the smallest element (by Well-Ordering Principle). Denote this smallest nonnegative r, then we have that for some q and r: r = b q a 0 and r a < 0. If not (i. e. if r a 0), b = q a +r = (q+1) a +r a and r is not the smallest positive term (contradiction). So, 0 r <a. 10
To prove the uniqueness of q and r, suppose there is another pair q 1 and r 1 satisfying the same conditions, i. e. we have b=a q+r and b=a q 1+r 1, with 0 r, r 1 <a. Assume r < r 1, so that 0 < r 1 r <a. Then by subtracting we have r 1 r = a (q q 1), so a | (r 1 r ) by definition of divisibility. Since r 1 r >0 and a >0 it means that r 1 r a in contradiction to 0 r, r 1 <a. Hence r = r 1 and q =q 1, i. e. the quotient and remainder are unique. 11
Definition. Let a, b Z. An integer d is called a common divisor of a and b if d | a and d | b. For any two integers a and b the greatest common divisor is always defined (except the case a = b =0) and is denoted by gcd (a, b). Note, that gcd (a, b) 1. • if gcd (a, b) =1, integers a and b are called relatively prime. • gcd (a, b) = gcd (b, a) = gcd ( a, b) = gcd (a, b) = gcd ( a, b) 12
Theorem 1. The gcd(a, b) is the least positive value of ax+by, where x and y range over all integers. Proof. Consider set of integers {ax+by| x, y Z}. This set includes positive, negative values and 0. Choose x 0 and y 0 so that l =ax 0+by 0 is the least positive integer l in the set. Prove that l | a and l | b. Prove l | a by contradiction. Assume l /| a , i. e. a = q l+r , where 0<r<l. Hence r = a q l = a q (ax 0+by 0 )= a (1 q x 0)+b ( q y 0). So, r {ax+by| x, y Z}, but it is smaller than l (why? ) in contradiction with assumption, that l is the least positive element in the set. l | b is proved analogously. Let d =gcd(a, b). It means that a = d n and b = d m. Then, l = ax 0+by 0 = d (nx 0+my 0), thus d | l and so l d. But l > d is impossible, since d is the greatest common divisor. 13 So, l =d.
Some consequences of the Theorem 1: • If an integer c is expressible in the form c =ax+by , it is not necessary that c is the gcd(a, b). But it does follow from such an equation that gcd(a, b) is a divisor of c. Why? • From the fact that ax+by=1 for some integers x and y we can imply that a and b are relatively prime. Why? Because ax+by=1 is divisible by gcd(a, b), that means that gcd(a, b)=1. • If d is any common divisor of two integers, i. e. d | a and d | b , then d | gcd(a, b). Why? • gcd(na, nb)=n gcd(a, b) for any integers a, b, n. 14
How to find gcd of two integers? a =10, divisors: 1, 2, 5, 10 b =24, divisors: 1, 2, 3, 4, 6, 8, 12, 24 gcd(10, 24)=2 By the Theorem 1, there are some integers x and y , such that 10 x +24 y =2. 10 5+24 ( 2) = 2 (found by inspection). So, we found an integer solution of equation 10 x +24 y =2. Is it unique? 10 (5 12 k)+24 ( 2+5 k) = 2 What if we consider equation 10 x +24 y =4? 5 x +12 y =1? 10 x +24 y =1? 15
Theorem 2. An integer solution (x , y) of equation ax + by =c exists if and only if c is divisible by gcd(a, b). Proof. Let d = gcd(a, b). We need to prove: 1). d | c x, y Z such that ax + by =c 2) x, y Z such that ax + by =c d | c 1) Assume d | c c = n d, n Z c = n (ax 0+by 0 ) = a(n x 0)+b (n y 0) x y 2) Assume ax + by =c d | a and d | b d | ax + by d | c 16
Given two integers a and b how can we find gcd (a, b)? Lemma. Let a = bq + r, where a , b, q and r be integers. Then gcd(a, b)=gcd(b, r) Proof. It is sufficient to prove that common divisors of a and b are the same as common divisors of b and r. Let d be a common divisor of a and b. It means that d | a and d | b. Then d | (a bq ), i. e. d is also a divisor of r. Let f be a common divisor of b and r It means that f | b and f | r Then f | bq + r , i. e. f is also a divisor of a. 17
Euclidian Algorithm. Consider an example: a=963, b = 637. We have 963 = 1 657+306 a=b q 1+r 1 0< r 1<b 657 = 2 306+45 b=r 1 q 2+r 2 0< r 2< r 1 306 = 6 45+36 r 1=r 2 q 3+r 3 0< r 3 < r 2 45 = 36+9 r 2=r 3 q 4+r 4 0< r 4 < r 3 36 = 4 9 r 3=r 4 q 5 We are going to show that the last nonzero remainder (r 4=9) is the gcd(963, 657). Let d is any common divisor of a and b: d |963 and d | 657 d | 306 d |657 and d | 306 d | 45 d |306 and d | 45 d | 36 d |45 and d | 36 d | 9 What can be implied from here? gcd(963, 657) | 9 18
On the other hand 9 is a divisor of both 963 and 657. Let’s go backward: 963 = 1 657+306 657 = 2 306+45 306 = 6 45+36 45 = 36+9 36 = 4 9 9|306 and 9|45 9|657 9|45 and 9|36 9|306 9|36 and 9|9 9| 45 By the Theorem 1: gcd (963, 657) = 963 x 0 +657 y 0 , so 9| 657 and 9| 963 9| gcd (963, 657) gcd(963, 657) | 9 and 9| gcd(963, 657) 9 = gcd(963, 657) by the property a|b and b|a (a, b>0) a=b 19
Euclidian Algorithms can be used to find the integers x 0 and y 0 that give gcd (a, b)= ax 0+by 0. 963 = 1 657+306 657 = 2 306+45 306 = 6 45+36 45 = 36+9 36 = 4 9 9 = 45 36 = 45 (306 6 45) = 306 + 7 45 = 306 + 7 (657 2 306) = 7 657 15 306 = 7 657 15 (963 657) = 22 657 15 963 So we can express the last nonzero remainder 9 as the linear combination of 657 and 963: 9 = gcd (657, 963) = 657 x 0+963 y 0 x 0=22, y 0 = 15 20
Theorem 3 (Euclidian Algorithm). Given integers a and b>0, a > b, we apply repeatedly the division algorithm to obtain a series of equations: a=b q 1+r 1 0< r 1<b b=r 1 q 2+r 2 0< r 2< r 1=r 2 q 3+r 3 0< r 3 < r 2 … … rj 2= rj 1 qj+rj 0< rj <rj 1= rj qj +1 Proof. By the Lemma gcd(a, b)= gcd(b, r 1)= gcd(r 1, r 2)=… = gcd(rj 1, rj)= gcd(rj , 0)= rj 21
• To find integer solution of an equation ax+by=c, we need to check first, that gcd(a, b) divides c. For example, to find integer solution for 85 x +34 y = 51, find the gcd(85, 34) using Euclid Algorithm: 85=34 2+17; 34= 17 2 Since 17|51 a solution exists. So, gcd(85, 34)=17. • Find the integers u, v in gcd(a, b)=au+bv. 17 = 85 34 2, u = 1, v = 2. By multiplying by 3 we find: 51=85 3+34 ( 6), i. e. x =3 , y = 6 is a solution. 22
• Other integer solutions 51= 85 x+34 y 17 = 85 u +34 v 1= 5 u +2 v 51 = 85(x 6 k) + 34(y+15 k) 17= 85(u 2 k)+34(v+5 k) 1=5(u 2 k) +2(v+5 k) where k is any integer. 23
- Slides: 23