1 00:00:00,500 --> 00:00:04,590 PROFESSOR: Now we come to a more serious application of the fact 2 00:00:04,590 --> 00:00:06,790 that the GCD is a linear combination. 3 00:00:06,790 --> 00:00:09,055 We're going to use it to prove the prime factorization 4 00:00:09,055 --> 00:00:11,600 theorem-- which we've talked about earlier. 5 00:00:11,600 --> 00:00:15,500 This is the unique prime factorization theorem. 6 00:00:15,500 --> 00:00:21,720 So let's begin by looking at a technical property of primes, 7 00:00:21,720 --> 00:00:26,540 which is familiar, but we're going to need to prove it. 8 00:00:26,540 --> 00:00:29,690 If you believe in prime factorization, then 9 00:00:29,690 --> 00:00:32,800 this Lemma-- which says that if p divides a product, 10 00:00:32,800 --> 00:00:36,514 it divides one or the other of the components of the product-- 11 00:00:36,514 --> 00:00:38,930 that's an immediate consequence of the prime factorization 12 00:00:38,930 --> 00:00:39,450 theorem. 13 00:00:39,450 --> 00:00:40,824 But we mustn't prove it that way, 14 00:00:40,824 --> 00:00:44,670 because we're trying to use this to prove prime factorization. 15 00:00:44,670 --> 00:00:48,360 So how can I prove, based on the facts of what 16 00:00:48,360 --> 00:00:51,300 we know about GCDs, without appealing 17 00:00:51,300 --> 00:00:54,250 to prime factorization that if p is a prime, 18 00:00:54,250 --> 00:00:58,460 and p divides a product, then it divides 19 00:00:58,460 --> 00:01:02,220 one of the components of the product, 20 00:01:02,220 --> 00:01:05,860 either the multiplier or the [? multiplicand? ?] OK, 21 00:01:05,860 --> 00:01:08,090 well here's how to prove that. 22 00:01:08,090 --> 00:01:13,470 Suppose that p divides ab, but it doesn't divide a. 23 00:01:13,470 --> 00:01:15,040 Of course it does divide a, I'm done. 24 00:01:15,040 --> 00:01:18,560 So we may as well assume that it doesn't divide a. 25 00:01:18,560 --> 00:01:24,311 Now that means that since the only divisors p are p 26 00:01:24,311 --> 00:01:28,250 and 1-- the only positive divisors of p are p and 1-- 27 00:01:28,250 --> 00:01:32,510 that if p doesn't divide a, the GCD of a and p is 1. 28 00:01:32,510 --> 00:01:36,190 All right, now comes the linear combination trick. 29 00:01:36,190 --> 00:01:38,990 Given that the GCD of p and a is 1, 30 00:01:38,990 --> 00:01:42,430 that means that I have a linear combination of a and p that's 31 00:01:42,430 --> 00:01:47,530 equal to 1-- sa plus tp is equal to 1, for some coefficients, s 32 00:01:47,530 --> 00:01:48,470 and t. 33 00:01:48,470 --> 00:01:52,360 Cool-- multiply everything by b on the right. 34 00:01:52,360 --> 00:01:58,190 So that means that sab plus tpb is equal to 1 times b. 35 00:01:58,190 --> 00:01:59,970 But look at what we have now. 36 00:01:59,970 --> 00:02:03,460 The first term on the left is something times 37 00:02:03,460 --> 00:02:08,180 ab, and p divides ab, so that first term is divisible by p. 38 00:02:08,180 --> 00:02:09,979 The second term explicitly has a p in it, 39 00:02:09,979 --> 00:02:11,960 so it's certainly divisible by p. 40 00:02:11,960 --> 00:02:15,270 So the left hand side is a linear combination 41 00:02:15,270 --> 00:02:19,160 of multiples of p, and therefore, itself 42 00:02:19,160 --> 00:02:21,710 is a multiple of p-- which means the right hand 43 00:02:21,710 --> 00:02:24,760 side is a multiple of p, and the right hand side is b. 44 00:02:24,760 --> 00:02:27,730 So sure enough, p divides b. 45 00:02:27,730 --> 00:02:31,480 We're done-- a very elegant little proof 46 00:02:31,480 --> 00:02:35,770 that follows immediately from the fact that you can express 47 00:02:35,770 --> 00:02:38,310 the GCD of two numbers as a linear combination 48 00:02:38,310 --> 00:02:39,860 of those numbers. 49 00:02:39,860 --> 00:02:41,420 Now this is the key technical Lemma 50 00:02:41,420 --> 00:02:46,020 that we need to prove unique factorization. 51 00:02:46,020 --> 00:02:48,360 A corollary of this that I'm actually going to need 52 00:02:48,360 --> 00:02:50,880 is that if p divides a product of more than two things-- 53 00:02:50,880 --> 00:02:53,200 if p divides a product of a lot of things-- 54 00:02:53,200 --> 00:02:56,900 it has to divide at least one of them. 55 00:02:56,900 --> 00:02:59,450 And this you could prove by induction, 56 00:02:59,450 --> 00:03:03,750 with the base case being that it works for m equals 2. 57 00:03:03,750 --> 00:03:05,520 But it's not very interesting, and we're 58 00:03:05,520 --> 00:03:06,910 going to take that for granted. 59 00:03:06,910 --> 00:03:09,520 If p divides a product of any size, 60 00:03:09,520 --> 00:03:12,830 it divides one of the components of the product. 61 00:03:12,830 --> 00:03:14,600 All right, now we're ready to prove 62 00:03:14,600 --> 00:03:17,650 what's called the fundamental theorem of arithmetic, which 63 00:03:17,650 --> 00:03:21,730 says that every integer greater than one factors uniquely 64 00:03:21,730 --> 00:03:25,550 into a weakly decreasing sequence of primes. 65 00:03:25,550 --> 00:03:28,380 Now the statement of weakly decreasing 66 00:03:28,380 --> 00:03:30,540 is a little bit technical and unexpected. 67 00:03:30,540 --> 00:03:34,420 What we want to say is that a number factors 68 00:03:34,420 --> 00:03:36,330 into the same set of primes. 69 00:03:36,330 --> 00:03:38,790 Well that's not quite right, because the set of primes 70 00:03:38,790 --> 00:03:42,960 doesn't take into account how many times each prime occurs. 71 00:03:42,960 --> 00:03:46,660 You could try to make a statement about every number 72 00:03:46,660 --> 00:03:49,970 uniquely is a multiple of a certain number 73 00:03:49,970 --> 00:03:51,620 of each kind of prime. 74 00:03:51,620 --> 00:03:53,730 But a slick way to do that is simply 75 00:03:53,730 --> 00:03:56,120 to say, take all the prime factors, including 76 00:03:56,120 --> 00:03:59,280 multiple occurrences of a prime, and line them up 77 00:03:59,280 --> 00:04:01,650 in weakly decreasing order. 78 00:04:01,650 --> 00:04:05,440 And when you do that, that sequence is unique. 79 00:04:08,380 --> 00:04:10,180 This fundamental theorem of arithmetic 80 00:04:10,180 --> 00:04:12,460 is also called the prime factorization theorem. 81 00:04:12,460 --> 00:04:17,490 And here's what it says when we spell it 82 00:04:17,490 --> 00:04:24,080 out-- without using the words weakly decreasing. 83 00:04:24,080 --> 00:04:27,240 It says that every integer, n, greater than 1 84 00:04:27,240 --> 00:04:29,600 has a unique factorization into primes-- 85 00:04:29,600 --> 00:04:34,770 mainly it can be expressed as a product of p 1 through p k 86 00:04:34,770 --> 00:04:36,980 is equal to n. 87 00:04:36,980 --> 00:04:39,660 With p 1 greater than or equal to p 2, 88 00:04:39,660 --> 00:04:41,670 greater than or equal to each successive prime 89 00:04:41,670 --> 00:04:44,240 in the sequence, with the smallest one last. 90 00:04:48,070 --> 00:04:48,930 Let's do an example. 91 00:04:48,930 --> 00:04:51,750 So there's a number that was not chosen 92 00:04:51,750 --> 00:04:56,250 by accident, because I worked out what the factorization was. 93 00:04:56,250 --> 00:04:59,200 And it factors into the following weakly decreasing 94 00:04:59,200 --> 00:04:59,700 sequence. 95 00:04:59,700 --> 00:05:02,210 You start with the prime 53, you followed 96 00:05:02,210 --> 00:05:06,800 by three occurrences of 37, two 11s, a 7 and three 3s. 97 00:05:06,800 --> 00:05:11,960 And the point is that if you try to express this ugly number 98 00:05:11,960 --> 00:05:14,790 as a weakly decreasing sequence of primes, 99 00:05:14,790 --> 00:05:17,450 you're always going to get exactly this sequence-- it's 100 00:05:17,450 --> 00:05:19,950 the only way to do it. 101 00:05:19,950 --> 00:05:21,890 All right, how are we going to prove that? 102 00:05:21,890 --> 00:05:25,690 Well, let's suppose that it wasn't true. 103 00:05:25,690 --> 00:05:28,300 Suppose that there was some number that could be 104 00:05:28,300 --> 00:05:30,590 factored in two different ways. 105 00:05:30,590 --> 00:05:32,150 Well, by the well-ordering principle, 106 00:05:32,150 --> 00:05:33,200 there's at least one. 107 00:05:33,200 --> 00:05:35,650 So we're talking about numbers that are greater than 1, 108 00:05:35,650 --> 00:05:38,490 so there's a least number greater than 1 109 00:05:38,490 --> 00:05:40,800 that can be factored in two different ways. 110 00:05:40,800 --> 00:05:42,630 Supposed that it's n. 111 00:05:42,630 --> 00:05:47,412 So what I have is that n is a product p 1 through p k. 112 00:05:47,412 --> 00:05:50,190 And it's equal to another product, q 1 113 00:05:50,190 --> 00:05:53,250 through q m, where the p's and the q's are all prime. 114 00:05:53,250 --> 00:05:57,420 And these two weakly decreasing sequences are not the same. 115 00:05:57,420 --> 00:06:00,540 They differ somehow. 116 00:06:00,540 --> 00:06:05,330 So we can assume that the p's are listed in a weakly 117 00:06:05,330 --> 00:06:08,185 decreasing order, and the q's are likewise listed 118 00:06:08,185 --> 00:06:10,890 in weakly decreasing order. 119 00:06:10,890 --> 00:06:12,460 Now the first observation-- suppose 120 00:06:12,460 --> 00:06:14,920 that q 1 is equal to p 1. 121 00:06:14,920 --> 00:06:18,910 Well that's not really possible, because if q 1 is equal to p 1, 122 00:06:18,910 --> 00:06:24,100 then I could cancel the p 1 from both sides, 123 00:06:24,100 --> 00:06:27,140 and I would get the p 2 through p k 124 00:06:27,140 --> 00:06:31,740 is equal to q 2 through q m, and these would still be different. 125 00:06:31,740 --> 00:06:34,810 Since they were different, and I took the same thing 126 00:06:34,810 --> 00:06:39,130 from their beginning, I'm left with a smaller number that 127 00:06:39,130 --> 00:06:42,000 does not have unique factorization, contradicting 128 00:06:42,000 --> 00:06:44,050 the minimality of n. 129 00:06:44,050 --> 00:06:53,160 So in short, it's not possible for q 1 to equal p 1. 130 00:06:53,160 --> 00:06:56,070 So one of them has to be greater. 131 00:06:56,070 --> 00:07:00,060 We may as well assume that q 1 is bigger than p 1. 132 00:07:00,060 --> 00:07:02,830 So q 1 is bigger than p 1, and p 1 is greater than or equal 133 00:07:02,830 --> 00:07:05,210 to all the other p's, so in fact, 134 00:07:05,210 --> 00:07:09,110 q 1 is bigger than every one of the p's. 135 00:07:09,110 --> 00:07:13,370 Well that's going reach a contradiction because 136 00:07:13,370 --> 00:07:15,240 of the corollary. 137 00:07:15,240 --> 00:07:17,780 What I know is that q 1 divides n, 138 00:07:17,780 --> 00:07:20,520 and n is a product of the p's. 139 00:07:20,520 --> 00:07:26,300 And since q divides the product of the p's, by the corollary, 140 00:07:26,300 --> 00:07:31,030 it's got to divide one of them-- q 1 must divide p i for some i, 141 00:07:31,030 --> 00:07:34,820 but that contradicts the fact that q 1 is bigger than p i. 142 00:07:34,820 --> 00:07:39,210 That's not possible for the larger number 143 00:07:39,210 --> 00:07:41,000 to divide the smaller number. 144 00:07:41,000 --> 00:07:43,780 And we're done. 145 00:07:43,780 --> 00:07:48,150 And we have proved the unique factorization theorem.