Euclidean algorithm to find GCF
About this video
The video shows how to use the Euclidean algorithm to find the greatest common factor of 252 and 198. You keep replacing the pair with the difference of the two numbers and the smaller number, until both numbers are equal. The answer is 18.
You'll be able to
- explain what the greatest common factor of two numbers is.
- use repeated subtraction (the Euclidean algorithm) to find the GCF of two numbers.
- tell when the Euclidean algorithm is finished.
Key words
- greatest common factor (GCF)
- The largest number that is a factor of both numbers.
- Euclidean algorithm
- A method for finding the GCF by repeatedly replacing the larger number with the difference of the two numbers.
- difference
- The result of subtracting one number from another.
Transcript
- [Instructor] What we're going to do in this video is get some practice applying the Euclidean algorithm, named after the famous mathematician, Euclid, who's done so much work in geometry and other places. But this is kind of a cool one and surprisingly useful.
We're not going to prove it in this video, exactly why it works, but I'll show you how to use it, and I'll do it with a very real example. So let's say we wanna find the greatest common factor, and we're gonna do two pretty large numbers that it would be hard for me to do in my head.
So the greatest common factor of 252 and 198. And just as a reminder, this would be the largest number that is a factor of both. Well, what the Euclidean algorithm tells us is, this is going to be the same thing as the greatest common factor of the difference between these two numbers, so 252 minus 198, and the smaller of these two, and 198.
So 252 minus 198 is 54. So it's the same thing as the greatest common factor of 54 and 198. Well, we could either try to figure that out with some other method, or we could keep applying the Euclidean algorithm. This is going to be the same thing as the greatest common factor of the difference between the two, 198 minus 54, and the smaller of the two, and that's now 54.
Well, what's 198 minus 54? That is 144. And we can keep going. This is going to be the greatest common factor of the difference between these two, 144 minus 54, and the smaller of the two is still 54. So 144 minus 54, that is going to be... Did I do that right?
Yeah, that's going to be equal to 90. And so, I can keep going. This is going to be equal to the greatest common factor of the difference between these two, 90 minus 54, and the smaller of these two, that's still 54. So it's going to be the greatest common factor of 36 and 54.
And I could keep going. That's going to be the greatest common factor of the difference between these two, 54 minus 36, and now, the smaller one is 36. 54 minus 36 is 18. You might already be able to do this in your head, but I'll keep going. That's gonna be the greatest common factor of the difference between the two, 36 minus 18, and the smaller of these two, and 18.
36 minus 18 is 18. And now, it's hitting us over the head. What's the largest number that will divide into both 18 and 18? Well, that of course is going to be equal to 18. So hopefully you appreciate that. This would've not been easy to do with any other method.
We would factor each of those, either just looking at traditional factors or prime factors, and you try to rebuild to get to your greatest common factor, while the Euclidean algorithm, with just repeated subtraction essentially, lets us get there. Now, I didn't explain why it works.
And if you're inspired, I encourage you to think about why it's working. And hopefully, if I get some time, I might make a video that actually proves why it works.
Video © Khan Academy, used under CC BY-NC-SA. Watch on Khan Academy. Puzzicle is not affiliated with Khan Academy.