1 00:00:00,500 --> 00:00:03,380 PROFESSOR: Another way to talk about congruence and remainder 2 00:00:03,380 --> 00:00:05,644 arithmetic is to work strictly with remainders, 3 00:00:05,644 --> 00:00:08,060 which makes things a little simpler because you don't have 4 00:00:08,060 --> 00:00:10,476 to worry about the fact that the product of two remainders 5 00:00:10,476 --> 00:00:12,832 may, for example, be too big to be a remainder. 6 00:00:12,832 --> 00:00:14,290 To knock it back in range, you have 7 00:00:14,290 --> 00:00:15,790 to take the remainder again. 8 00:00:15,790 --> 00:00:18,000 And that's what this abstract idea 9 00:00:18,000 --> 00:00:22,240 of the ring of integers modulo n, the ring Z sub n, 10 00:00:22,240 --> 00:00:25,280 captures in a quite elegant way. 11 00:00:25,280 --> 00:00:27,660 So it's going to allow us to talk strictly about equality 12 00:00:27,660 --> 00:00:28,980 instead of congruence. 13 00:00:28,980 --> 00:00:34,490 And let's remind ourselves that the basic idea behind working 14 00:00:34,490 --> 00:00:38,760 with a remainder arithmetic was that every time we 15 00:00:38,760 --> 00:00:41,210 got a number that was too big to be a remainder, 16 00:00:41,210 --> 00:00:43,430 we just hit it with the remainder operation 17 00:00:43,430 --> 00:00:45,530 again to bring it back in range. 18 00:00:45,530 --> 00:00:50,010 And so the operations in Zn work exactly that way. 19 00:00:50,010 --> 00:00:52,820 The elements of Zn are the remainders. 20 00:00:52,820 --> 00:00:56,890 That is, the numbers from 0, including 0, up to n, 21 00:00:56,890 --> 00:00:57,880 but not including n. 22 00:00:57,880 --> 00:01:01,760 So there are n of them from 0, 1, up through n minus 1. 23 00:01:01,760 --> 00:01:04,190 And the definitions of the operations in Zn 24 00:01:04,190 --> 00:01:05,489 are given right here. 25 00:01:05,489 --> 00:01:07,320 Addition just means take this sum 26 00:01:07,320 --> 00:01:09,790 but then take the remainder immediately, 27 00:01:09,790 --> 00:01:11,250 just in case it's too big. 28 00:01:11,250 --> 00:01:15,200 And likewise, the product in Zn is simply multiply them 29 00:01:15,200 --> 00:01:16,710 and take the remainder. 30 00:01:16,710 --> 00:01:20,090 This isn't really a very dramatic idea, 31 00:01:20,090 --> 00:01:23,642 but it turns out to pay off in making some things just 32 00:01:23,642 --> 00:01:25,350 a little bit easier to say, because we're 33 00:01:25,350 --> 00:01:29,080 talking about equality instead of congruence. 34 00:01:29,080 --> 00:01:32,100 So this package together, this mathematical structure 35 00:01:32,100 --> 00:01:34,750 consisting of the integers in this interval-- 36 00:01:34,750 --> 00:01:36,640 remember this notation, square bracket 37 00:01:36,640 --> 00:01:40,480 means inclusive and round parenthesis means exclusive. 38 00:01:40,480 --> 00:01:42,850 So this includes zero, it doesn't include n. 39 00:01:42,850 --> 00:01:46,280 The integers in that interval, under the operations 40 00:01:46,280 --> 00:01:51,070 of plus and times modulo Zn, as defined here, 41 00:01:51,070 --> 00:01:54,170 is called the ring of integers Zn. 42 00:01:54,170 --> 00:01:56,880 So it's got two operations and a bunch 43 00:01:56,880 --> 00:01:59,400 of things that are operated on. 44 00:01:59,400 --> 00:02:02,200 Now I guess it's worth highlighting. 45 00:02:02,200 --> 00:02:04,330 That's what Zn is, the ring of integers. 46 00:02:04,330 --> 00:02:06,780 Mod n, or modulo n. 47 00:02:06,780 --> 00:02:11,330 Now, arithmetic in Zn is really just arithmetic-- congruence 48 00:02:11,330 --> 00:02:15,110 arithmetic, except that it's equality now instead 49 00:02:15,110 --> 00:02:17,330 of congruence. 50 00:02:17,330 --> 00:02:20,970 So we can say, for example, in Z7 that 3 plus 6 51 00:02:20,970 --> 00:02:24,800 is literally equal to 2 because, well, 3 plus 6 is 9, 52 00:02:24,800 --> 00:02:27,550 the remainder on division by 7 is 2, 53 00:02:27,550 --> 00:02:30,570 and we go directly to the two in Zn, 54 00:02:30,570 --> 00:02:33,651 suppressing the mention of taking remainders and not even 55 00:02:33,651 --> 00:02:35,650 really having to think about it, which is what's 56 00:02:35,650 --> 00:02:37,880 helpful about working with Zn. 57 00:02:37,880 --> 00:02:41,860 Likewise, 9 times 8 is literally equal to 6 in Z11. 58 00:02:45,590 --> 00:02:48,360 So what's the connection between the set of all the integers 59 00:02:48,360 --> 00:02:50,700 and the integers mod n? 60 00:02:50,700 --> 00:02:54,470 And we can state this abstractly in the following way. 61 00:02:54,470 --> 00:02:57,980 Let's just, for convenience, abbreviate the remainder of k 62 00:02:57,980 --> 00:03:00,160 on division by n as R of k. 63 00:03:00,160 --> 00:03:01,550 So n is fixed. 64 00:03:01,550 --> 00:03:03,990 And what's the connection between Z and Zn? 65 00:03:03,990 --> 00:03:05,550 Well, it's fairly simple. 66 00:03:05,550 --> 00:03:08,420 If you take the remainder of i plus j, 67 00:03:08,420 --> 00:03:11,970 that's literally equal to taking the sum 68 00:03:11,970 --> 00:03:14,356 of the remainders in Zn. 69 00:03:14,356 --> 00:03:15,730 Once you've taken the remainders, 70 00:03:15,730 --> 00:03:19,420 you're in the range of numbers that Zn works with. 71 00:03:19,420 --> 00:03:22,030 And this sum, then, keeps you in on the Zn side. 72 00:03:22,030 --> 00:03:24,760 Likewise, if you take the remainder 73 00:03:24,760 --> 00:03:27,170 of a product of real integers, that's 74 00:03:27,170 --> 00:03:31,140 literally equal to the product of the remainders in Zn. 75 00:03:31,140 --> 00:03:32,940 This operation, by the way, this connection 76 00:03:32,940 --> 00:03:35,020 between mathematical structures, the structure 77 00:03:35,020 --> 00:03:37,220 of the integers under plus and times 78 00:03:37,220 --> 00:03:40,640 and Zn under plus and times, is called a homomorphism. 79 00:03:40,640 --> 00:03:44,570 R, in this case, is defining a homomorphism from Z to Zn. 80 00:03:44,570 --> 00:03:46,432 That's a basic concept in algebra 81 00:03:46,432 --> 00:03:47,890 that you'll learn more about if you 82 00:03:47,890 --> 00:03:50,670 take some courses in algebra, but I'm just mentioning it 83 00:03:50,670 --> 00:03:51,660 for cultural reasons. 84 00:03:51,660 --> 00:03:53,980 We're not going to exploit it any further, 85 00:03:53,980 --> 00:03:55,970 or look further into this idea. 86 00:03:55,970 --> 00:03:57,446 OK. 87 00:03:57,446 --> 00:03:59,320 What's the connection between equivalence mod 88 00:03:59,320 --> 00:04:01,684 n, or congruence mod n, and Zn? 89 00:04:01,684 --> 00:04:02,725 Well, it's fairly simple. 90 00:04:05,480 --> 00:04:08,660 In Zn, we convert congruences into equalities. 91 00:04:08,660 --> 00:04:13,640 So i is congruent to j mod n if and only if r of i 92 00:04:13,640 --> 00:04:16,880 is equal to r of j in Zn. 93 00:04:16,880 --> 00:04:19,140 And this is just a rephrasing of the fact 94 00:04:19,140 --> 00:04:20,570 that two numbers are congruent if 95 00:04:20,570 --> 00:04:24,080 and only if they have the same remainder. 96 00:04:24,080 --> 00:04:27,250 Now once you've got this self-contained system Zn, 97 00:04:27,250 --> 00:04:29,540 you can start talking about algebraic rules 98 00:04:29,540 --> 00:04:30,710 that it satisfies. 99 00:04:30,710 --> 00:04:33,860 And now, they hold with equality and they're pretty familiar. 100 00:04:33,860 --> 00:04:36,170 So let's look at some of the rules for addition, 101 00:04:36,170 --> 00:04:38,730 for example, that hold true in Zn. 102 00:04:38,730 --> 00:04:40,540 First of all, addition is associative. 103 00:04:40,540 --> 00:04:44,150 i plus j plus k is i plus j plus k. 104 00:04:44,150 --> 00:04:46,350 We have an identity element, literally zero. 105 00:04:46,350 --> 00:04:49,100 Zero plus any i is i. 106 00:04:49,100 --> 00:04:53,100 We have a minus operation, an inverse operation, with respect 107 00:04:53,100 --> 00:05:03,020 to addition, which is that-- how do I get back some slides? 108 00:05:03,020 --> 00:05:03,520 Excuse me. 109 00:05:03,520 --> 00:05:04,580 OK, let's keep going. 110 00:05:04,580 --> 00:05:08,830 I have an inverse operation, which is that for every i, 111 00:05:08,830 --> 00:05:10,460 there's an element called minus i. 112 00:05:10,460 --> 00:05:14,200 It's additive inverse such that if you add i and minus i, 113 00:05:14,200 --> 00:05:15,680 you get zero. 114 00:05:15,680 --> 00:05:17,310 And finally, commutativity, which 115 00:05:17,310 --> 00:05:20,100 is that i plus j is the same as j plus i. 116 00:05:20,100 --> 00:05:22,110 You don't really need to memorize these names, 117 00:05:22,110 --> 00:05:24,940 but you will probably hear them a lot 118 00:05:24,940 --> 00:05:28,060 in various other contexts, and especially in algebra courses, 119 00:05:28,060 --> 00:05:29,800 but even in terms of arithmetic. 120 00:05:29,800 --> 00:05:32,720 These are some of the basic rules that addition satisfies. 121 00:05:32,720 --> 00:05:34,306 And in fact, multiplication satisfies 122 00:05:34,306 --> 00:05:35,430 pretty much the same rules. 123 00:05:35,430 --> 00:05:38,340 Multiplication is likewise associative. 124 00:05:38,340 --> 00:05:40,840 There's an identity for multiplication called 1. 125 00:05:40,840 --> 00:05:43,110 1 times i is i. 126 00:05:43,110 --> 00:05:44,900 Multiplication is also commutative. 127 00:05:44,900 --> 00:05:48,290 The one obvious omission here is inverses. 128 00:05:48,290 --> 00:05:52,480 You can't count on there being inverses in Zn. 129 00:05:52,480 --> 00:05:54,650 And finally, there's an operation 130 00:05:54,650 --> 00:05:57,740 that connects addition and multiplication called 131 00:05:57,740 --> 00:05:58,710 distributivity. 132 00:05:58,710 --> 00:06:02,890 Namely, i times j plus k is ij plus ik, 133 00:06:02,890 --> 00:06:05,450 as you well know from ordinary arithmetic. 134 00:06:05,450 --> 00:06:11,086 And this rule works fine for remainders and working in Zn. 135 00:06:11,086 --> 00:06:12,960 As I said, the one thing we have to watch out 136 00:06:12,960 --> 00:06:14,543 for, it shouldn't be a surprise, is we 137 00:06:14,543 --> 00:06:17,570 know that you can't cancel with respect to congruence mod n. 138 00:06:17,570 --> 00:06:20,540 And that's reflected in the fact that you can't cancel in Zn. 139 00:06:20,540 --> 00:06:26,740 Namely, in Z12, for example, 3 times 2 is equal to 2 times 8. 140 00:06:26,740 --> 00:06:28,900 Again, 3 times 2 is 6, 2 times 8 is 16, 141 00:06:28,900 --> 00:06:31,570 you immediately take the remainder to get back to 6. 142 00:06:31,570 --> 00:06:34,260 In Z12, these two things are equal. 143 00:06:34,260 --> 00:06:37,960 But if you tried to cancel the 2, you'd conclude that 3 was 8, 144 00:06:37,960 --> 00:06:40,870 and neither 3-- 3 and 8 are different numbers 145 00:06:40,870 --> 00:06:45,110 in the range from 0 to 12, and they're different in Z12. 146 00:06:45,110 --> 00:06:47,210 So you can't cancel 2. 147 00:06:47,210 --> 00:06:48,190 OK. 148 00:06:48,190 --> 00:06:50,850 Now the rules that we already figured out 149 00:06:50,850 --> 00:06:52,640 for when you can cancel in congruence 150 00:06:52,640 --> 00:06:56,090 translate directly over to when you can cancel in Zn. 151 00:06:56,090 --> 00:06:58,610 And now there's a standard abbreviation 152 00:06:58,610 --> 00:07:00,000 that's useful to use here. 153 00:07:00,000 --> 00:07:04,310 If I write Zn*, what I mean is the elements in Zn that are 154 00:07:04,310 --> 00:07:06,420 relatively prime to n. 155 00:07:06,420 --> 00:07:09,320 The elements whose GCD with n is 1. 156 00:07:09,320 --> 00:07:16,670 So what we have is the following equivalent formulations of Zn*, 157 00:07:16,670 --> 00:07:19,300 which correspond to the facts we've already figured out about 158 00:07:19,300 --> 00:07:19,800 congruence. 159 00:07:19,800 --> 00:07:25,280 Namely, an integer i in the range from 0 to n is in Zn* 160 00:07:25,280 --> 00:07:28,300 if and only if the GCD of i and n is 1, 161 00:07:28,300 --> 00:07:32,780 or i is cancelable in Zn, or i has an inverse in Zn. 162 00:07:32,780 --> 00:07:34,720 All of these three things are equivalent. 163 00:07:34,720 --> 00:07:40,260 They give you the sense that Zn* is a kind of robust subset 164 00:07:40,260 --> 00:07:43,830 of Zn that you'd want to be thinking about. 165 00:07:43,830 --> 00:07:46,730 And in fact, it's very valuable to be paying attention to. 166 00:07:46,730 --> 00:07:48,870 What else do we know about Zn*? 167 00:07:48,870 --> 00:07:52,070 Well, the definition of phi of n was the number 168 00:07:52,070 --> 00:07:54,720 of integers in the interval from 0 169 00:07:54,720 --> 00:07:56,940 to n that are relatively prime to n. 170 00:07:56,940 --> 00:08:00,870 Of course, that's exactly the size of Zn*. 171 00:08:00,870 --> 00:08:04,980 So phi of n is simply the size of that collection of elements. 172 00:08:04,980 --> 00:08:05,680 Not surprising. 173 00:08:05,680 --> 00:08:07,400 They were defined that way. 174 00:08:07,400 --> 00:08:09,152 So now I can restate Euler's Theorem 175 00:08:09,152 --> 00:08:10,360 in a slightly convenient way. 176 00:08:10,360 --> 00:08:11,600 Instead of mentioning congruence, 177 00:08:11,600 --> 00:08:12,933 we can just talk about equality. 178 00:08:12,933 --> 00:08:16,990 Euler's Theorem says that if you raise a number k to the power 179 00:08:16,990 --> 00:08:20,570 phi of n, it's literally equal to 1 in Zn, 180 00:08:20,570 --> 00:08:23,980 at least for those k's that are relatively prime to n. 181 00:08:23,980 --> 00:08:27,600 That is, those k's that are in Zn*. 182 00:08:27,600 --> 00:08:30,630 And it's going to turn out that the proof of Euler's Theorem 183 00:08:30,630 --> 00:08:31,630 is actually pretty easy. 184 00:08:31,630 --> 00:08:33,129 It just follows in a couple of steps 185 00:08:33,129 --> 00:08:34,700 from a couple of simple observations. 186 00:08:34,700 --> 00:08:36,159 So let's start on those. 187 00:08:36,159 --> 00:08:40,270 So the first remark is that if I have any subset, S, of elements 188 00:08:40,270 --> 00:08:43,720 in Zn-- I don't care whether they are relatively prime to n 189 00:08:43,720 --> 00:08:47,180 or not-- if I multiply each of them by k, 190 00:08:47,180 --> 00:08:50,110 this notation for k times S means 191 00:08:50,110 --> 00:08:54,290 that I'm taking the set of elements that are of the form 192 00:08:54,290 --> 00:08:57,750 k times an element of S over all the elements of S. 193 00:08:57,750 --> 00:09:01,000 So kS, which is this set of multiples 194 00:09:01,000 --> 00:09:04,930 of k-- multiples of elements of S by k, 195 00:09:04,930 --> 00:09:07,330 has exactly the same size as S. 196 00:09:07,330 --> 00:09:08,120 Now, why is that? 197 00:09:08,120 --> 00:09:11,880 Well, this of course is only true for k that are cancelable. 198 00:09:11,880 --> 00:09:15,895 But the Lemma is, no matter what subset you take of Zn, 199 00:09:15,895 --> 00:09:19,060 if you multiplied every one of them by an element 200 00:09:19,060 --> 00:09:23,550 that's cancelable in Zn*, you get a set of the same size. 201 00:09:23,550 --> 00:09:28,470 And that's clear because how could ks1 and ks2 be equal? 202 00:09:28,470 --> 00:09:30,526 Well, only if s1 and s2 were equal. 203 00:09:30,526 --> 00:09:32,150 Or another way to say it is that if you 204 00:09:32,150 --> 00:09:35,730 had different elements in S, s1 not equal to s2, 205 00:09:35,730 --> 00:09:37,870 when you multiply them by k, you have 206 00:09:37,870 --> 00:09:42,780 to get different elements of ks, because k is cancelable. 207 00:09:42,780 --> 00:09:43,280 OK. 208 00:09:43,280 --> 00:09:44,410 So that's an easy remark. 209 00:09:44,410 --> 00:09:46,030 Holds in general. 210 00:09:46,030 --> 00:09:50,690 Multiply any subset by a cancelable element, 211 00:09:50,690 --> 00:09:53,960 and you get a new set that's the same size. 212 00:09:53,960 --> 00:09:57,400 The second remark is that if you look at numbers i and j that 213 00:09:57,400 --> 00:10:01,340 are in the interval from 0 to n in Zn, 214 00:10:01,340 --> 00:10:06,660 then if you multiply the two of them, 215 00:10:06,660 --> 00:10:11,650 then you're going to get an element in Zn* if and only 216 00:10:11,650 --> 00:10:14,052 if the original two elements were in Zn*. 217 00:10:14,052 --> 00:10:16,510 Well, let's just look at it in the left to right direction, 218 00:10:16,510 --> 00:10:17,980 which is the only one we need. 219 00:10:17,980 --> 00:10:22,830 If i and j are relatively prime to Zn*, 220 00:10:22,830 --> 00:10:26,910 then so is their product, because if neither i nor j has 221 00:10:26,910 --> 00:10:30,480 a prime factor in common with n, then their product obviously 222 00:10:30,480 --> 00:10:34,130 doesn't have a factor in common with n. 223 00:10:34,130 --> 00:10:35,600 And then when you take remainders, 224 00:10:35,600 --> 00:10:39,330 it's still going to be a number whose GCD is the same. 225 00:10:39,330 --> 00:10:41,960 And so we have this remark that if you 226 00:10:41,960 --> 00:10:44,180 multiply two cancelable elements, 227 00:10:44,180 --> 00:10:45,490 you get a cancelable element. 228 00:10:45,490 --> 00:10:48,290 If you multiply two elements relatively prime to Zn*, 229 00:10:48,290 --> 00:10:49,620 you get an element of Zn*. 230 00:10:49,620 --> 00:10:52,640 There's about-- every one of these formulations of Zn* 231 00:10:52,640 --> 00:10:56,290 in terms of GCDs are cancelable or inverse, 232 00:10:56,290 --> 00:10:58,800 and each of them gives a separate and straightforward 233 00:10:58,800 --> 00:11:01,720 proof of the fact that if i and j are in Zn*, 234 00:11:01,720 --> 00:11:02,937 then so is their product. 235 00:11:02,937 --> 00:11:04,520 Now it's worth mentioning, by the way, 236 00:11:04,520 --> 00:11:06,590 that, in general, their sum is not. 237 00:11:06,590 --> 00:11:12,160 If you add two elements that are relatively prime to Zn*, 238 00:11:12,160 --> 00:11:14,910 even if their sum is non-zero, you will typically get 239 00:11:14,910 --> 00:11:21,050 an element that is no longer relatively prime to n. 240 00:11:21,050 --> 00:11:22,910 But for multiplication, it works great, 241 00:11:22,910 --> 00:11:25,580 and that's what matters to us. 242 00:11:25,580 --> 00:11:26,080 OK. 243 00:11:26,080 --> 00:11:29,470 So as a corollary of this is that I can actually conclude 244 00:11:29,470 --> 00:11:32,340 that, if I choose an element that's cancelable, 245 00:11:32,340 --> 00:11:36,110 an element in Zn*, if I take the whole set Zn*, 246 00:11:36,110 --> 00:11:38,780 all those elements that are relatively prime to n, 247 00:11:38,780 --> 00:11:43,460 and I take multiples of k by each of them, then, in fact, 248 00:11:43,460 --> 00:11:46,260 I get the same set, Zn*. 249 00:11:46,260 --> 00:11:52,140 And the proof of that is really straightforward. 250 00:11:52,140 --> 00:11:53,716 Let's think about it for a minute. 251 00:11:53,716 --> 00:11:55,590 Because what do I know is that these two sets 252 00:11:55,590 --> 00:11:57,050 are the same size. 253 00:11:57,050 --> 00:12:00,060 kZn* and Zn* are the same size. 254 00:12:00,060 --> 00:12:02,890 As long as k is cancelable, I don't even care that this was 255 00:12:02,890 --> 00:12:05,030 Zn*. 256 00:12:05,030 --> 00:12:08,810 On the other hand, if k is in Zn*, 257 00:12:08,810 --> 00:12:12,940 k times Zn* only gives you elements in Zn*. 258 00:12:12,940 --> 00:12:17,180 So kZn* is a subset of the left-hand side, 259 00:12:17,180 --> 00:12:20,220 and it's the same size by the Lemma that says that 260 00:12:20,220 --> 00:12:22,900 multiplying by k preserves sizes. 261 00:12:22,900 --> 00:12:24,540 So they have to be equal. 262 00:12:24,540 --> 00:12:27,670 So basically what that means is that if you take all 263 00:12:27,670 --> 00:12:31,230 the elements in Z*, all the elements relatively prime to n, 264 00:12:31,230 --> 00:12:34,600 and you take another one of them, pick one out of that set, 265 00:12:34,600 --> 00:12:39,280 and multiply every element in the set by that element k, 266 00:12:39,280 --> 00:12:42,170 if you had them lined up in one order beforehand, 267 00:12:42,170 --> 00:12:45,220 when you multiplied by k you get exactly the same elements 268 00:12:45,220 --> 00:12:47,100 but just reordered. 269 00:12:47,100 --> 00:12:50,620 That is, multiplying by k has the effect of permuting 270 00:12:50,620 --> 00:12:54,410 the elements of Zn*. 271 00:12:54,410 --> 00:12:55,750 Let's look at an example. 272 00:12:55,750 --> 00:12:57,700 So let's look at Z9. 273 00:12:57,700 --> 00:13:00,900 And we know that phi of 9, by the previous formula, 274 00:13:00,900 --> 00:13:02,490 is 3 squared minus 3, or 6. 275 00:13:02,490 --> 00:13:05,840 There are going to be 6 elements from 0 to n that are relatively 276 00:13:05,840 --> 00:13:10,060 prime to 9, and that comprise Zn*. 277 00:13:10,060 --> 00:13:11,740 So let's look at what they are. 278 00:13:11,740 --> 00:13:13,580 So you can do-- check the calculation. 279 00:13:13,580 --> 00:13:18,447 But Zn* is exactly the elements 1, 2, 4, 5, 7, 8. 280 00:13:18,447 --> 00:13:20,280 We know we got them all because there's only 281 00:13:20,280 --> 00:13:21,696 supposed to be six of them, and we 282 00:13:21,696 --> 00:13:24,460 can check that those are all relatively prime to 9. 283 00:13:24,460 --> 00:13:26,720 None of them has 3 as a divisor. 284 00:13:26,720 --> 00:13:29,840 Now what happens, for example, if I multiply them all by 2? 285 00:13:29,840 --> 00:13:32,210 Two is another good number-- it's right here-- 286 00:13:32,210 --> 00:13:33,790 that's in Zn*. 287 00:13:33,790 --> 00:13:35,850 And multiplying them by 2, well, let's check. 288 00:13:35,850 --> 00:13:39,750 2 times 1 is 2, 2 times 2 is 4, 2 times 4 is 8, 289 00:13:39,750 --> 00:13:45,060 2 times 5 is 1-- because it's 10 with a remainder of 1-- 2 times 290 00:13:45,060 --> 00:13:47,940 7 is 14-- translates into 5-- 2 times 8 291 00:13:47,940 --> 00:13:51,140 is 16-- [INAUDIBLE] translates into 7. 292 00:13:51,140 --> 00:13:52,720 And, as claimed, look at this. 293 00:13:52,720 --> 00:13:55,350 Here's 2, 4, 8, 1, 5, 7. 294 00:13:55,350 --> 00:13:58,580 It's the same numbers as 1, 2, 4, 5, 7, 8, 295 00:13:58,580 --> 00:14:00,070 just in a different order. 296 00:14:00,070 --> 00:14:02,040 Let's do one more example. 297 00:14:02,040 --> 00:14:03,840 Let's try multiplying by 7. 298 00:14:03,840 --> 00:14:06,130 That's another respectable element over here. 299 00:14:06,130 --> 00:14:14,331 7 times 1 is 7, 7 times 2 is 14, which means it's 5 in Z9. 300 00:14:14,331 --> 00:14:15,850 4 times 7 is 28. 301 00:14:15,850 --> 00:14:20,490 Well, 3 times 7 is 27, so that leaves a remainder of 1. 302 00:14:20,490 --> 00:14:22,590 And 4 times 7 is 1 in Z9. 303 00:14:22,590 --> 00:14:27,050 Likewise, 5 times 7 is 8, 7 times 7 is 4, and 7 times 8 304 00:14:27,050 --> 00:14:30,240 is 56, which translates to 2. 305 00:14:30,240 --> 00:14:34,130 And sure enough, as claimed, I see the same numbers, 7, 5, 1, 306 00:14:34,130 --> 00:14:38,390 8, 4, 2, just these numbers scrambled in order. 307 00:14:38,390 --> 00:14:43,220 They're permuted, which is the outcome of multiplying by 7. 308 00:14:43,220 --> 00:14:44,640 OK. 309 00:14:44,640 --> 00:14:46,410 So let's go back. 310 00:14:46,410 --> 00:14:48,930 What we've just illustrated is this fact that we've already 311 00:14:48,930 --> 00:14:53,900 concluded that, if you take Zn* and you multiply it 312 00:14:53,900 --> 00:14:57,320 by an element k in Zn*, you get the same set in a different 313 00:14:57,320 --> 00:14:57,820 order. 314 00:14:57,820 --> 00:15:02,450 So Zn* is equal to k times Zn*. 315 00:15:02,450 --> 00:15:05,920 And now we're on the brink of proving Euler's Theorem. 316 00:15:05,920 --> 00:15:07,890 Because what I want to do is say, look, 317 00:15:07,890 --> 00:15:09,430 these two sets are the same. 318 00:15:09,430 --> 00:15:12,390 Let's multiply all the elements on the left 319 00:15:12,390 --> 00:15:15,290 together, and multiply all the elements on the right together. 320 00:15:15,290 --> 00:15:17,780 Let's take the product of those elements. 321 00:15:17,780 --> 00:15:22,940 So let's take the product of Zn* and compare it to the product 322 00:15:22,940 --> 00:15:24,260 of kZn*. 323 00:15:24,260 --> 00:15:26,870 So big pi here is indicating the product 324 00:15:26,870 --> 00:15:29,580 of all of the elements in this set, the product of all 325 00:15:29,580 --> 00:15:31,320 of the elements in this set. 326 00:15:31,320 --> 00:15:35,420 Well, let's look at the set on the right. 327 00:15:35,420 --> 00:15:39,950 This is the product of k times all the elements in Z*. 328 00:15:39,950 --> 00:15:41,610 Well how many elements are there? 329 00:15:41,610 --> 00:15:44,510 Phi of n elements in Z*, by definition. 330 00:15:44,510 --> 00:15:47,090 And let's factor out all the k's. 331 00:15:47,090 --> 00:15:51,500 So this expression here, the product of k times each element 332 00:15:51,500 --> 00:15:56,100 in Zn*, is the same as the product of the elements in Zn* 333 00:15:56,100 --> 00:15:59,380 times k to as many elements as there were, 334 00:15:59,380 --> 00:16:00,690 namely k to the phi of n. 335 00:16:00,690 --> 00:16:03,150 I'm just factoring k out of this product. 336 00:16:03,150 --> 00:16:05,070 And there's my k to the phi of n. 337 00:16:05,070 --> 00:16:06,840 And now look what I got here. 338 00:16:06,840 --> 00:16:10,250 That's pi Zn*, and that's pi Zn*. 339 00:16:10,250 --> 00:16:13,620 What do I know about multiplying elements in Zn*? 340 00:16:13,620 --> 00:16:15,330 They're in Zn*. 341 00:16:15,330 --> 00:16:18,440 This product will be some other element is Zn*. 342 00:16:18,440 --> 00:16:19,750 So will this product. 343 00:16:19,750 --> 00:16:21,720 But what do I know about Zn*? 344 00:16:21,720 --> 00:16:23,210 They're cancelable. 345 00:16:23,210 --> 00:16:26,520 So just looking-- ignoring the middle term now, 346 00:16:26,520 --> 00:16:29,660 what I'm concluding is that the product of Zn* is k to the phi 347 00:16:29,660 --> 00:16:31,440 of n times the product of Zn*. 348 00:16:31,440 --> 00:16:33,830 Let's cancel those cancelable terms. 349 00:16:33,830 --> 00:16:34,730 And I'm done. 350 00:16:34,730 --> 00:16:36,500 I've just figured out that 1, which 351 00:16:36,500 --> 00:16:39,520 is the result of canceling the term on the left, 352 00:16:39,520 --> 00:16:41,440 is equal to k to the phi of n. 353 00:16:41,440 --> 00:16:45,850 And we have successfully proved Euler's Theorem, 354 00:16:45,850 --> 00:16:49,270 which is what we were aiming for in this segment.