>> Welcome back to another screencast about the division algorithm. Let's begin this one with a review to see how much you remember about this result. And also to introduce a key idea that the division algorithm offers. So, what are the possible remainders you could get if you divide any integer at all by 4? Is it 0, 1, 2, 3, 4, there are infinitely possible remainders, or the number of remainders depends upon the number being divided? Select all the ones that apply and come back after you've made your selections. So, the answers here are the first 4 choices. You could have 0, 1, 2, or 3 as remainders if you divide something by 4. No matter what integer you are dividing into, let's call it a, the division algorithm says that there are unique integers, q and r, such that a equals 4q plus r. Remember, 4 is the divisor or the b in the algorithm this time. And importantly, these numbers have to be such that 0 is less than or equal to R is less than 4. That's a strict inequality there on the right end. R is less than 4. So, we cannot just get any remainder we want. The remainder must be an integer that is greater than or equal to 0 and less than 4. And the only 4 integers that satisfy that condition are 0, 1, 2, and 3. So, we know this from long division, as well. During the long division process, if I'm dividing by 4 and have a remainder that is 4 or higher somewhere in the process, I know that I can keep dividing until it's smaller. So, this puts a limit on the size of the remainder. And since the remainders are integers, it puts a limit on the number of remainders I can have. Now, this fact that the remainder can only be a finite list of integers turns out to be a very useful tool in constructing proofs that involve integers. Because now it gives us a natural means of setting up cases. So, let's look at the following example to see why. We're going to prove the proposition that says, "For every integer n, if 3 does not divide n, then n squared is congruent to 1 modulo 3." So, let's try this with a direct proof. So, we would start a direct proof by assuming that n is an integer such that 3 does not divide n. And we want to prove that n squared is congruent to 1 mod 3. So, what do you do with the assumption that 3 doesn't divide n? What would be an initial forward step that you would do in the proof after making the assumption? Well, often in the past, we'd balk at this kind of negative statement, 3 doesn't divide n, and maybe back up and try our proof by contradiction or contraposition instead. If we tried either of those 2 routes instead of direct proof this time, we'd still end up needing a negative statement in the conclusion. So, why don't we just stick with direct proof. So, again, what do we do with the assumption? What's a forward step we can make? We've assumed that 3 does not divide n. Well, this time, if we use the division algorithm, we can make some forward progress. No matter what n is, the division algorithm says that when you divide n by 3, you're going to get a quotient and a remainder. By assuming that 3 doesn't divide n, this is telling us something about that remainder. Namely, that the remainder can't be 0. It has to be either 1 or 2. Remainder is 0 is out, because remember, we assume that 3 doesn't divide n, which means doesn't divide n evenly. And the division algorithm tells us that we can't get a remainder of 3 or higher in this case, because we are dividing by 3. So, this allows us to set up 2 cases. Case 1 is where the remainder is 1 when you divide n by 3. And case 2 is where you get a remainder of 2 when you divide n by 3. Those are the only 2 cases possible. So, if you can prove the result in those 2 cases, those cases cover all the possibilities of the assumption, and there is obviously no overlap between the 2. We'll have proven the entire proposition. So, once we realize this fact, the proof actually goes quite quickly. Let's do case 1 first. So, case 1 is where the remainder we get when we divide n by 3 is equal to 1. That means there exists an integer q such that n is equal to 3q plus 1. So, we want to show that n squared is congruent to 1 mod 3. So, let's get an expression for n squared first. And there it is. By closure, the expression in parentheses is an integer. So, n squared minus 1 is 3 times an integer. And that means 3 divides n squared minus 1, which in turn tells me that n squared is congruent to 1 mod 3 in this case. So, that finishes case 1. Now, we move onto case 2. And that's where the remainder is 2 when you divide n by 3. This means that there exists an integer q such that n equals 3q plus 2. Again, let's get in an expression for n squared. And there it is. And it's expanded all the way out using algebra. Once again, by closure, the expression in parentheses is another integer. So, once again, 3 divides n squared minus 1. And hence, n squared is congruent to 1 mod 3 in this case, as well. And again, since these 2 cases cover all the possibilities of the integer n. Remember, it wasn't divisible by 3. Otherwise, we would have to add a third case where n is divisible by 3. And since none of these cases overlap, this does complete the whole proof. So, let's end this off with a concept check to see how well you're understanding this particular strategy. Consider the following proposition. Suppose n is an integer that is not divisible by 5. Then the 1's digit of n squared is not equal to 5. So, if you were going to use a direct proof here and use the division algorithm to set up cases, how many cases would you use? Would it be 1, 2, 3, 4, 5, or not enough information? So, the answer here is D, 4 cases. The proposition has to do with dividing an integer by 5. And when we do that, no matter what the integer is, the division algorithm tells me that I could get a maximum of 5 possible remainders when I do this. That would be 0, 1, 2, 3 or 4. The remainder of 0 is ruled out by this proposition because of the assumption that n is not divisible by 5. So, that leaves 4 possible remainders. Namely, 1, 2, 3, and 4. A direct proof would proceed from here by exhausting these 4 cases. Case 1 would assume that n is equal to 5q plus 1 for an integer q and determining something about n squared. And case 2 would be assuming that n is equal to 5q plus 2 and working with n squared. Case 3 would assume n is 5q plus 3, and case 4 is assuming that n equals 5q plus 4. So, this is kind of a long proof if you wrote it all the way out. But each of the 4 cases is fairly straightforward. And then at least the work isn't hard, even if there is a lot of it. So, that's how the division algorithm can be very useful in helping us set up cases in situations where we need more information in a proof. Thanks for watching.