# Difference between revisions of "Least common multiple"

The least common multiple (LCM) of two or more numbers is the lowest multiple common to both. Any set of numbers have an infinite amount of common multiples, but only one LCM.

## How to find

The most primitive way to find the LCM of a set of numbers is to list out the multiples of each until you find a multiple that is common to all of them. This is a tedious method, so it is usually only used when the numbers are small. For example, suppose we wanted to find the LCM of two numbers, 4 and 6. We would begin by listing the multiples of 4 and 6 until we find the smallest number in both lists, as shown below.

4 8 12

6 12

12 is the LCM of 4 and 6.

The LCM of two numbers can be found more easily by first finding the greatest common divisor (GCD). Once the GCD is known, the LCM is calculated by the following equation, $LCM(a, b) = \frac{a \times b}{GCD(a, b)}$.

Let's use the above example again. The GCD of 4 and 6 is 2, since $4 = 2^2$ and $6 = 2 \times 3$. Using the above equation, we find $LCM(4, 6) = \frac{4 \times 6}{2} = \frac{24}{2} = 12$.

The LCM of two or more numbers can also be found using prime factorization. Try to find how this and the method above are related. The best way to explain this method is by example. Using 8 and 12: $12=2^2\times3$ $\ 8=2^3$
Now we find prime factors that are common to both: $\ 2^2$
(Notice this is GCD) Now find those not common: $2\times3$
Now we multiply: $2^2\times2^1\times3$
This equals 24 and we have our LCM.