The rule
A prime is a whole number greater than 1 that is divisible only by 1 and itself: 2, 3, 5, 7, 11, 13 and so on, see the table of primes. Every whole number greater than 1 is either a prime or a product of primes, and the product is the same however you arrive at it, apart from the order. That is the fundamental theorem of arithmetic.
To factorise a number into primes is to find that product:
- Divide the number by the smallest prime that goes exactly, starting with 2.
- Keep dividing the quotient by the same prime for as long as it goes.
- Move on to the next prime: 3, 5, 7, …
- Stop when the quotient is 1. The primes you divided by are the factors.
You only need to try primes up to the square root of what is left. If none of them goes, what is left is itself a prime.
Worked examples
360. 360 / 2 = 180, 180 / 2 = 90, 90 / 2 = 45. 45 cannot be divided by 2, but 45 / 3 = 15 and 15 / 3 = 5, and 5 is a prime. So
360 = 2 · 2 · 2 · 3 · 3 · 5 = 2³ · 3² · 5
84. 84 / 2 = 42, 42 / 2 = 21, 21 / 3 = 7. So 84 = 2² · 3 · 7.
1001. Neither 2, 3 nor 5 goes. 1001 / 7 = 143, and 143 / 11 = 13. So 1001 = 7 · 11 · 13.
97. The square root of 97 is just under 10, so it is enough to try 2, 3, 5 and 7. None of them goes, so 97 is a prime.
A factor tree is the same method drawn: the number at the top, two branches for every split, and the primes as leaves. It does not matter whether you start with 360 = 36 · 10 or 360 = 8 · 45; the leaves come out the same.
The prime factorization calculator does the same divisions for any number and shows every step.
What the factors are for
- Greatest common divisor: the primes the numbers share, to the lowest power. See the greatest common divisor.
- Least common multiple: every prime that appears, to the highest power. See the least common multiple, which gives the lowest common denominator when you add fractions.
- Simplifying roots: √360 = √(2² · 3² · 2 · 5) = 2 · 3 · √10 = 6√10.
Common mistakes
- Counting 1 as a prime. 1 is not a prime, and if it were, the factorisation would no longer be unique: 6 = 2 · 3 = 1 · 2 · 3.
- Stopping with a composite number left. 360 = 2³ · 45 is not finished; 45 = 3² · 5.
- Dividing by each prime only once. 360 contains 2 three times. Divide by 2 until it no longer goes.
Common questions
Why is the factorisation always the same?
That is the fundamental theorem of arithmetic. It rests on the fact that a prime dividing a product
must divide one of the factors, so two different sets of primes can never give the same product.
How do you know when to stop trying?
When the prime squared is larger than what is left. If what is left has a factor, it also has one no
larger than its square root.
Is 2 the only even prime?
Yes. Every other even number is divisible by 2 and so has a divisor besides 1 and itself.