YTread Logo
YTread Logo

This completely changed the way I see numbers | Modular Arithmetic Visually Explained

Jun 06, 2021
This video was sponsored by brilliant, choose any integer and raise it to the fifth power and the ones digit will remain the same or take any prime number besides two and three squared, then subtract one, that number will ensure that it is divisible by 24, in fact, take any squared prime number and subtract another smaller squared prime number, as long as both are greater than three, the result will be divisible by 24. These are some example problems from a number theory book which I spent a few months reading after becoming interested. in the mathematics behind cryptography oh, there are many details in

this

branch of mathematics.
this completely changed the way i see numbers modular arithmetic visually explained
I wanted to show you some of the basics in a visual way that is not as common to see, so let's start here if you want to determine if 119 was prime or if there are no equal integers other than one itself, how many divisors you would have to check, like 2 doesn't fit into 119, of course, then if you went to your calculator and did 119 over 3, you would see that it doesn't fit in evenly either, but how many

numbers

do I have to try before I can say it's prime or I'm not sure? The answer is sort of four, if not two, and by that I mean, hand me a calculator and I'll tell you. two tribes, whether 119 is prime or not and we'll see why in a second these here are the first prime

numbers

, nothing goes into them except one and themselves and they are infinite many of these all the other numbers that don't appear here as if 30 is made up of two or more of these Primes, so instead of seeing a number as it is, you can see it as what it is made up of and keep in mind that there is only one way to form a composite number using Prime and also. a new example 3 times 7 times 11 is 231 these three numbers are prime and therefore the only ones that go in 231 from

this

I can tell you that 231 is divisible by combinations of these prime numbers like 21 or 77 or 33 but it is not divisible by 13 or 17 or 19 and so on because, as we said, there is only one possible representation, so now, if you were asked if 18 factorial is divisible by 23, you could immediately say no.
this completely changed the way i see numbers modular arithmetic visually explained

More Interesting Facts About,

this completely changed the way i see numbers modular arithmetic visually explained...

Whatever the 18 factorial is, it is made up of prime numbers that are all less than 18 like 17 and 13 and 11 and so on that any compound like 15 are made up of primes less than that or 5 and 3 in this case you will not find a prime greater than 18 here and since there is only one way to represent 18 factorial as a multiple of prime numbers like any other number and I can safely say that it is not divisible by 23 or 29 or 31 and so on with that background, now you should agree According to this theorem for any composite number x1 of its prime factors must be less than its own square root to see why this is true, let's see what would happen if it were not so, for example the square root of 129 is approximately 11.35 .
this completely changed the way i see numbers modular arithmetic visually explained
Now let's say there are two prime factors to this. number, the previous theorem says that one of them must be less than eleven point three five because if that were not the case and both were greater than eleven point three five, like let's say 13, the next prime number we have already exceeded 129 when we multiply them , so one of the primes has to be smaller than the square root, in this case 129 is made up of 43 and 3, which goes with what the theorem says now, if we take the number 119, the square root is approximately ten points. nine, therefore, if it is composite, one of its factors must be less than ten point nine and the only prime numbers less than that are two, three, five and seven.
this completely changed the way i see numbers modular arithmetic visually explained
I know that two and five don't make 119 just by looking at the ones digits, of course. so I really only need to check two numbers, three doesn't go into 119 but seven does so it's composite and it only took two tries to solve and now if you want to determine if 901 is prime you know you just have to check the number from Prime. than the square root of that or about 30, which is just ten numbers or actually eight if you exclude the obviously incorrect two and five, but now I want to show you something called wheel math, okay, it's not actually called

modular

arithmetic

