Skip to content
mathismaths.com

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 11 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 11 that can only be divided exactly by 11 and itself. The first few are:

2,3,5,7,11,13,17,19,23,29,31,…2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, \ldots

A whole number greater than 11 that is not prime is called composite. It can be split into smaller factors: 12=3×412 = 3 \times 4, for instance.

Two facts often surprise people:

  • 11 is not prime. It has only one factor. Excluding it keeps prime factorisations unique.
  • 22 is the only even prime. Every other even number divides by 22.
Number grid from 1 to 50Number grid from 1 to 50, 10 numbers in each row. Shaded: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43 and 47.1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
The primes up to 50, shaded. Apart from 2 and 5, none ends in an even digit or 5, and 1 is left unshaded because it is not prime.

Atoms of arithmetic

Every whole number greater than 11 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.

Factor tree for 6060 split into factors until only primes are left: 2 × 2 × 3 × 5.2235153060
A factor tree for 60. It is split until only primes are left: 2 × 2 × 3 × 5, which is 2² × 3 × 5.

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 n=a×bn = a \times b and both aa and bb were bigger than n\sqrt{n}, their product would be bigger than nn, which is impossible. So at least one factor must be small.

Worked examples

Example 1: Is 221 prime?

  1. 221≈14.9\sqrt{221} \approx 14.9, so test the primes 2,3,5,7,11,132, 3, 5, 7, 11, 13.
  2. 221221 is odd (not divisible by 22), its digits sum to 55 (not divisible by 33) and it doesn’t end in 00 or 55.
  3. 221÷7=31.57…221 \div 7 = 31.57\ldots and 221÷11=20.09…221 \div 11 = 20.09\ldots, so neither works.
  4. 221÷13=17221 \div 13 = 17 exactly.

Answer: No. 221=13×17221 = 13 \times 17, so it is composite.

Example 2: Prime factorisation with a factor tree

Write 360360 as a product of prime factors.

  1. Split 360360 into any two factors: 360=36×10360 = 36 \times 10.
  2. Keep splitting until every branch ends in a prime: 36=4×9=2×2×3×336 = 4 \times 9 = 2 \times 2 \times 3 \times 3 and 10=2×510 = 2 \times 5.
  3. Collect the primes: 2×2×2×3×3×52 \times 2 \times 2 \times 3 \times 3 \times 5.
  4. Write with powers: 23×32×52^3 \times 3^2 \times 5.

Answer: 360=23×32×5360 = 2^3 \times 3^2 \times 5

Example 3: Using prime factors to simplify

Prime factorisations make simplifying fractions easy. 84360=22×3×723×32×5\frac{84}{360} = \frac{2^2 \times 3 \times 7}{2^3 \times 3^2 \times 5}. Cancel the shared 22×32^2 \times 3 to get 72×3×5=730\frac{7}{2 \times 3 \times 5} = \frac{7}{30}.

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 1111 and 1313 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.

Question 1 of 7

Which of these is a prime number?

Choose one answer

Question 2 of 7

How many prime numbers are there between 11 and 2020?

Question 3 of 7

Which is the prime factorisation of 1212?

Choose one answer

Question 4 of 7

Is 9191 a prime number?

Choose one answer

Question 5 of 7

What is the only even prime number?

Question 6 of 7

What is the smallest prime number greater than 3030?

Question 7 of 7

How many prime factors, counting repeats, does 6060 have?