Skip to content
Prime Factorization and the Least Common Multiple

Prime Factorization and the Least Common Multiple

By the end of this section, you will be able to: find the prime factorization of a composite number, and find the least common multiple (LCM) of two numbers.

Find the prime factorization of a composite number

In the previous section, we found the factors of a number. Prime numbers have only two factors, the number 11 and the prime number itself. Composite numbers have more than two factors, and every composite number can be written as a unique product of primes. This is called the prime factorization of a number. When we write the prime factorization of a number, we are rewriting the number as a product of primes. Finding the prime factorization of a composite number will help you later in this course.

Prime factorization. The prime factorization of a number is the product of prime numbers that equals the number.

You may want to refer to the following list of prime numbers less than 5050 as you work through this section:

2,3,5,7,11,13,17,19,23,29,31,37,41,43,472, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47

Prime factorization using the factor tree method

One way to find the prime factorization of a number is to make a factor tree. We start by writing the number, and then writing it as the product of two factors. We write the factors below the number and connect them to the number with a small line segment — a “branch” of the factor tree.

If a factor is prime, we circle it (like a bud on a tree), and do not factor that “branch” any further. If a factor is not prime, we repeat this process, writing it as the product of two factors and adding new branches to the tree.

We continue until all the branches end with a prime. When the factor tree is complete, the circled primes give us the prime factorization.

For example, let’s find the prime factorization of 3636. We can start with any factor pair, such as 1212 and 33. We write 1212 and 33 below 3636 with branches connecting them.

36123

The factor 33 is prime, so we circle it. The factor 1212 is composite, so we need to find its factors. Let’s use 33 and 44. We write these factors on the tree under the 1212.

3612334

The factor 33 is prime, so we circle it. The factor 44 is composite, and it factors into 222 \cdot 2. We write these factors under the 44. Since 22 is prime, we circle both 2s2\text{s}.

361233422

The prime factorization is the product of the circled primes. We generally write the prime factorization in order from least to greatest:

22332 \cdot 2 \cdot 3 \cdot 3

In cases like this, where some of the prime factors are repeated, we can write the prime factorization in exponential form:

2233=22322 \cdot 2 \cdot 3 \cdot 3 = 2^2 \cdot 3^2

Note that we could have started our factor tree with any factor pair of 3636. We chose 1212 and 33, but the result would have been the same if we had started with 22 and 1818, 44 and 99, or 66 and 66.

Find the prime factorization of a composite number using the tree method.

  1. Find any factor pair of the given number, and use these numbers to create two branches.
  2. If a factor is prime, that branch is complete. Circle the prime.
  3. If a factor is not prime, write it as the product of a factor pair, and continue the process.
  4. Write the composite number as the product of all the circled primes.

Example. Find the prime factorization of 4848 using the factor tree method.

We can start our tree using any factor pair of 4848. Let’s use 22 and 2424. We circle the 22 because it is prime, and so that branch is complete.

48224

Now we will factor 2424. Let’s use 44 and 66.

4822446

Neither factor is prime, so we do not circle either. We factor the 44, using 22 and 22. We factor the 66, using 22 and 33. We circle the 2s2\text{s} and the 33 since they are prime. Now all of the branches end in a prime.

48224462223

We write the product of the circled numbers, then write it in exponential form:

48=22223=24348 = 2 \cdot 2 \cdot 2 \cdot 2 \cdot 3 = 2^4 \cdot 3

Check this on your own by multiplying all the factors together. The result should be 4848.

Find the prime factorization of 80 using the factor tree method. Enter the answer in exponential form, e.g. 2352^3 \cdot 5.

Find the prime factorization of 60 using the factor tree method. Enter the answer in exponential form, e.g. 2352^3 \cdot 5.

Example. Find the prime factorization of 8484 using the factor tree method.

We start with the factor pair 44 and 2121. Neither factor is prime, so we factor them further.

84421

Now the factors are all prime, so we circle them: the 44 factors into 22 and 22, and the 2121 factors into 33 and 77.

844212237

Then we write 8484 as the product of all circled primes:

84=2237=223784 = 2 \cdot 2 \cdot 3 \cdot 7 = 2^2 \cdot 3 \cdot 7

Find the prime factorization of 126 using the factor tree method. Enter the answer in exponential form, e.g. 2232^2 \cdot 3.

Find the prime factorization of 294 using the factor tree method. Enter the answer in exponential form, e.g. 2322 \cdot 3^2.

Prime factorization using the ladder method

The ladder method is another way to find the prime factors of a composite number. It leads to the same result as the factor tree method. Some people prefer the ladder method to the factor tree method, and vice versa.

