Prime Factorization
Learning goals
- Build a factor tree until every leaf is prime
- Divide repeatedly by the smallest prime that fits
- Write repeated primes in prime-power form, so
- State the Fundamental Theorem of Arithmetic as uniqueness apart from order
- Show why the starting split never changes the final primes
- Use the divisibility rules to peel off , and fast
What a prime factorization is
A prime factorization of a whole number greater than is a way of writing it as a product of prime numbers only. For example,
Every factor on the right is prime. A number like that is composite breaks into several primes. A number that is already prime, like , is its own prime factorization, a product of a single prime. The point is to keep splitting until you cannot split any further, which happens exactly when every remaining factor is prime. The splitting stops there because a prime is the kind of number that has no smaller factors to break off.
This is different from just listing factors. The factors of are , a mixed bag of primes and composites. The prime factorization picks out only the prime building blocks and shows how many of each you multiply together to rebuild the number. It is the recipe, not the inventory.
Every number breaks down into primes
Before learning a method, settle the basic question: can every composite number really be written this way? The answer is yes.
Watch come apart. Start anywhere you like, say . Neither piece is prime, so split each one again: and . Every piece is now prime, and .
Each step traded a number for pieces smaller than it, and no piece is allowed below . There is only so much room between and , so the splitting runs out of places to go.
Why every whole number greater than is a product of primes#
Follow through the argument first. It is composite, so it splits, say , and both halves are smaller than . The is prime, so that branch is finished. The is composite, so put the same question to it: , and the splits once more into . Every piece is prime now, and . Each split lowered the numbers in play, and they can never sink below , which is why the splitting ran out of moves.
Now the general version, with a letter in place of the .
Take any whole number greater than . Either it is prime or it is composite.
If is prime, you are already done: by itself is a product of primes.
If is composite, it has a factor other than and itself. So you can write with both and greater than , which makes both smaller than . Ask the same question of each one: leave it alone if it is prime, split it again if it is composite, and keep repeating.
This has to end, because every split replaces a number with strictly smaller factors. There are only finitely many whole numbers between and to descend through. It ends exactly when every factor is prime, since a prime is the only number that refuses to split. That leaves written as a product of primes.
Whatever number you start with, the splitting ends in a pile of primes that multiply back to it. The question left is whether two people who split the same number in two different ways could end up with two different piles.
The factor-tree method
The most common way to carry out the splitting is a factor tree (a diagram that branches a number down into its primes). Write the number at the top. Find any two factors whose product is that number (not and the number itself, but a genuine split). Then draw a branch down to each. Whenever a number is composite, split it again. Whenever a number is prime, stop that branch and circle it. The factorization is the collection of primes at the ends of the branches, the leaves of the tree.
Take . One natural split is . Neither nor is prime, so each splits again: and . Now every leaf is prime, so we are finished.
Reading the leaves from left to right gives
It does not matter which factor you write first or which branch you split first. As long as you keep going until every leaf is prime, the leaves you collect are the prime factorization.
Repeated multiplication in exponent form
When the same prime shows up more than once, writing it out in full gets clumsy. The factorization of has two s and two s, and a larger number can have a prime repeated many times. There is a compact shorthand: can be written , and can be written . The small raised number, the exponent, just counts how many copies of the prime are multiplied together. It is nothing more than shorthand for repeated multiplication:
Using this, the factorization of becomes
This compact form is called prime-power form: each distinct prime written once, with an exponent telling how many times it appears. When you write a factorization, group the equal primes together and collect them into powers, and by convention list the primes from smallest to largest. You can always expand the shorthand back into a plain product whenever you want to see every factor spelled out.
Check your understanding
Which of these is the prime factorization of in prime-power form?
Split until every factor is prime. One path is .
The other choices stop too early: , , and are all still composite, so those are not prime factorizations.
Repeated division by primes
A factor tree can branch in many shapes, which is handy but a little untidy for bookkeeping. A second method keeps everything in a single column: repeated division by primes. Divide the number by the smallest prime that goes into it, then divide the quotient by the smallest prime that goes into it. Keep going until the quotient reaches . The divisors you used, in order, are the prime factorization.
Run this on . The smallest prime dividing it is , and you keep dividing by as long as the result stays even:
Now is odd, so is finished. The smallest prime that divides is :
Finally is prime and divides itself: . We have reached , so we stop. The divisors, in the order we used them, were , so
The divisibility rules from earlier in this chapter make each step quick. They tell you at a glance whether , , or divides the current number, so you rarely have to guess.
Worked example 1 Find the prime factorization of
Use repeated division, always dividing by the smallest prime that fits.
The number is even, so start with :
Now is odd, so is done. Its digit sum is , a multiple of , so divide by :
The quotient is prime, so the last step is . Collecting the divisors and grouping the repeats,
A prime that appears only once, like the and the here, is written with no exponent (an exponent of is understood).
The Fundamental Theorem of Arithmetic
Here is the result that makes prime factorization so powerful. We saw that could be started as . But you could just as well start it as , or as . Do those other starting splits change the final answer?
Both trees end in the same four primes: two s and two s. The order of the leaves changes, but the collection does not. This is not a lucky coincidence of . It is a law that holds for every whole number, important enough to have a name.
Apart from the order in which you write the factors, every whole number greater than has exactly one prime factorization. That statement is the Fundamental Theorem of Arithmetic. There is one and only one multiset of primes whose product is your number. That is why the answer never depends on how you start the tree. That uniqueness is also why we can speak of the prime factorization of a number rather than a prime factorization.
Why is the answer always the same? It comes down to one thing primes do. If a prime divides a product, it divides one of the two numbers being multiplied. Take and : the shows up in the . A prime has no smaller pieces, so it cannot put half of itself in each number. It goes into one or the other, whole.
That is what ties two prime lists together. Every prime in one list has to match a prime in the other, so neither list can hold anything the other is missing.
So a prime factorization is a fact about the number, not a choice you make.
Check your understanding
Maria splits as , and Jon splits it as . Whose final list of prime factors is correct?
Finish each split down to primes. Maria: . Jon: .
By the Fundamental Theorem of Arithmetic the starting split cannot change the answer, so both reach the same factorization.
Larger numbers, same method
Nothing changes for bigger numbers; you just take more steps. The trick is to peel off the small primes first using the divisibility rules, which shrinks the number fast and keeps the arithmetic light.
Worked example 2 Find the prime factorization of
Divide by the smallest prime each time. The number ends in , so it is divisible by (and by ); take the s first:
Now is odd, so is finished. It is not even, but its digit sum is a multiple of , so divide by :
The digit sum of is , not a multiple of , so is finished. Next is , and :
The divisors used were , so
As a check, , the number we started with.
Worked example 3 Find the prime factorization of
This one has no small even or five factor to give it away. So lean on the divisibility rules to rule out the easy primes, then test the next ones in turn.
The number is odd, so is out. Its digit sum is , not a multiple of , so is out. It does not end in or , so is out. The next prime is :
So works, and now factor the quotient . It is :
Both and are prime, so the factorization is
When the small primes all fail, work upward through , and remember the stopping rule from the last lesson. The rule says that if no prime up to the point where its square passes the number divides it, what remains is itself prime.
Check your understanding
What is the prime factorization of ?
Divide by the smallest prime each time: , then , then , then .
The choice is missing a , uses composite factors, and has one too many.