What this move does
The largest of the divisors that integers and have in common is their greatest common divisor, written . The smallest of their common positive multiples is their least common multiple, written . When we say and are coprime.
Once the numbers get big, listing divisors one by one is too slow. The Euclidean algorithm relies on just one fact:
Any number that divides both and also divides , and any number that divides both and also divides . The two pairs have exactly the same common divisors, so of course they have the same greatest one.
- Divide the bigger number by the smaller one and write .
- Take (divisor, remainder) as the new pair and divide again. The numbers keep shrinking, so this must stop.
- Stop when the remainder is : the divisor on that line is .
The rectangle on the workbench does the same thing: cut off squares of side , which leaves a smaller rectangle, and cut again.
Predict first
A rectangular floor is to be covered exactly with identical square tiles whose side is a whole number. What is the largest possible side of a tile?
The side of a tile must divide both and , so the largest possible is . , , , so it is .
Work through one
Example: find (51, 21) and write it as a combination of 51 and 21
Step 1 / 5- Set up the rectangle
Length , width . A “ruler” that measures both the length and the width exactly is a common divisor of the two.
That last step was no accident. It works for any two numbers:
Bézout's identity For any integers and , not both zero, there are integers and such that . In particular, and are coprime there are integers and with .
This immediately repairs the broken statement from the previous stop:
If and , then .
Take and multiply both sides by : . Both terms on the right are divisible by , so .
The least common multiple
Every time the rectangle is covered, the workbench also reports . It is tied to by a fixed relation:
So you don't need a separate method for the lcm: find with the Euclidean algorithm, then divide by it. Why this relation holds is something the “exponent bars” at the next stop show at a glance.
When it fails
Break it
Counterexample lab: remove one condition
Conclusion: if and , then ← still true?
, . Cut all the way down: the gcd is , so the lcm is just . So any number that is a multiple of both and must be a multiple of .
, . Cut all the way down and look at the “lcm” box.
The lcm is only , not . is a counterexample: and , but . The correct conclusion is always ; only when and are coprime does equal .
Practice
Use the Euclidean algorithm to find .
Find .
Find the smallest positive integer for which there is an integer with .
Prove that for every positive integer , the fraction is in lowest terms.