To begin building the “ladder,” divide the given number by its smallest prime factor. For example, to start the ladder for 3636, we divide 3636 by 22, the smallest prime factor of 3636.

182)36\begin{array}{r} 18 \\ 2\,\overline{\smash{)}\,36} \end{array}

To add a “step” to the ladder, we continue dividing by the same prime until it no longer divides evenly.

92)182)36\begin{array}{r} 9 \\ 2\,\overline{\smash{)}\,18} \\ 2\,\overline{\smash{)}\,36} \end{array}

Then we divide by the next prime; so we divide 99 by 33.

33)92)182)36\begin{array}{r} 3 \\ 3\,\overline{\smash{)}\,9} \\ 2\,\overline{\smash{)}\,18} \\ 2\,\overline{\smash{)}\,36} \end{array}

We continue dividing up the ladder in this way until the quotient is prime. Since the quotient, 33, is prime, we stop here. Do you see why the ladder method is sometimes called stacked division?

The prime factorization is the product of all the primes on the sides and top of the ladder:

36=2233=223236 = 2 \cdot 2 \cdot 3 \cdot 3 = 2^2 \cdot 3^2

Notice that the result is the same as we obtained with the factor tree method.

Find the prime factorization of a composite number using the ladder method.

  1. Divide the number by the smallest prime.
  2. Continue dividing by that prime until it no longer divides evenly.
  3. Divide by the next prime until it no longer divides evenly.
  4. Continue until the quotient is a prime.
  5. Write the composite number as the product of all the primes on the sides and top of the ladder.

Example. Find the prime factorization of 120120 using the ladder method.

Divide the number by the smallest prime, which is 22:

602)120\begin{array}{r} 60 \\ 2\,\overline{\smash{)}\,120} \end{array}

Continue dividing by 22 until it no longer divides evenly:

152)302)602)120\begin{array}{r} 15 \\ 2\,\overline{\smash{)}\,30} \\ 2\,\overline{\smash{)}\,60} \\ 2\,\overline{\smash{)}\,120} \end{array}

Divide by the next prime, 33:

53)152)302)602)120\begin{array}{r} 5 \\ 3\,\overline{\smash{)}\,15} \\ 2\,\overline{\smash{)}\,30} \\ 2\,\overline{\smash{)}\,60} \\ 2\,\overline{\smash{)}\,120} \end{array}

The quotient, 55, is prime, so the ladder is complete. Write the prime factorization of 120120:

120=22235=2335120 = 2 \cdot 2 \cdot 2 \cdot 3 \cdot 5 = 2^3 \cdot 3 \cdot 5

Check this yourself by multiplying the factors. The result should be 120120.

Find the prime factorization of 80 using the ladder method. Enter the answer in exponential form, e.g. 2352^3 \cdot 5.

Find the prime factorization of 60 using the ladder method. Enter the answer in exponential form, e.g. 2352^3 \cdot 5.

Example. Find the prime factorization of 4848 using the ladder method.

Divide the number by the smallest prime, 22:

242)48\begin{array}{r} 24 \\ 2\,\overline{\smash{)}\,48} \end{array}

Continue dividing by 22 until it no longer divides evenly:

32)62)122)242)48\begin{array}{r} 3 \\ 2\,\overline{\smash{)}\,6} \\ 2\,\overline{\smash{)}\,12} \\ 2\,\overline{\smash{)}\,24} \\ 2\,\overline{\smash{)}\,48} \end{array}

The quotient, 33, is prime, so the ladder is complete. Write the prime factorization of 4848:

48=22223=24348 = 2 \cdot 2 \cdot 2 \cdot 2 \cdot 3 = 2^4 \cdot 3

This matches the factor tree result from the earlier example — the method you use doesn’t change the answer.

Find the prime factorization of 126 using the ladder method. Enter the answer in exponential form, e.g. 2232^2 \cdot 3.

Find the prime factorization of 294 using the ladder method. Enter the answer in exponential form, e.g. 2322 \cdot 3^2.

Find the least common multiple (LCM) of two numbers

One of the reasons we look at multiples and primes is to use these techniques to find the least common multiple of two numbers. This will be useful when we add and subtract fractions with different denominators.

Listing multiples method

A common multiple of two numbers is a number that is a multiple of both numbers. Suppose we want to find common multiples of 1010 and 2525. We can list the first several multiples of each number. Then we look for multiples that are common to both lists — these are the common multiples.

10 ⁣: 10,20,30,40,50,60,70,80,90,100,110,10\colon\ 10, 20, 30, 40, \mathbf{50}, 60, 70, 80, 90, \mathbf{100}, 110, \dots

25 ⁣: 25,50,75,100,125,25\colon\ 25, \mathbf{50}, 75, \mathbf{100}, 125, \dots