, but I'm going to stick with the wheel math first to keep this video as visual as possible.
I'm going to make a number wheel and to start it will have seven spokes or sections, although I could have chosen any number I wanted, so let's see what this says. us, the wheel starts at zero and spins up to six and then jumps up to seven and continues to spin in this spiral. One thing to keep in mind is that as we go through a section we simply add seven each time, which means that this section starts at zero are the numbers divisible by seven, section another thing you'll notice is that this tells us the remainders when We divide by seven, like if I have 15 guests for a party, I want to form teams of seven, I can form one, two teams with one.
The leftover person, also known as one, is the rest and if I had 25 friends, I can make one, two, three teams of seven, which would leave four leftovers. Any number that is divisible by seven would of course have no remainder, by the way the values ​​are in the same section as two and nine means they are congruent modulo seven, but again I'm going to keep this video as visual as possible and postpone all official notation. Now the math on this wheel gets interesting to start with, pick any two numbers let's say. two and three, then add them and the result, of course, will be five, but if we choose any two numbers in those same initial sections, such as nine and seventeen, the sum of 26 will be in the same final section and the same thing happens with multiplication two times three. is of course six so something like nine times seventeen should give us something about the same resulting radius in this case 153, then if I add one to that we get 150 to take us to the next radius and now just by looking I know that number. is divisible by seven since it's in that divisible by seven section of the wheel look, this is where it gets more interesting because I know that two times three plus one is divisible by seven.
I also know that let's say this time 16 times 24 plus one is also divisible by seven and that's because all of these sets of numbers are in the same section of our seven-spoke wheel and to continue with basic

arithmetic

