Hi there. Let's look in more detail how to actually compute in modular arithmetic. The main thing to bear in mind is that we are working with the remainders of division by the number that is written after the mod. So, when we work in mod five we are working with the remainders of division by five, would actually the remainders can only be zero, one, two, three, or four, there's only five options. So, every time we working in mod five we're really boiling down every number to either zero, one, two, three, or four. I'm talking about 23 and I want to work out what is the smallest positive number that it's congruent with 23 modulo five. I'm actually saying, what's the remainder of 23 when divided by five. That's really what I'm asking. Okay. So, we want to work out what that guy here is and the way to do that we do the division of 23 by five, and we know that 23 the largest multiple of five that is in 23 is 20. So, really will be doing 23 is 20 plus some extra bit that it's three. So three is that remainder. Now, how do we do that from the division itself? Well, 20 is four times five, so I've got four is the integer part of my division and then I've got my remainder three. So, the answer to this is a 23 is congruent with three mod five. It sounds like some kind of complicating it by writing down these expressions, but this is the meat and bones of we gotta do every time you work with numbers in in mod five. I'll show in the calculator. So, I'll write 23 divide by five, that gives you 4.6 none of those numbers is the remainder. Four is the integer part of the division as I had written on the board before, I'll show you again, okay that's a four there and now on the calculator I would do four times five which is the mod, which is 20 and then I'll do 23 take away 20 which is three. Okay, so done. Now, on the back of this I can get for free pretty much what 28 is congruent with mod five. So, 28 is just one more multiple of five away from 23 so he's got the same remainder when divided by five. What I mean is a 28 is 23 add five so really is going to have the same remainder when divided. So, 28 is congruent with 23 which is congruent with three mod five and you can check that out yourself by doing the calculation, by writing 28 divided by five, while really is going to be five, and some remainder because 25 fits into 28 and then you do 28 takeaway the 25 which is three as we said and job done. What about larger numbers? Can we bank on this idea for large numbers? Of course we do. If I had instead, if I had 128, 128 is a 100 on top of the 28 100 is itself a multiple of five so that's not going to change the remainder of the division. So, 128 is still going to be congruent with 28 and congruent with three Mod five. Now, in other words, the smallest positive number that is congruent with a 128 mod five is still three. Let's look at another number larger one. Might just write here number I fancy 1011024 nearly tricked you to think we're doing binary didn't I? Okay, anyway, so that's that one. What is that congruent with mod five? What is the smallest positive number this is congruent with this one, mod five? Again, don't get fooled by the large number. It all boils down to the remainder of division by five. Fortunately, when we look at multiples of five, the last digit, the units digit tells you whether the number is a multiple of five or not. If it ends in zero or five it is a multiple of five. This guide ends up in full but the closest number to it that is a multiple of five is going to be the guy that ends up with zero. So, 1011020 is the closest multiple of five so, this number plus four is the number we started with. Therefore, the remainder of the division by five is going to be that. This means you can spare during the whole division and in fact if you were to do the division you would be doing divide that by five, you have some integer part which don't care out and you're going to have a remainder of four. You will get it. Just check it out with your calculator. Okay. Let's have a taste of what mod nine looks like. Again, mod nine how many remainders you're going to have? Yeah, I can hear you. Nine remainders from zero to eight that's all you're going to get. So, if we're working with a 179 mod nine, there's only nine possibilities for that answer there. How do we get it? Now mod nine is one of my favorites because we got a little shortcuts to work out the remainder. It is the thing you've learned in primary school of casting of nines, yeah. So, casting off nines means you add up the digits of the number and that brings us to 17, the result is still a two digit number let's add the digits again, that gives you eight. So, eight is going to be the remainder of the division by nine, means that's going to get you the mod straightaway. It's [inaudible] property. This also works with low variation for mod three, and in mod three, there's a special relationship between nine and three. It is that yeah, three is the factor of nine. So, we can still do casting of nine's and then we do something else at the end. So, let's do the casting of nine. So, add up the digits of this guy and you we can shortcut this into- four and five is nine so I'll get rid of it and then I get six. Six is one digit number. Six would be the congruence mod nine, but we're not doing mod 9, we're doing mod three. We just note six is also a multiple of three. Therefore, the number we started with two, one, two, three, four, five is going to be a multiple of three as well, and therefore he has remainder zero when divided by three. Do you want to check that? Let's look in the calculator then. 21,345 divide by three, drum roll bong. 7115 by means of division is how he gets the zero remainder, okay. There we are. For free we get the numbers that come after and before this guy have the other remainders of that possible mod three. So, 221346 has remained a one when divided by three. 21347 has remainder two when divided by three, and the next number 21,348 you say it is divisible by three and so remainder zero. If you were tempted to write three there on the mod, it would be correct, but it wouldn't be totally correct because I want to boil it down to the smallest number that is congruent with 21348 mod 3, and the smallest is going to be either zero one or two. So, we've got another multiple of three here, and so on. Mod 11. Say, we've got a 1428 and again I'm asking you what is the smallest positive number this congruent with 1428 mod 11? Mod 11. 11 is pretty cool as well because there is another shortcut for working out the remainders of division by 11 and it goes this way, it's a trick with the digits. So we add up the first and the third digit. So, that's eight plus four and that is 12. Then, we add up the second and the fourth digit, two and the one. So, two plus one is three and now here's the clever bit, you do 12 takeaway the three so you do the sum of the odd order digits, takeaway the sum of the even ordered digits. So, do the 12 minus three and that gets us nine. Nine is going to be the remainder of a division by 11. So, that's going to be the mod. We can prove all these shortcuts I've shown you. We can prove them, but I just wanted to appreciate using them and see how much this helps you with your mental arithmetic and speeding up this calculation. Could be long and tedious, but let's look in the calculators. Is this true? Am I really talking the truth? You check, we're going to keep this in the calculator so 1428 divide by 11 you get 129. So, you would do a 129 times 11, which by the way we could do in the calculator but it will be so much more fun If we do it by hand here. So, I'll show you a trick of how would you multiplication by eleven one, two, nine, one, two, nine a bit of sync. So, Nine eleven four one, there we are, 1419, and then you take the initial guy 1428, takeaway that product and what do you get? What you get? You get nine as we said and so that's the remainder, okay. You could calculate it as well. It would be fun to multiply 11 by hand. I know you wouldn't understand that. Right. So, one more. Let's do mod 128, big number. So, in mod 128 how many remainders can we have when we divide by a 128? 128, all the remainders from zero to a 127. If our number is bigger than that then we need to do some division. So, let's look at 760. What is the smallest positive number that is congruent to 760 mod 128? Let's do it. Calculator time. Right, so, we write 760 divided by 128 and there we are. So, 760 divided by 128. The whole part of this division is five, let's work out the remainder. I'm going back on my calculator just cause I, yeah. 128 times five actually, this one could do in our heads, can we? 128 times five writing it down is 640 and then you would do 760 take away 640, and you get 120, which is the remainder of this division. Okay. And therefore the number we're asking you on mod 128