Numbers · Lesson 16 of 36
Prime Numbers
A prime has exactly two factors: 1 and itself. Every other whole number above 1 is built by multiplying primes.
What you will learn
- Say what a prime number is and why is not prime.
- Test whether a number is prime.
- Write a number as a product of primes using a factor tree.
Before you start: you should know factors and multiples. See Factors and Multiples.
The idea
A prime number is a whole number greater than that can only be divided exactly by and itself. The first few are:
A whole number greater than that is not prime is called composite. It can be split into smaller factors: , for instance.
Two facts often surprise people:
- is not prime. It has only one factor. Excluding it keeps prime factorisations unique.
- is the only even prime. Every other even number divides by .
Atoms of arithmetic
Every whole number greater than can be written as a product of primes in exactly one way (ignoring the order). This is the Fundamental Theorem of Arithmetic. Primes are to numbers what atoms are to molecules.
How to test whether a number is prime
You only need to try dividing by primes up to the square root of the number. If and both and were bigger than , their product would be bigger than , which is impossible. So at least one factor must be small.
Worked examples
Example 1: Is 221 prime?
- , so test the primes .
- is odd (not divisible by ), its digits sum to (not divisible by ) and it doesn’t end in or .
- and , so neither works.
- exactly.
Answer: No. , so it is composite.
Example 2: Prime factorisation with a factor tree
Write as a product of prime factors.
- Split into any two factors: .
- Keep splitting until every branch ends in a prime: and .
- Collect the primes: .
- Write with powers: .
Answer:
Example 3: Using prime factors to simplify
Prime factorisations make simplifying fractions easy. . Cancel the shared to get .
Why it matters
Primes protect your online banking. Encryption schemes such as RSA rely on the fact that multiplying two huge primes is quick, but working backwards to find them from their product is extraordinarily slow, even for powerful computers.
Primes also appear in nature: some cicadas emerge every 13 or 17 years, prime cycles that may help them avoid predators with shorter, regular life cycles. And mathematicians are still hunting for patterns: whether there are infinitely many “twin primes” such as and remains unsolved.
Practice
Your turn. Type or choose an answer, then press Check. Getting one wrong is fine, that is what practice is for. You can try as many times as you like.