[Math] Why does the LCM long division method work

elementary-number-theoryleast-common-multiple

We're all familiar with the popular 'long division method' for finding the LCM of two numbers.

For example, to find the LCM of 36 and 24, we do something like this:

2 |24, 36 (divide both numbers by a common prime factor, and write the quotient below)
2 |12, 18
3 |6, 9
– |2, 3 (stop dividing at this point, as there is no common factor)

Now, the LCM is (2 x 2 x 3) x (2 x 3) = 72, obtained by multiplying the factors on the left column, with the uncommon factors which remain in the last row.

For students (and me too), this appears to be black magic. I've searched quite a few websites, as well as some books. None of them actually mention why this method works. I've tried figuring it out on my own too, but with no success.

Best Answer

What you are doing in your scheme is exactly factoring out the common prime factors $p_1,...,p_n$ from your two numbers $a,b$ (the numbers on the left side of your scheme). What is left after this factoring process are numbers $A$ and $B$ that do not share any more common primes to factor out (the bottom numbers of your scheme). We have

$$(*)\qquad a=p_1\cdots p_n\cdot A,\qquad b=p_1\cdots p_n\cdot B.$$

Now, note

$$\mathrm{lcm}(a,b)=a\cdot B=b\cdot A$$

because $B$ is exactly the factor missing from $a$ to make it a multiple of $b$ (you see $a\cdot B$ contains the primes $p_i$ and the factor $B$, exactly what $b$ needs). Equivalently for $A$ and $b$. So choose one of these identities $-$ say $a\cdot B$ $-$ and plug in $a$ from $(*)$ to get

$$\mathrm{lcm}(a,b)=a\cdot B=p_1\cdots p_n\cdot A\cdot B,$$

and this is exactly what you learned. The $p_i$ are from the left and the $A$ and $B$ are the numbers from the bottom.