Least common multiple
The least common multiple (LCM) of two numbers is the smallest positive integer that is a multiple of both numbers. We can also find the least common multiple of more than two numbers; it is then the smallest positive integer that is a multiple of all of them.
As an example, take the numbers 3 and 4. We are looking for a number that is a multiple of both 3 and 4.
- The multiples of 3 are: 3, 6, 9, 12, 15, 18, 21, 24, 27, …
- The multiples of 4 are: 4, 8, 12, 16, 20, 24, 28, 32, …
We can see that some multiples appear in both lists. For example, 24 is a multiple of both 3 and 4. But we are not looking for just any common multiple – we want the smallest one. The least common multiple is therefore 12.
How to work out the least common multiple
The easiest way is to find the greatest common divisor (GCD) of the two numbers and then work out the least common multiple using the formula:
where lcm(x, y) is the least common multiple of the numbers x and y and