We see that 5050 and 100100 appear in both lists. They are common multiples of 1010 and 2525. We would find more common multiples if we continued the list of multiples for each.

The smallest number that is a multiple of two numbers is called the least common multiple (LCM). So the least common multiple of 1010 and 2525 is 5050.

Find the least common multiple (LCM) of two numbers by listing multiples.

  1. List the first several multiples of each number.
  2. Look for multiples common to both lists. If there are no common multiples in the lists, write out additional multiples for each number.
  3. Look for the smallest number that is common to both lists.
  4. This number is the LCM.

Example. Find the LCM of 1515 and 2020 by listing multiples.

List the first several multiples of 1515 and of 2020, and identify the first common multiple:

15 ⁣: 15,30,45,60,75,90,105,12015\colon\ 15, 30, 45, \mathbf{60}, 75, 90, 105, 120

20 ⁣: 20,40,60,80,100,120,140,16020\colon\ 20, 40, \mathbf{60}, 80, 100, 120, 140, 160

The smallest number to appear on both lists is 6060, so 6060 is the least common multiple of 1515 and 2020:

LCM(15,20)=60\text{LCM}(15, 20) = 60

Notice that 120120 is on both lists, too. It is a common multiple, but it is not the least common multiple.

Find the LCM of 9 and 12 by listing multiples.

Find the LCM of 18 and 24 by listing multiples.

Prime factors method

Another way to find the least common multiple of two numbers is to use their prime factors. We’ll use this method to find the LCM of 1212 and 1818.

We start by finding the prime factorization of each number:

12=22318=23312 = 2 \cdot 2 \cdot 3 \qquad\qquad 18 = 2 \cdot 3 \cdot 3

Then we write each number as a product of primes, matching primes vertically when possible — one column per prime, with a gap where a number is missing that prime. Now we bring down the primes in each column. The LCM is the product of these factors.

22223333
12=12 =222233
18=18 =223333
LCM=\text{LCM} =22223333
LCM(12,18)=2233=36\text{LCM}(12, 18) = 2 \cdot 2 \cdot 3 \cdot 3 = 36

Notice that the prime factors of 1212 and the prime factors of 1818 are included in the LCM. By matching up the common primes, each common prime factor is used only once. This ensures that 3636 is the least common multiple.

Find the LCM using the prime factors method.

  1. Find the prime factorization of each number.
  2. Write each number as a product of primes, matching primes vertically when possible.
  3. Bring down the primes in each column.
  4. Multiply the factors to get the LCM.

Example. Find the LCM of 1515 and 1818 using the prime factors method.

Write each number as a product of primes, matching primes vertically when possible, then bring down the primes in each column:

22333355
15=15 =3355
18=18 =223333
LCM=\text{LCM} =22333355

Multiply the factors to get the LCM:

LCM(15,18)=2335=90\text{LCM}(15, 18) = 2 \cdot 3 \cdot 3 \cdot 5 = 90

The LCM of 1515 and 1818 is 9090.

Find the LCM of 15 and 20 using the prime factors method.

Find the LCM of 15 and 35 using the prime factors method.

Example. Find the LCM of 5050 and 100100 using the prime factors method.

Write the prime factorization of each number, matching primes vertically when possible, then bring down the primes in each column:

22225555
50=50 =225555
100=100 =22225555
LCM=\text{LCM} =22225555

Multiply the factors to get the LCM:

LCM(50,100)=2255=100\text{LCM}(50, 100) = 2 \cdot 2 \cdot 5 \cdot 5 = 100

The LCM of 5050 and 100100 is 100100.

Find the LCM of 55 and 88 using the prime factors method.

Find the LCM of 60 and 72 using the prime factors method.

Key terms

prime factorization — the product of prime numbers that equals a given number. factor tree — a diagram that finds a prime factorization by repeatedly factoring composite branches until every branch ends in a prime. ladder method — a way to find a prime factorization by repeatedly dividing by the smallest prime that fits (also called stacked division). least common multiple (LCM) — the smallest number that is a multiple of two given numbers.


This section is adapted from Prealgebra 2e, Section 2.5: Prime Factorization and the Least Common Multiple by Lynn Marecek, MaryAnne Anthony-Smith, and Andrea Honeycutt Mathis, © OpenStax, licensed under CC BY-NC-SA 4.0. Access the original for free at openstax.org. Changes: recreated the factor-tree diagrams as accessible inline graphics, the ladder (stacked division) diagrams as typeset math, and the prime-factor column alignments as tables; omitted the Be Prepared quiz, Manipulative Mathematics callout, media links, and end-of-section exercises; and converted the practice problems (“Try Its”) into interactive exercises with instant feedback.