, this is applies to exponents as well, two squared is of course four and this tells us that anything in this blue squared section will generate a number in this green section where we find the two and for respectively, so like 16 squared is 256, I know I'll find that number higher up in this green section, by the way, this isn't deep math or anything.
I mean, when we square a number To simplify it a bit, it simply becomes x squared plus an integer multiple of 7, so it is on the same radius as Take a look at number one on our wheel from 1 to the power of any power. just use 26 is itself or one and therefore maps to its own radius. I know that anything else in that section, like 15, will always map to exactly the same section when it includes any integer exponent, so I know 15 to the power of 26 or any other integer exponent. has a remainder of 1 when divided by 7, as it will be in the same section as 1, so now in a matter of seconds you can answer some seemingly difficult questions that you may not have been able to do a minute ago, such as 8 to the hundred 67 minus 1 divisible by 7 this is actually very easy to do.
I don't know what 8 to the power of 167 is, but I know that 1 to the power of 167 is 1, so 8 to the power of 167 will give us a value in that same section as well. just above, when we subtract 1 is the question asked, we move a radius and land on which all numbers are divisible by 7, so the answer to the original question is yes, no intensive work required, but here is the less intuitive property. We will discuss which one works since we are using a prime number of spokes or 7, in this case we take any number that is not divisible by 7 like 2 5 15 or whatever and raise it to the sixth power or 1 less than the number of spokes what we have. and that resulting value will always fall in the section that has a remainder of 1, this will always be the case with primary wheels, since if we had a 5 spoke wheel and we took maybe 12 and raised it to the fourth, our prime number minus 1, resulting we will definitely be in the same section that has one as a remainder as before and also as we saw before we can do quick calculations and say that 12 to the power of four minus one is divisible by five because the lands and the divisible by five sections of this new wheel this is Fermat's little theorem again written like this to break it down it says that in a wheel with a prime number of sections any number will call raised to the power of our prime minus one will be in the same section as the number one, as long as a is not divisible by a prime, so when asked what is the remainder when 2 to the power of 100 is divided by 101, it is actually very easy, since 101 is prime, than anything that is not a multiple of 101 . to the hundredth or that prime minus one will be in the same section as 1 and therefore that will be the remainder.
Another interesting property that works for any wheel with a prime number of sections is that if you take any number, you raise it to that prime power. or 5 in this case the result will be in exactly the same section and this type of answer responds to what we saw at the beginning of the video, you will notice that in any section all the other numbers have the same units digit since they are separated by 10 So since all of these numbers end in two or seven, we've now just seen that any number up to fifth stays in its own section on this wheel, so performing that operation either keeps the same digits or changes them to five, like two. going to seven or seven going to except when you increase the number to fifth, the probabilities will remain odd and evens will remain even, so the second option is not possible and any number up to fifth will retain its ones digit as mentioned at first.
Now, if we make a wheel of twelve numbers, we get some interesting things. One thing to note is that all prime numbers appear on only four spokes, the only exceptions to this are numbers two and three, which are the only primes on these two to the right. -Hand spokes here again, this is nothing deep as with most of this video it honestly happens simply because the Primes that make up 12 are just two and three, so in those sections as we add 12 and go up in our wheel, all resulting numbers will be divisible by two or three, in fact all sectors consisting of composite numbers start with a number divisible by two, three or both, sectors with Prime, on the other hand, all start with a prime number or the number one, so this is not innovative or anything, but I find it an interesting way to just look at numbers and prime numbers and then go back, if we multiply two primes plus two and three, the resulting value will also be in the same sections as the prime, just filling in some of the spaces. but the strangest thing is that any squared prime number besides two and three will land in this section, this means that any squared prime number minus one lands in the next spoken or in the section where everything is divisible by 12.
I mentioned this before , but it is even stronger. case where any prime squared minus one is divisible by 24 if you want to know why just keep in mind that P squared minus one can be written as P minus one times P plus one and on a number line we can write P minus 1 and P plus 1 around the original prime P now since P is prime then it is not even because it is greater than 2 which means P minus 1 and P plus 1 are even or divisible by 2 but any other even number is divisible by 4, so P minus 1 or P plus 1 has a factor of 4.
It is easier to see this with examples such as if these numbers were 30, 31 and 32, one of the even numbers must be divisible by 4, which is why 32 is then 3. consecutive numbers one of them must be divisible by 3 is not P since P is prime, so it has to be one of the others. This means that 2, 3 and 4 are factors of P minus 1 or P plus 1 and are multiplied by 24, so 24 is a factor of the original number now earlier in In the video I talked about dividing a number by 3, as I am I'm sure many of you know, when it comes to divisibility between 9 and 3, it's actually very easy because of a certain rule, the rule is whether the sum of the digits of a number is divisible. by 9, then the number itself is visible by 9 and the same goes for three, since 972 is divisible by 9 because 9 plus 7 plus 2 is 18, which in turn is divisible by 9.
The reason for this is that I can write 972 like nine hundred more. seventy plus 2, which can be decomposed into nine times 100 plus seven times ten plus two, one hundred can be written as 99 plus 1 and 10 as 9 plus 1, so if I distribute everything that is left, both terms aredivisible. by 9 because of the 9 and 99 in them, so for the whole number to be divisible by 9, the last terms combined must be what the digits of the original number are, although a slightly more official term for working with 9 is the digital route. to calculate the digital root of a number let me show you an example if we want to find the digital root of 9 21 let's say we simply add the digits to get 12, then we add those digits to get 3 once we are down For a digit like this we have the digital root.
The nice thing about this is that it tells us how far a number is from being divisible by 9, also known as the remainder. In this case we see that 9 21 minus 3 is divisible by 9, which we now also know because the addition of digits, another property if we go to the brilliant view, is that the digital roots do not change when nines are added or removed from a number, so, as we saw, 9 21 has a digital root of 3, but so does nine thousand nine hundred. twenty-one and ninety-nine thousand nine hundred and twenty-one and so on adding nines changes nothing, which means that the digital root of this huge number is three and therefore it is three away from being divisible by nine and this simply boils down to fact that if we eliminate all the nines, leaving us with 21, which is also three away from being divisible by nine, then something even stranger is that the digital roots are multiplied, as if you want to know how close this result is to being divisible by nine, you multiply the individual digital roots since these nines don't matter as we just saw, we can eliminate them, this means that the digital root of each number is one and that's when we multiply them, the digital root of the file is of course one , so I don't know what this big value is, but I know that if I subtract 1 it will be divisible by 9 and just because we have seen 24 appear in this video in a surprising way, here is another example that deals with digital roots, these are the first 24 numbers of the Fibonacci sequence if you exclude 0 where you add the previous two numbers to get to the next and these are the associated digital roots.
Interestingly, the digital root seen here repeats this pattern forever as it moves through the Fibonacci sequence that repeats every 24 numbers. I won't go into more details. beyond that but I found it interesting now, after all this you might be saying yes this can help me do quick math but can it help me write secret codes? Well, maybe you weren't thinking that, but still the answer is yes, as I briefly mentioned. At first I made a whole video about the math behind cryptography, but for those who just want to know how the things we saw here apply to message encryption, here's a quick explanation.
First, imagine a world before cryptography that you want to communicate with. someone you've never met before, but there's a spy in between the two of you who can hear everything you say or see everything you do. My question is how would you secretly communicate a message to the other person just by yelling at them? communicate anything, a meeting place, a secret number, a secret phrase or whatever, but the spy who can hear everything is not supposed to understand what you said and assumes that everyone speaks the same language and that none of you It's known, so see what you can. invent, yes, it's definitely not easy if you don't have time to communicate beforehand, but here's one thing you can do and tell the person we'll do some calculations on a wheel with 17 sections and choose a base. value of five.
I didn't have to choose these numbers, but I'm just using them for somewhere, so yes, you've said this out loud, which means the spy will be aware of everything up to now, but then you tell the person to think . of a secret number and don't say it out loud, well, you do the same thing, so let's say they choose four and you choose three. Now you make that base value of five raised to the power of your secret number, which gives us 125 and then find the smallest number in that section of the wheel with 17 numbers 125 will be in the same section as six and six is ​​what you tell the other person and then they do the same by calculating five to the fourth power which is in the same section as 13 on our wheel and they tell you that value, so now Eve's buyer also has these two values, but not the numbers secrets.
Lastly, you take her value of 13 and raise it to your secret number of 3 and again find where it is on our wheel. which is 4, in this case the other person does the same and will also get four. This number is then your secret key. We haven't actually shared a message, but we have established a secret key that we can then use to encrypt messages. For example, now we would like to change the letters of our message to 4 to communicate, although no, that is not what modern cryptography does. What you saw were the basics of the Diffie-Hellman protocol and the reason it works to establish a secret key is because it is easy to do the math, just work out the words, but it is very difficult for the spy to take the numbers you have and Working backwards to discover your secret numbers, and thus the final key algorithmically, would simply take too long, not with this example. but when it comes to hundreds of digit numbers, moving forward is doable fairly quickly, but going back right now is simply not doable in a short period of time, so you can have a secure way of communication even if someone is watching now , all you saw was Really, I'm only scratching the surface of this branch of mathematics, but if you found this content interesting, I recommend that you check out the brilliance number theory course, where you will learn a lot more.
There you will learn all the basics as you saw here, but it also includes interactive exercises and shows unique applications of all the underlying mathematics in much more detail. This includes things like analyzing the trajectory of a pool ball on an ideal table, certain dimensions, or how to mathematically solve a number theory puzzle, famously portrayed in the movie Die Hard. three in addition to number theory have complex differential equation analysis logic and over 50 other courses to choose from that come with practice problems and interactive exercises to ensure you fundamentally understand each concept before continuing. Additionally, they have daily challenges that make learning a habit so you can look forward to learning a variety of topics from quantum physics to geometry puzzles and more, if you want to start right now and support the channel you can click the link to below or go to the brilliant organization, main prep bar to get 20% off your annual premium subscription and with that I'm going to end the video there, if you enjoyed it make sure to LIKE and subscribe don't follow me on Twitter and join the main Facebook group of visits to all things related.
Ring the bell if you are not being notified and we will see you in the next video

If you have any copyright issue, please Contact