 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? They 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 four choices. You could have 0, 1, 2, or 3 as remainders if you divide something by 4. No matter what integer you are dividing 4 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 four 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? That 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 a proof by contradiction or contraposition instead. If we try to do those two 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 0 is out because remember we assume that 3 doesn't divide n, which means it doesn't divide in 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 two 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 two cases possible. So if you can prove the result in those two cases, those cases cover all the possibilities of the assumption, and there is obviously no overlap between the two. 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 that 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 on to 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 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 two 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. 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 and approve. Thanks for watching.