Chapter 1 · Number foundations review
Greatest Common Factor and Least Common Multiple
Use prime factorizations to find the greatest common factor and the least common multiple of two whole numbers, and learn why each rule works.
Which numbers divide both and exactly, and which of them is the biggest? This lesson starts with that question. It uses only positive whole numbers:
A factor of a number is a whole number that divides it with no remainder. For example, is a factor of because exactly.
- Factors of :
- Factors of :
A common factor is a number on both lists. The common factors of and are , , and .
The greatest common factor (GCF) is the largest common factor. So the GCF of and is . It is the largest number that divides both and exactly.
Listing every factor is slow for larger numbers. A faster way uses the prime factorization you already know: the number written as a product of primes. (A prime is a whole number greater than whose only factors are and itself.)
Here are the prime factorizations of the same two numbers:
and
The exponent counts how many times a prime appears, so means the prime appears twice. A prime with no exponent written appears once, so means .
Every factor greater than is built from the number's own prime factors. For example, uses one and one from .
So a common factor can use only what both numbers have. Both have one , but only has a second. Both have one , but only has a second. The most you can take is one and one , so the GCF is , the same answer as the lists.
Rule for the GCF. For two whole numbers greater than : write each prime factorization, keep only the primes that appear in both, give each one the smaller of its two exponents, and multiply. If no prime appears in both, the only common factor is , so the GCF is .
Worked example
Find a GCF from prime factorizations
Find the greatest common factor of and .
Write the prime factorization of each number, because the GCF is built from the prime factors that the two numbers share.
Find the primes that appear in both factorizations. The primes 2 and 3 appear in both. The prime 5 appears only in 60, so it cannot be part of any factor of 36. Leave 5 out.
Give each shared prime the smaller of its two exponents, so that the result divides both numbers. For the prime 2, both exponents are 2, so keep the exponent 2. For the prime 3, the exponents are 2 in 36 and 1 in 60, so keep the exponent 1.
Multiply what you kept. This is the largest number you can build from the prime factors that both numbers have.
Check with the definition. 12 divides both numbers exactly, so it is a common factor. A greater common factor would have to be a factor of 36 that is greater than 12, so it would be 18 or 36. Dividing 60 by 18 leaves a remainder of 6, and dividing 60 by 36 leaves a remainder of 24, so neither one divides 60.
Answer
The greatest common factor of and is .
Now turn the question around. A multiple of a number is what you get when you multiply it by a positive whole number. The multiples of are , , and so on.
- Multiples of :
- Multiples of :
A common multiple is a number on both lists, such as or . Common multiples go on forever (), so there is no greatest one. There is a smallest one.
The least common multiple (LCM) is the smallest positive number that is a multiple of both numbers. So the LCM of and is . It is the smallest positive number that both and divide exactly.
Prime factorizations give the LCM too. Use and again.
A multiple of equals times a positive whole number, so it contains every prime factor of : the prime twice and the prime once. In the same way, a multiple of contains once and twice. A common multiple must do both. Having twice already covers the one that needs, and having twice already covers the one that needs. So the smallest common multiple has exactly twice, exactly twice and no other prime: , the same answer as the lists.
Rule for the LCM. For two whole numbers greater than : write each prime factorization, keep every prime that appears in at least one of them, give each one the larger of its exponents, and multiply. A prime that appears in only one number keeps the exponent it has there.
Worked example
Find an LCM from prime factorizations
Find the least common multiple of and .
Write the prime factorization of each number, because a common multiple must contain the prime factors of both numbers.
List every prime that appears in at least one factorization: 2, 3 and 5. The prime 5 is not in 18, but every multiple of 30 contains it, so a common multiple needs it too.
Give each prime the larger of its exponents, so that the result contains all the prime factors of each number. For the prime 2, both exponents are 1, so keep 1. For the prime 3, the exponents are 2 in 18 and 1 in 30, so keep 2. The prime 5 appears only in 30, with exponent 1, so keep 1.
Multiply what you kept. Using each prime only as often as it is needed keeps the common multiple as small as possible.
Check with the definition. 18 and 30 both divide 90 exactly, so 90 is a common multiple. A smaller common multiple would have to be a multiple of 30 that is less than 90, so it would be 30 or 60. Dividing 30 by 18 leaves a remainder of 12, and dividing 60 by 18 leaves a remainder of 6, so neither one is a multiple of 18.
Answer
The least common multiple of and is .
| Prime | In 12 | In 18 | GCF keeps the smaller exponent | LCM keeps the larger exponent |
|---|---|---|---|---|
Multiply down the column |
Key concept
Shared primes for the GCF, every prime for the LCM
Write two whole numbers greater than as products of primes. Then choose prime by prime.
- GCF: keep only the primes that appear in both numbers, each with the smaller exponent, because a common factor must divide both numbers. If no prime is shared, the GCF is .
- LCM: keep every prime that appears in at least one number, each with the larger exponent, because a common multiple must contain all the prime factors of each number.
Multiply what you kept to get the answer.
Worked example
Find the GCF and the LCM together
Find the greatest common factor and the least common multiple of and .
Write the prime factorization of each number. Both answers come from these two factorizations.
For the GCF, keep only the primes in both numbers, which are 2 and 3, each with the smaller exponent, so that the result divides both numbers. The exponents of 2 are 2 and 1, so keep 1. The exponents of 3 are 1 and 2, so keep 1. The primes 5 and 7 each appear in only one number, so leave them out.
For the LCM, keep every prime that appears in at least one number, each with the larger exponent, so that the result contains all the prime factors of each number. That means exponent 2 for the prime 2, exponent 2 for the prime 3, and exponent 1 for each of 5 and 7.
Check both answers. Size test: 6 is not greater than 84, and 1260 is not less than 90. Division: 6 divides both numbers exactly, so it is a common factor, and both numbers divide 1260 exactly, so it is a common multiple.
Answer
The greatest common factor of and is , and their least common multiple is .
Takeaway. One pair of prime factorizations gives you both answers. For the GCF, keep only the primes that both numbers share, each with the smaller exponent, because a common factor must divide both numbers. For the LCM, keep every prime, each with the larger exponent, because a common multiple must contain all the prime factors of each number. These rules are for whole numbers greater than .
Next, you will use the GCF and the LCM to solve word problems.