GCF and LCM
Learning goals
- Find a GCF and an LCM by listing factors or multiples
- Compute a GCF and an LCM from prime factorizations, taking the lowest or highest prime power
- Explain why lowest serves the GCF and highest serves the LCM
- Apply the product rule for two numbers, and say why three break it
- Read greatest number of equal groups as GCF and coinciding cycles as LCM
Common factors and the GCF
A common factor of two positive whole numbers is a number that is a factor of both. Take and . Their factors are
The numbers that appear in both lists are and : these are the common factors of and . Every pair of positive whole numbers shares at least the factor , so the list of common factors is never empty. The largest entry in it is the one we care about most.
The greatest common factor (GCF) of two positive whole numbers is the largest number that is a factor of both. For and the common factors are , and the greatest of these is , so
This is the largest number you could divide both and by and still land on whole numbers: and . That is exactly what makes the GCF useful. When you reach fractions in the next chapter, you will divide the top and bottom of a fraction by their GCF. That is what reduces the fraction as far as it will go in a single step.
Common multiples and the LCM
Now flip the question around. A common multiple of two positive whole numbers is a number that is a multiple of both. List a few multiples of and of :
The numbers in both lists, , are the common multiples of and . Unlike common factors, there are infinitely many of them, because you can always go further out and find more. But there is a smallest one, and that is the one worth naming.
The least common multiple (LCM) of two positive whole numbers is the smallest positive common multiple of the two. The common multiples of and start , so
This is the soonest the two counting patterns line up: count by fours and by sixes, and is the first place they meet. That is why the LCM is the natural common denominator when you add fractions later: it is the smallest number into which both denominators fit.
The GCF is a factor of the numbers, so it is never bigger than either one. The LCM is a multiple of the numbers, so it is never smaller than either one. For and , the GCF is , at most as big as the smaller number. The LCM is , at least as big as the larger. If a value you have called the GCF comes out larger than the numbers themselves, you have the two swapped. The same is true if an LCM comes out smaller than those numbers.
The listing method
The lists above are the listing method (writing the factors or the multiples out and reading the answer off the lists), and they always work:
- For the GCF, write out the factors of each number, find the ones common to both, and take the largest.
- For the LCM, write out multiples of each number until a value shows up in both lists, and take the first such value.
Listing is reliable and easy to picture, which makes it the right way to meet these ideas. Its drawback shows up with bigger numbers. The factor lists get long, and you might count out a great many multiples before the lists finally meet. For and you would list multiples up to before they coincide. So we want a method that does not depend on the numbers being small, and prime factorization provides exactly that.
Before leaving the listing method, it is worth running it once from start to finish. Write out the factors of each number, then read off the ones that appear in both lists:
The numbers in both lists are , and , so those are the common factors of and . The largest of them is , so . Notice what disqualifies a number like : it divides but not , so it appears in one list and not the other. A factor has to survive both lists to count as a common one.
Check your understanding
Using the listing method, what is ?
List the factors of each and find the largest they share. Factors of : . Factors of : .
The value is the LCM, not the GCF, and and are common factors but not the greatest.
Listing works the same way for the LCM. Write out multiples of each number and watch for the first value that shows up in both lists.
Check your understanding
Using the listing method, what is ?
List multiples of each number until one appears in both lists. Multiples of : . Multiples of : .
The value is a common multiple of and too, but it is not the first, so it is not the least. The value is , not a multiple of either number at all, and is not even a multiple of .
The prime-factorization method
Every whole number greater than has a unique prime factorization. That factorization records exactly how many copies of each prime the number is built from. That bookkeeping is precisely what the GCF and LCM need. Start each number in prime-power form. Take and :
Think of each number as a bag of prime factors. The bag for holds two s and one ; the bag for holds one and two s. With the numbers written this way, both answers come from one simple rule each.
- GCF: for each shared prime, take the lowest power it has in the two numbers. The prime appears as in but only in , so take . The prime appears as in and in , so take . Multiply: . A prime that sits in only one of the numbers is not shared, so it contributes nothing to the GCF.
- LCM: for each prime, take the highest power that appears in either number. For take ; for take . Multiply: .
Both agree with the lists ( from before, and is indeed the first common multiple of and ). The figure below shows why “lowest” and “highest” are the right choices. The figure sets the shared core that sits inside both numbers against the combined pile that contains each number whole.
Why lowest power for the GCF
The rule is not arbitrary. A factor of both numbers can only use prime copies that both numbers actually own, and that limit is what forces “lowest power.”
Look at what each bag can spare. The bag for holds two s, but the bag for holds only one, so a common factor can use at most one : nothing can divide by asking for a it does not have. The s work the other way, since here it is that holds only one . Take each shared prime at the smaller of its two counts and you get , the GCF.
So the GCF is built only from the primes the two numbers truly have in common. Each of those primes is capped at the count in whichever number has fewer copies of it. Take a prime to a higher power than that, and the result would no longer divide the number with fewer copies.
Why highest power for the LCM
The LCM argument is the mirror image. A multiple of both numbers must contain enough copies of each prime to cover each number on its own. That is what forces “highest power.”
Check and against that demand. A common multiple has to hold two s, because does and every multiple of carries its factors along. It has to hold two s for the same reason, from the side. Two of each satisfies both demands at once, and is what the demands come to.
Side by side, the two rules are easy to remember once you see the reason. The GCF can only keep what both numbers can spare, so it takes the lower power. The LCM must satisfy whichever number needs more of a given prime, so it takes the higher power.
Check your understanding
Why must contain , not just ?
A common multiple has to be a multiple of as well as of . Since itself carries two s, every multiple of , including the LCM, must carry at least two s too. only demands one , so it is 's demand that forces here.
The other options are not real reasons. being even is irrelevant, and "the LCM is always a multiple of " is not a general fact; merely happens to be one this time.
Check your understanding
Why can not contain ?
A common factor can only use prime copies that both numbers actually have. Here has two s, but has only one, so any common factor is limited to one : a factor with would not divide .
The other three options are not real reasons. being even is irrelevant, since factors are not required to be odd; the GCF itself can be even, as it is here ().
Worked example 1 Find the GCF and LCM of and from their prime factorizations
Write each number in prime-power form first:
Go prime by prime. For the prime , the two powers are and . For the prime , they are and .
For the GCF, take the lower power of each:
For the LCM, take the higher power of each:
As a check, divides both and (giving and ), and both and divide (giving and ). So the answers behave exactly as a GCF and an LCM should.
Check your understanding
Given and , what is ?
For the LCM, take the highest power of every prime that appears in either number: (from ), (from ), and (in both).
The value is the GCF, and is the plain product, which is larger than the least common multiple.
GCF and LCM together: the product rule
Look back at and . The GCF was and the LCM was , and
That is not a coincidence of this one pair. For any two positive whole numbers and ,
The reason lives in the prime powers again. Look at the prime in and . There are two of them in and one in . The GCF takes the one and the LCM takes the two, so between them the two answers take all three. Multiplying by takes all three as well.
That happens at every prime, because a prime is offered just two counts, one from each number. The GCF takes the smaller and the LCM takes the larger, so between them they take both. The two counts can also be equal, as the s are in and . Then each answer takes one of the pair, and the tally comes out the same.
The same bookkeeping is easier to see with blocks than with exponents. Split each number into the part it shares with the other and the part it does not. That gives and , with the shared block in the middle. The GCF is that shared block by itself, and the LCM is all three blocks together. So the GCF times the LCM calls on the shared block twice and each outside block once, which is exactly what does.
This gives a handy shortcut. Once you have the GCF, you can get the LCM without listing anything, by dividing the product of the numbers by the GCF:
For and that is , matching what we found the long way.
Worked example 2 Use the product rule to find
First find the GCF. In prime-power form,
The only shared prime is , and the lower power is , so . The prime appears only in , so it is not part of the common factor.
Now apply the product rule instead of listing multiples:
The same answer falls out of the highest-power rule: . Either route works, and the product rule is quickest once the GCF is in hand.
Check your understanding
Given that , what is using the product rule?
The product rule says .
The value is the plain product , before dividing by the GCF. The value is the GCF you started from, not the LCM. And does not come from applying the rule correctly.
The power rules extend, but the product rule does not
Take , and . Only the prime sits in all three, and the fewest copies any of them holds is one, so . For the LCM, take the most copies of each prime that appears anywhere. That is two s from , one from and one from , giving . Both answers check out, since divides all three numbers and all three divide .
Nothing there was special to three numbers. A common factor has to divide all of them, so at each prime it is capped by whichever number holds the fewest copies. A common multiple has to cover all of them, so at each prime it needs enough for whichever number holds the most. Just more numbers to compare at each prime.
Worked example 3 Find the GCF and LCM of , and
Write all three in prime-power form:
Now go prime by prime across all three at once. The prime sits in and but not in , since is odd. The prime sits in all three, as , and . The prime sits in and but not in .
For the GCF, keep only the primes every number has, each at its lowest power. That leaves the prime on its own, and the lowest of its three powers is :
The primes and drop out for the same reason an unshared prime drops out with two numbers. The number has no copy of to give, and has no copy of .
For the LCM, take the highest power of every prime that appears anywhere, which is , and :
Check both ends. The GCF divides all three: , , and . And all three divide the LCM: , , and . Every division comes out whole, which is exactly what a GCF and an LCM are for.
The product rule does not extend, and , and show why. Their GCF is and their LCM is , so the two answers multiply to , while .
Watch the prime in those three numbers. The number holds one copy, holds none, and holds two. The GCF takes the fewest, none, and the LCM takes the most, two. The middle count, the single copy inside the number , is taken by neither, and that missing copy is the whole gap: . With two numbers there is no middle count to miss.
Check your understanding
For , and , why does come out smaller than ?
With two numbers, each prime offers only two counts, a lower one and a higher one, and the GCF and LCM take one each, covering both. With three numbers, a prime can offer a middle count that neither the GCF (which takes the lowest) nor the LCM (which takes the highest) ever picks up. Here the prime appears times in , time in , and times in : the GCF takes the , the LCM takes the , and the middle count of , from the number , is never taken by either. That missing copy is exactly the factor of separating from .
The GCF and LCM here are computed correctly ( and ). The mismatch is not a coincidence; it happens whenever three numbers give a prime a genuine middle count. And a GCF of does not by itself break anything, since two numbers can also have a GCF of without the product rule failing.
The lowest-power and highest-power rules work for any number of numbers, but this product rule works only for two. With three or more, read the GCF and the LCM straight off the prime powers instead: this shortcut, , does not carry over to three numbers in the same simple way.
Check your understanding
Given , and , what is ?
Keep only the primes that appear in every one of the three, each at its lowest power. The prime is missing from and the prime is missing from and , so only survives, once.
The value is , which quietly ignores . Since is odd it has no to offer, so no may sit in the common factor. The value is the LCM, taken from the highest powers instead. And would be the answer only if the three shared no prime at all, but every one of them contains .
GCF in a word problem: the greatest number of equal groups
Word problems hide the GCF and LCM behind everyday situations. The signal for a GCF problem is that you are splitting things into the greatest possible number of equal groups. The same signal appears when you are finding the biggest size that fits evenly into several totals at once.
Worked example 4 Packing into the greatest number of equal boxes
A baker has muffins and cookies. She wants to pack them into identical gift boxes so that every box has the same number of muffins and the same number of cookies. No muffins or cookies may be left over, and she wants to make as many boxes as possible. How many boxes can she make?
Each box gets an equal share of the muffins and an equal share of the cookies. So the number of boxes must divide both and . The largest such number is the greatest common factor. In prime-power form,
Take the lower power of each shared prime: for the prime , and for the prime . The prime is only in , so it drops out.
So she can make boxes. Each box holds muffins and cookies. Asking for the greatest number of equal groups is the tell that you want the GCF.
Check your understanding
A gym coach has jump ropes and cones and wants to set up the greatest possible number of identical stations, using every rope and every cone with none left over. How many stations can she set up?
Splitting into the greatest possible number of identical groups is the GCF signal. Write and , then take the lowest power of each shared prime.
The value is , the number you would want instead if the question asked when two repeating cycles of and next line up. The value is a common factor of and but not the greatest one, and is just one of the two original numbers.
LCM in a word problem: when patterns coincide
The signal for an LCM problem is that two repeating cycles start together and you want to know when they will next line up. The same signal appears when you want the smallest amount that several given sizes can all build up to exactly.
Worked example 5 When do the two bells ring together again?
At a train station, one bell rings every minutes and another rings every minutes. They ring together at . How many minutes until they next ring at the same time?
The first bell rings at minutes (the multiples of ), and the second at minutes (the multiples of ). They coincide at any common multiple, and they next coincide at the smallest one, the least common multiple. In prime-power form,
Take the highest power of each prime: for the prime , and for the prime .
So the bells next ring together after minutes, at . Checking: rings of the first bell and rings of the second, both whole, so really is a moment they share. Asking when repeating events next coincide is the tell that you want the LCM.
Check your understanding
Two runners start together on a track. One finishes a lap every minutes, the other every minutes. After how many minutes do they next cross the start line at the same time?
They meet at the start line at a common multiple of their lap times, and next at the least common multiple. Write and , then take the highest power of each prime.
The value is the GCF, and is the plain product, not the least common multiple.
A word problem never announces which of the two you need; you have to read for the signal.
Check your understanding
A youth group has volunteers and supply kits. It wants to form identical teams, giving every team the same number of volunteers and the same number of kits with none left over, using as many teams as it possibly can. Which computation finds the number of teams?
Splitting into as many identical teams as possible, with nothing left over, is the GCF signal: the number of teams has to divide both totals, and you want the largest number that does.
would be the right computation for a when do two repeating cycles of and next coincide question instead, not this one. Adding or multiplying the totals answers neither question.