 So earlier, we found the following result. Suppose the greatest common divisor of m and n is d, and will it take m greater than n? And m divided by n is some quotient with remainder r. Then, under these circumstances, this greatest common divisor d also divides r. And so we know that d divides r. Now, this also means that n and r have some greatest common divisor. So suppose the greatest common divisor of n and r is d prime, where d prime is larger than d. Since it is a divisor, then n is d prime u, and r is d prime v. And since m divided by n is q with remainder r, then, from our definition of division, we know that m is qn plus r. And equals means replaceable. We know what n is, and we know what r is. So we can replace them. And now we have a factorization of m d prime times q u plus v. So d prime also divides m. But this means that d prime divides m. And since it's the greatest common divisor of n and r, d prime also divides n. So d prime is a greater common divisor of m and n. And this leads to the following important result. Suppose the greatest common divisor of m and n is d, and m divided by n is q with remainder r. Then the greatest common divisor of n and r is also d. This makes it easier to find the greatest common divisor of any two numbers. So let's find the greatest common divisor of 1357 and 437. So we'll divide the larger by the smaller, 1357 divided by 437 is going to be 3 with remainder 46. Now, our theorem says that if the greatest common divisor of 1357 and 437 is d, then the greatest common divisor of 437 and 46, the remainder is going to be d as well. Well, how do you find the greatest common divisor of 437 and 46? To find this greatest common divisor, we'll divide the larger number by the smaller. 437 divided by 46 is 9 with remainder 23. And again, if the greatest common divisor of 437 and 46 is d, then the greatest common divisor of 46 and the remainder 23 is d as well. So how do you find the greatest common divisor of 46 and 23? Well, again, we'll divide the larger number by the smaller and get. And there's no remainder, which means that 46 is actually divisible by 23. And so the greatest common divisor of 46 and 23 is 23. And that means the greatest common divisor of 437 and 46 is 23. And so the greatest common divisor of 1357 and 437 is 23. This suggests the following process to find the greatest common divisor of two numbers. We'll produce the divisions m divided by n is something with some remainder, n divided by the remainder is something with some remainder, our remainders divided give us a quotient with some remainder, and so on. And the last non-zero remainder is the greatest common divisor. This method is known as the Euclidean algorithm. Now, properly speaking, to call it an algorithm, we have to show that it produces the required object and it ends after a finite number of steps. Well, our theorem that the greatest common divisor of two numbers is going to be the greatest common divisor of the smaller with the remainder essentially shows that the algorithm will produce the greatest common divisor as long as it ends. So let's think about that. Since each remainder must be less than the divisor, we must have n larger than the first remainder, larger than the second remainder, larger than the third remainder, and so on. Now, since the remainders are whole numbers, this is a descending sequence of whole numbers, and so there must be a last term, and so the process terminates, and so we properly have an algorithm. So let's find the GCD of 38831 and 26471. To apply the Euclidean algorithm, we'll start by dividing the one number by the other. Now, our current divisor and our current remainder are going to become the dividend and divisor in the next step. Now that may be hard to remember verbally, but there's a nice picture, it's these two things, and we'll slide them into position, then do the division, and again, the current divisor and the current remainder become the dividend and divisor in the next step, so we'll slide them over, then divide, and slide, and divide, and since we get a remainder of zero, the last non-zero remainder is the GCD, and so the GCD is going to be 103.