 # 1 Section 2.4 The Integers and Division. 2 Number Theory Branch of mathematics that includes (among other things): –divisibility –greatest common divisor.

## Presentation on theme: "1 Section 2.4 The Integers and Division. 2 Number Theory Branch of mathematics that includes (among other things): –divisibility –greatest common divisor."— Presentation transcript:

1 Section 2.4 The Integers and Division

2 Number Theory Branch of mathematics that includes (among other things): –divisibility –greatest common divisor –modular arithmetic

3 Division Division of one integer by another (e.g a/b) produces 2 results: –quotient: number of time b “goes into” a –remainder: what’s left over if the values don’t divide evenly

4 Division If a and b are integers and a  0, a divides b if there exists an integer c such that b = ac This also means that c divides b –a and c are factors of b –b is a multiple of both a and c The notation a|b means a divides, or is a factor, of b

5 Division If n and d are integers, how many positive integers <= n are divisible by d? –All integers divisible by d are of the form dk (where k is a positive integer) –So the positive integers divisible by d which are <= n are is the set of all k’s such that: 0 < dk <= n or 0 < k <= n/d Thus, there are  n/d  positive integers <= n which are divisible by d

6 Theorem 1 Let a, b & c be integers. Then: –if a|b and a|c, then a|(b+c) –if a|b then a|bc, for all integers c –if a|b and b|c, then a|c

7 Proof of Theorem 1 Part 1: if a|b and a|c, then a|(b+c) –If a|b and a|c, there must be integers s & t such that b = as and c = at –So b+c = as+at = a(s+t) –Then by definition of divisibility, a|(b+c) Part 2: if a|b then a|bc for all integers c –If a|b, then b = at for some integer t –so bc = a(tc) and, by definition, a|bc

8 Prime Numbers A positive integer that has only 2 positive integer factors (1 and itself) is a prime number A positive integer > 1 that is not prime is a composite

9 Theorem 2: Fundamental Theorem of Arithmetic Every positive integer can be written as the product of primes Usually, the prime factors are written in increasing order, for example: 2 x 3 x 103 = 618

10 Theorem 3 If n is a composite integer, then n has a prime divisor <=  n For example, 103 is prime because:  103  = 10 and the primes < 10 are 2, 3, 5 and 7 Since none of these is a factor of 103, 103 must be prime

11 Divide n by successive primes, beginning with 2 If n has a prime factor, then some prime number p <=  n will be found divisible by n If such a value p is found, continue by factoring n/p –look for value q such that p < q <=  n/p –if found, continue by factoring n/pq, etc. Procedure for determining prime factors of and integer n

12 Example Find prime factorization of 65238: 65238 = 2 x 32619 = 2 x 3 x 10873 Testing prime numbers: 5, 7, 11, 13, 17, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79 Finally, a factor is found: 65238 = 2 x 3 x 83 x 131 Since  131 < 83, no further testing required - 131 is prime

13 Theorem 4: the Division Algorithm For any integer a and positive integer d, there exist unique integers q and r such that: a = dq + r with 0 <= r <= d In the above expression: –a is the dividend –d is the divisor –q is the quotient –r is the remainder (always positive)

14 Greatest Common Divisors For two non-zero integers a and b, the largest integer d such that d|a and d|b is the greatest common divisor of a & b, denoted gcd (a,b)

15 Finding gcd: method 1 Find all possible divisors of both numbers, and choose the largest one they have in common Example: find gcd(81, 99) –factors of 81: 1, 3, 9, 27, 81 –factors of 99: 1, 3, 9, 11, 33, 99 –so gcd(81, 99) = 9

16 Relatively prime numbers Two numbers are relatively prime if their gcd is 1 Integers in a set {a 1, a 2, … a n } are pairwise relatively prime if: gcd(a i,a j ) = 1 whenever 1 <= i <= j <=n

17 Relative prime examples (14,15,21): gcd(14,15) = 1 gcd(14, 21) = 7 gcd(15,21) = 3 so they are not relatively prime (7,8,9,11) gcd(7,8) = 1gcd(8,9) = 1gcd(9,11) = 1 gcd(7,9) = 1gcd(8,11) = 1 gcd(7,11) = 1so they are relatively prime

18 Method 2 for finding gcd Use prime factorizations of integers: a = p 1 a 1 *p 2 a 2 * … *p n a n b = p 1 b 1 *p 2 b 2 * … *p n b n –each exponent is non-negative –all primes occurring in the factorizations of either a or b are included in both factorizations, with 0 exponents where necessary gcd(a,b) = p 1 min(a 1,b 1 ) *p 2 min(a 2,b 2 ) *…*p n min(a n,b n )

19 Example a = 12, b = 9 12 = 2 1 * 2 1 * 3 1 * 3 0 = 2 2 * 3 1 9 = 2 0 * 2 0 * 3 1 * 3 1 = 2 0 * 3 2 So gcd(12,9) = 2 min(0,2) *3 min(1,2) = 2 0 * 3 1 = 3

20 Least Common Multiple For two positive integers a and b, the lcm(a,b) is the smallest positive integer that is divisible by both a and b In other words, lcm(a,b)=p 1 max(a 1,b 1 ) *p 2 max(a 2 b 2 ) *…*p n max(a n,b n ) For example: lcm(12,9) = 2 max(0,2) * 3 max(1,2) = 2 2 * 3 2 = 36

21 Theorem 5 For positive integers a and b, the product of a and b is equal to gcd(a,b) * lcm(a,b) For example, if a=12 and b=9: 12 * 9 = 108 gcd(12,9) = 3 and lcm(12,9) = 36 3 * 36 = 108

22 Modular Arithmetic Modulus: operation that finds the remainder when one positive integer is divided by another a mod m = r when: a = qm + r and 0 <= r < m

23 Congruence For two integers a and b, and positive integer m, a is congruent to b mod m if m|(a-b) This congruence is denoted: a  b (mod m) a  b (mod m) if and only if a mod m = b mod m Therefore congruence occurs between a and b (mod m) if both a and b have the same remainder when divided by m

24 Congruence Examples Determine if 80 is congruent to 5 modulo 17 –Translation: divide 80 by 17 and see if the remainder is 5 –It isn’t: 17 goes into 80 4 times, with a remainder of 12 Is -29 congruent to 5(mod 17)? –29 = 17 * (- 2) + 5 so -29  5 (mod 17)

25 Theorems 6 & 7 Theorem 6: –Let m be a positive integer: –Integers a and b are congruent modulo m if and only if there is an integer k such that a = b + km Theorem 7: –Let m be a positive integer: –If a  b(mod m) and c  d(mod m) then –a + c  b + d(mod m) and ac  bd(mod m)

26 Section 2.4 The Integers and Division - ends -

Download ppt "1 Section 2.4 The Integers and Division. 2 Number Theory Branch of mathematics that includes (among other things): –divisibility –greatest common divisor."

Similar presentations