Least Common Multiple and When Algebra Calls for It
Find the least common multiple of numbers and expressions, and use it to add fractions, clear denominators and solve cycle problems.
Key takeaways
- A multiple of n is n times a whole number, and the LCM is the smallest positive multiple shared by all the numbers.
- With prime factorizations, take each prime that appears anywhere, raised to its highest exponent.
- For two positive integers, the LCM equals their product divided by their greatest common factor.
- Used as a common denominator, the LCM keeps the numbers in a fraction problem as small as possible.
- For polynomial denominators, factor each one first and then build the LCM from the distinct factors.
The least common multiple, or LCM, of two or more positive whole numbers is the smallest positive number that each of them divides evenly. For 12 and 18 it is 36.
Algebra calls for it whenever different denominators have to meet: when you add or subtract fractions, when you clear fractions from an equation and when you combine rational expressions. It also answers questions about repeating events that need to line up again.
Multiples and common multiples
The multiples of 12 are 12, 24, 36, 48, 60, 72 and so on. The multiples of 18 are 18, 36, 54, 72 and so on. The numbers on both lists, such as 36 and 72, are common multiples. The smallest positive one is the LCM.
There are always infinitely many common multiples, so there is no greatest one. All of them are multiples of the least one: here 36, 72, 108 and the rest.
The product of the numbers is always a common multiple, but it is often not the least. For 12 and 18 the product is 216, which is six times larger than needed. Only when the numbers share no factor above 1, as with 8 and 15, is the product itself the LCM.
Listing multiples
The most direct method is to count up the multiples of the largest number and stop at the first one the others divide.
For 6, 8 and 9, count by 9s: 9, 18, 27, 36, 45, 54, 63, 72. Testing each, 72 is the first that both 6 and 8 divide. So the LCM is 72.
Counting by the largest number saves work, because you test fewer candidates. The method is quick when the answer is modest and tedious when it is not. It is still a fine way to check an answer found by another route.
Building it from primes
Factor every number, then collect each prime at the highest power in which it appears anywhere.
12 = 2² × 3
18 = 2 × 3²
LCM = 2² × 3² = 36 The reason is simple. A common multiple must contain enough copies of each prime to cover every number. It needs two 2s because of the 12 and two 3s because of the 18. Anything extra would make it larger than necessary.
Three numbers work the same way: 4 = 2², 6 = 2 × 3 and 10 = 2 × 5, so the LCM is 2² × 3 × 5 = 60. Compare this with the greatest common factor, where you take the lowest power of only the shared primes.
The shortcut through the GCF
For two positive integers a and b:
LCM(a, b) = (a × b) / GCF(a, b)
LCM(12, 18) = 216 / 6 = 36 Dividing before multiplying keeps the numbers small: compute 12 ÷ 6 = 2, then 2 × 18 = 36. For larger values such as 84 and 126, whose GCF is 42, you get 84 ÷ 42 × 126 = 252.
Be careful with three or more numbers. For 4, 6 and 10, the product is 240 and the GCF is 2, and 240 ÷ 2 = 120 is not the LCM of 60. Instead, find the LCM two at a time: LCM(4, 6) = 12, then LCM(12, 10) = 60.
Adding and subtracting fractions
Fractions can only be added directly when they count pieces of the same size, which means a common denominator. The LCM of the denominators is the least common denominator.
5/12 + 7/18
LCM of 12 and 18 is 36
= 15/36 + 14/36
= 29/36 Each fraction was multiplied by a form of 1: 3/3 for the first and 2/2 for the second.
You could use 216 as the denominator and still be right. You would get 90/216 + 84/216 = 174/216, and then you would have to reduce by 6. The LCM spares you that cleanup, though a final check for reduction is still wise, since a sum such as 1/6 + 1/3 = 3/6 simplifies to 1/2.
Clearing denominators in equations
In an equation, you may multiply both sides by the LCM and remove all the fractions at once.
x/4 + x/6 = 10
multiply every term by 12
3x + 2x = 120
5x = 120
x = 24
check: 6 + 4 = 10 Every term gets multiplied, including whole numbers on either side. When the variable sits in a denominator, note the forbidden values before you start.
2/x + 1/3 = 5/(3x), x ≠ 0
multiply by 3x
6 + x = 5
x = -1
check: -2 + 1/3 = -5/3 and 5/(-3) = -5/3 More examples are in clearing fractions from an equation. Note that this move applies to equations. An expression has no second side, so you cannot multiply the fractions away.
LCMs of algebraic expressions
For monomials, take the LCM of the coefficients and the highest power of each variable. The LCM of 6x² and 8x is 24x².
1/(6x²) + 3/(8x), x ≠ 0
= 4/(24x²) + 9x/(24x²)
= (9x + 4)/(24x²) For polynomials, factor first. To find the LCM of x² - 9 and x² + 6x + 9:
x² - 9 = (x - 3)(x + 3)
x² + 6x + 9 = (x + 3)²
LCM = (x - 3)(x + 3)² The factor x + 3 appears once in one expression and twice in the other, so it is taken twice. Multiplying the two original polynomials would also give a common denominator, but of degree four instead of three. See least common denominators of polynomial fractions for more.
Cycles that line up
The LCM answers "when will these happen together again?"
Say two buses leave a station together at 8:00. One leaves every 12 minutes and the other every 18 minutes. They leave together whenever the elapsed time is a multiple of both, so the next time is after 36 minutes, at 8:36, and then at 9:12.
Gears work the same way. If a 20-tooth gear drives a 30-tooth gear, the same pair of teeth meet again after 60 teeth have passed, which is 3 turns of the small gear and 2 of the large one.
Buying in packs is another case. With items sold in packs of 8 and 10, the smallest matching count is 40 of each, or 5 packs and 4 packs.
A full rational expression example
Here is the whole routine on a subtraction with polynomial denominators.
x/(x² - 4) - 1/(x² + 2x), x ≠ 0, 2, -2
factor: x² - 4 = (x - 2)(x + 2)
x² + 2x = x(x + 2)
LCD: x(x - 2)(x + 2)
= x·x / [x(x - 2)(x + 2)] - (x - 2) / [x(x - 2)(x + 2)]
= (x² - x + 2) / [x(x - 2)(x + 2)] The first fraction was missing the factor x, and the second was missing x - 2. Each was multiplied top and bottom by exactly what it lacked. The parentheses around x - 2 matter, because the minus sign applies to both of its terms.
Test x = 1. The original is 1/(-3) - 1/3 = -2/3. The result is (1 - 1 + 2)/(1 × (-1) × 3) = -2/3. They agree.
Keep the denominator factored in your answer. It displays the excluded values and shows whether anything cancels with the numerator. Here x² - x + 2 does not factor over the real numbers, so the work is done.
Choosing a method by the numbers
Small numbers with an obvious answer need no machinery: count multiples of the largest. When the numbers share a large factor you can spot, use the product divided by the GCF. When there are three or more numbers, or any variables, go through factorization.
| Numbers | Convenient method | LCM |
|---|---|---|
| 5 and 7 | coprime, so multiply | 35 |
| 9 and 27 | one divides the other | 27 |
| 15 and 20 | count by 20s | 60 |
| 84 and 126 | product over GCF | 252 |
| 8, 9 and 25 | no shared primes, multiply | 1,800 |
| 12, 15 and 18 | factorization | 180 |
For the last row, 12 = 2² × 3, 15 = 3 × 5 and 18 = 2 × 3², so the LCM is 2² × 3² × 5 = 180.
Mistakes to watch for
- Adding denominators. In 1/4 + 1/6, the denominator of the sum is not 10.
- Changing only the bottom. Whatever multiplies the denominator must multiply the numerator too.
- Splitting a sum. The expression x + 3 is a single factor. The LCM of x and x + 3 is x(x + 3), not x + 3.
- Doubling up needlessly. A factor shared by two denominators is taken once, at its highest power, not once for each appearance.
- Dropping restrictions. Values that make any original denominator zero stay excluded, even if that factor later cancels.
Choosing between GCF and LCM
Ask what the answer must do. If you are splitting things into the largest equal groups or cutting the longest equal pieces, the answer divides the given numbers, so you want the GCF. If you are repeating things until totals match, the answer is built up from the given numbers, so you want the LCM.
A size check catches most mix-ups. For positive integers, the GCF is never larger than the smallest number, and the LCM is never smaller than the largest.
Common questions
Must I use the least common denominator?
No. Any common denominator gives a correct result once you simplify. The least one is a convenience that keeps coefficients small and, with polynomials, keeps the degree low. With denominators x - 1 and x² - 1, using their product creates an extra factor of x - 1 that you would later have to find and cancel. Spotting that x² - 1 already contains x - 1 saves that whole detour.
Why not include 0?
Zero is a multiple of every integer, so allowing it would make 0 the answer every time. The definition asks for the smallest positive common multiple.
What if one number divides the other?
Then the larger one is the LCM. The LCM of 7 and 21 is 21.
Can the LCM of expressions differ in sign?
An LCM of polynomials is determined only up to a constant factor. Since 2 - x = -(x - 2), the two count as the same factor, and you adjust a sign in the numerator.