Prime numbers first
A prime number is a whole number with exactly two factors: and itself. The first few are
A whole number bigger than that isn't prime is composite: it can be split into smaller factors, like . The number is neither prime nor composite.
Prime factorisation writes a composite number as a product of primes only. Because primes can't be split any further, they are the building blocks of every whole number.
Method 1: a factor tree
Split the number into any two factors. Circle the ones that are prime and keep splitting the rest until every branch ends in a prime.
Worked example
Write as a product of prime factors.
Split into two factors:
Neither nor is prime, so split both:
Every branch now ends in a prime: , , and .
Group the repeated s with an index:
Check by multiplying back: ✓. Write the primes from smallest to largest; it’s the order most teachers expect.
Method 2: repeated division (the ladder)
Divide by the smallest prime that goes in exactly. Keep dividing the answer until you reach . This is the tidier method for bigger numbers, because you never have to guess a starting pair.
Worked example
Find the prime factorisation of .
is odd, so try (its digits add to ):
isn't divisible by , so try :
The divisors were :
Quick divisibility tests save time: a number is divisible by if it’s even, by if its digits add to a multiple of , and by if it ends in or .
Prime factorisation calculator (with working)
Type any whole number up to one billion. You’ll see each division, the answer in index notation, and whether the number is prime or a perfect square.
Why every factor tree gives the same answer
Worked example: two different trees for 120
Tree A starts with :
Tree B starts with :
Sort both lists and they match:
This always happens. Every whole number greater than has exactly one set of prime factors (mathematicians call this the Fundamental Theorem of Arithmetic). So if two students get different answers, at least one of them has a number in their list that isn’t prime.
How to check if a number is prime
You only need to test primes up to the square root of the number. If a number has a factor bigger than its square root, the matching factor is smaller than the square root, and you would already have found it.
Worked example
Are and prime?
221: , so test . It’s odd, its digits add to , it doesn’t end in or , and and don’t go in. Then
So is not prime.
199: , so test the same primes, to . None of them divides exactly, so is prime.
Square roots and perfect squares
A number is a perfect square when every power in its prime factorisation is even. To find the square root, halve each power.
Worked example: a square root without a calculator
Find .
All the powers are even, so halve them:
Worked example: making a perfect square
What is the smallest whole number you can multiply by to get a perfect square?
The powers of and are odd. One more and one more make them even, so multiply by :
The answer is .
Prime factors are also the quickest way to find the highest common factor and lowest common multiple of two numbers, and to simplify surds like in Year 9.
Common mistakes
- Stopping at a number that isn’t prime. isn’t finished, because . Check every number in your answer is on the prime list.
- Including 1. isn’t prime, so is wrong. Leave it out.
- Treating 9, 15, 21, 27 or 51 as prime. They’re odd, but they aren’t prime: . Use the digit-sum test for .
- Writing the index wrongly. is , not or .
- Adding instead of multiplying. The factors multiply to make the number. is , not .
- Not checking. Multiply your primes back together at the end. If you don’t get the starting number, something went wrong.
Practice questions with answers
Try each one before you open the answer. Use whichever method you like; the primes at the end will be the same.
Write as a product of prime factors in index notation.
Show the answer
Write as a product of prime factors in index notation.
Show the answer
, , , , so
Write as a product of prime factors in index notation.
Show the answer
Write as a product of prime factors.
Show the answer
It isn't divisible by , or . , , so
Write as a product of prime factors in index notation.
Show the answer
, , , , , , so
Is a prime number? Explain.
Show the answer
No. , so test primes up to . , so .
Use prime factors to find .
Show the answer
. Halve each power:
What is the smallest whole number you can multiply by to make a perfect square?
Show the answer
. Only the power of is odd, so multiply by :
The Tuterly Method
Snap. Fix. Ace.
Left a 21 in your answer or counted 1 as prime? Don't just fix it. Study the mistake.
Snap.
Snap every question you get wrong, from tests, homework and class work.
Fix.
See the worked solution, then fresh questions on that skill. Even just one each day.
Ace.
A full practice test, with questions you've got wrong mixed in.
Prime factors by year level
Following the Victorian Curriculum 2.0. Schools sequence topics differently, so check your course.
Year 7
Powers and prime factors
Factor trees, repeated division and writing numbers as products of prime powers in index notation.
Year 8
Exponents
Index laws with numbers, where prime factorisations make simplifying powers quicker.
Year 9
Surds and real numbers
Simplifying surds by pulling out square factors, found from the prime factorisation.