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.

17 min read

Which numbers divide both 1212 and 1818 exactly, and which of them is the biggest? This lesson starts with that question. It uses only positive whole numbers: 1,2,3,…1, 2, 3, \dots

A factor of a number is a whole number that divides it with no remainder. For example, 44 is a factor of 1212 because 12÷4=312 \div 4 = 3 exactly.

  • Factors of 1212: 1,2,3,4,6,121, 2, 3, 4, 6, 12
  • Factors of 1818: 1,2,3,6,9,181, 2, 3, 6, 9, 18

A common factor is a number on both lists. The common factors of 1212 and 1818 are 11, 22, 33 and 66.

The greatest common factor (GCF) is the largest common factor. So the GCF of 1212 and 1818 is 66. It is the largest number that divides both 1212 and 1818 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 11 whose only factors are 11 and itself.)

Here are the prime factorizations of the same two numbers:

12=2×2×3=22×312 = 2 \times 2 \times 3 = 2^2 \times 3 and 18=2×3×3=2×3218 = 2 \times 3 \times 3 = 2 \times 3^2

The exponent counts how many times a prime appears, so 222^2 means the prime 22 appears twice. A prime with no exponent written appears once, so 33 means 313^1.

Every factor greater than 11 is built from the number's own prime factors. For example, 6=2×36 = 2 \times 3 uses one 22 and one 33 from 12=2×2×312 = 2 \times 2 \times 3.

So a common factor can use only what both numbers have. Both have one 22, but only 1212 has a second. Both have one 33, but only 1818 has a second. The most you can take is one 22 and one 33, so the GCF is 2×3=62 \times 3 = 6, the same answer as the lists.

Rule for the GCF. For two whole numbers greater than 11: 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 11, so the GCF is 11.

Worked example

Find a GCF from prime factorizations

Find the greatest common factor of 3636 and 6060.

  1. Write the prime factorization of each number, because the GCF is built from the prime factors that the two numbers share.

    36=4×9=22×32,60=4×15=22×3×536 = 4 \times 9 = 2^2 \times 3^2, \qquad 60 = 4 \times 15 = 2^2 \times 3 \times 5
  2. 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.

  3. 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.

    22,312^2, \quad 3^1
  4. Multiply what you kept. This is the largest number you can build from the prime factors that both numbers have.

    22×31=4×3=122^2 \times 3^1 = 4 \times 3 = 12
  5. 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.

    36÷12=3,60÷12=536 \div 12 = 3, \qquad 60 \div 12 = 5

Answer

The greatest common factor of 3636 and 6060 is 1212.

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 1212 are 12×112 \times 1, 12×212 \times 2, 12×312 \times 3 and so on.

  • Multiples of 1212: 12,24,36,48,60,72,…12, 24, 36, 48, 60, 72, \dots
  • Multiples of 1818: 18,36,54,72,90,…18, 36, 54, 72, 90, \dots

A common multiple is a number on both lists, such as 3636 or 7272. Common multiples go on forever (36,72,108,…36, 72, 108, \dots), 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 1212 and 1818 is 3636. It is the smallest positive number that both 1212 and 1818 divide exactly.

Prime factorizations give the LCM too. Use 12=22×312 = 2^2 \times 3 and 18=2×3218 = 2 \times 3^2 again.

A multiple of 1212 equals 1212 times a positive whole number, so it contains every prime factor of 1212: the prime 22 twice and the prime 33 once. In the same way, a multiple of 1818 contains 22 once and 33 twice. A common multiple must do both. Having 22 twice already covers the one 22 that 1818 needs, and having 33 twice already covers the one 33 that 1212 needs. So the smallest common multiple has 22 exactly twice, 33 exactly twice and no other prime: 22×32=4×9=362^2 \times 3^2 = 4 \times 9 = 36, the same answer as the lists.

Rule for the LCM. For two whole numbers greater than 11: 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 1818 and 3030.

  1. Write the prime factorization of each number, because a common multiple must contain the prime factors of both numbers.

    18=2×9=2×32,30=2×15=2×3×518 = 2 \times 9 = 2 \times 3^2, \qquad 30 = 2 \times 15 = 2 \times 3 \times 5
  2. 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.

  3. 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.

    21,32,512^1, \quad 3^2, \quad 5^1
  4. Multiply what you kept. Using each prime only as often as it is needed keeps the common multiple as small as possible.

    21×32×51=2×9×5=18×5=902^1 \times 3^2 \times 5^1 = 2 \times 9 \times 5 = 18 \times 5 = 90
  5. 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.

    90÷18=5,90÷30=390 \div 18 = 5, \qquad 90 \div 30 = 3

Answer

The least common multiple of 1818 and 3030 is 9090.

The GCF and the LCM of 12 and 18, built prime by prime
PrimeIn 12In 18GCF keeps the smaller exponentLCM keeps the larger exponent
22
222^2
212^1
212^1
222^2
33
313^1
323^2
313^1
323^2
Multiply down the column
22×31=122^2 \times 3^1 = 12
21×32=182^1 \times 3^2 = 18
21×31=62^1 \times 3^1 = 6
22×32=362^2 \times 3^2 = 36

Key concept

Shared primes for the GCF, every prime for the LCM

Write two whole numbers greater than 11 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 11.
  • 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 8484 and 9090.

  1. Write the prime factorization of each number. Both answers come from these two factorizations.

    84=4×21=22×3×7,90=2×45=2×32×584 = 4 \times 21 = 2^2 \times 3 \times 7, \qquad 90 = 2 \times 45 = 2 \times 3^2 \times 5
  2. 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.

    21×31=2×3=62^1 \times 3^1 = 2 \times 3 = 6
  3. 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.

    22×32×5×7=4×9×5×7=36×5×7=180×7=12602^2 \times 3^2 \times 5 \times 7 = 4 \times 9 \times 5 \times 7 = 36 \times 5 \times 7 = 180 \times 7 = 1260
  4. 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.

    84÷6=14,90÷6=15,1260÷84=15,1260÷90=1484 \div 6 = 14, \quad 90 \div 6 = 15, \quad 1260 \div 84 = 15, \quad 1260 \div 90 = 14

Answer

The greatest common factor of 8484 and 9090 is 66, and their least common multiple is 12601260.

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 11.

Next, you will use the GCF and the LCM to solve word problems.