MathIt Blog

Prime numbers explained: how to spot them and why they matter

By Laura Bennett, MathIt · Published · Updated · 11 min read
Three groups of counters on a table: twelve arranged in a rectangle, eight in a rectangle and nine in a square, while seven counters fit only in one straight line.

What are prime numbers, and how do you explain them to a child?

A prime number is a whole number greater than 1 that has exactly two factors: 1 and itself. The prime numbers below 50 are 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43 and 47. Every other whole number above 1 is composite, because it has a third factor. The number 1 is neither prime nor composite.

Key takeaways

  • A prime number is a whole number greater than 1 with exactly two factors, 1 and itself.
  • The number 1 is neither prime nor composite, and 2 is the only even prime number.
  • The prime numbers below 50 are 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43 and 47.
  • Testing divisors only up to the square root of a number is enough to prove that the number is prime.
  • The numbers 9, 21, 51, 57 and 91 are composite even though they look prime: 9 = 3 × 3, 21 = 3 × 7, 51 = 3 × 17, 57 = 3 × 19 and 91 = 7 × 13.

Your child brings home a worksheet that asks which numbers are prime, circles 9 and 51, and leaves 2 alone. Prime numbers look obvious until a number like 91 turns up, and then the guessing starts. A prime number has one rule behind it and a short test that settles any number under 100 in about a minute.

What is a prime number?

A prime number is a whole number greater than 1 whose only factors are 1 and itself. A composite number has at least one more factor, which lets it be split into equal groups in more than one way.

Counters make that visible: seven form one row of 7 and nothing else, while twelve form 1 × 12, 2 × 6 and 3 × 4.

The prime numbers below 50 are 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43 and 47. Fifteen numbers, worth knowing by sight the way the times tables are.

The number 2 is the only even prime number. Every other even number has 2 as a factor on top of 1 and itself, which gives it three factors and makes it composite.

Why 1 is not a prime number

The number 1 is neither prime nor composite, because it has only one factor. The definition asks for exactly two different factors, and 1 supplies one.

Mathematicians exclude 1 on purpose. Every whole number above 1 breaks into a product of prime numbers in exactly one way, a result called the fundamental theorem of arithmetic. If 1 counted as prime, 12 could be written as 2 × 2 × 3, or 1 × 2 × 2 × 3, or 1 × 1 × 2 × 2 × 3, and "exactly one way" would mean nothing.

That is the answer to give a child who asks: 1 is left out so that prime factorization stays unique.

A grid of the numbers 1 to 50 with every prime number highlighted and every other number crossed out.
A grid of the numbers 1 to 50 with every prime number highlighted and every other number crossed out.

Why prime numbers matter in school math and beyond

Prime numbers hold up the whole factor strand of the elementary curriculum. Common Core standard 4.OA.B.4 asks fourth graders to "find all factor pairs for a whole number in the range 1–100" and to "determine whether a given whole number in the range 1–100 is prime or composite".

England places the same content in Year 5. The national curriculum for mathematics in England asks pupils to "establish whether a number up to 100 is prime and recall prime numbers up to 19".

Outside school, prime numbers are the reason an online payment stays private. Public-key encryption multiplies two very large primes and publishes the product, and the security rests on how hard that product is to pull apart.

The link to factors and fractions

Prime factorization is the tool that reduces a fraction to lowest terms, which is why it arrives before fraction work. To simplify 84/126, break both numbers into primes: 84 = 2 × 2 × 3 × 7 and 126 = 2 × 3 × 3 × 7. The shared factors are 2 × 3 × 7 = 42, so 84 ÷ 42 = 2, 126 ÷ 42 = 3, and 84/126 = 2/3.

Common Core standard 6.NS.B.4 makes that job explicit in grade 6, where students "find the greatest common factor of two whole numbers less than or equal to 100 and the least common multiple of two whole numbers less than or equal to 12". The multiples game drills the same relationship from the other direction, by asking which numbers a given factor reaches.

Play free in your browserMultiples RushGrade 3–5

How to test whether a number is prime, step by step

A number under 100 is prime when no smaller number among 2, 3, 5 and 7 divides it. Those four checks cover everything up to 120, because the next prime, 11, first bites at 11 × 11 = 121.

  1. Settle 0, 1 and 2 first. Zero and 1 are neither prime nor composite, 2 is prime, and from 3 onward every even number is composite.
  2. Divide by 2. According to the nrich divisibility tests, "a number is divisible by 2 if its last digit is even", so anything ending in 0, 2, 4, 6 or 8 is out.
  3. Divide by 3. Add the digits: when the sum is a multiple of 3, so is the number. For 51 the digits give 6, and 51 = 3 × 17; for 57 they give 12, and 57 = 3 × 19.
  4. Divide by 5. A number is divisible by 5 when its last digit is 0 or 5, which takes one glance.
  5. Divide by 7, and by 11 above 120. Neither has a one-glance rule, so do the division and look for a whole answer. This step catches 91, because 91 ÷ 7 = 13.
  6. Stop at the square root. Once the divisor being tested, multiplied by itself, passes the number, no divisor is left to find and the number is prime.
Play free in your browserFactor PairsGrade 3–5

Where to stop: the square root

The square-root rule keeps the test short: to prove that a number is prime, you need divisors only up to its square root. If a number has a factor larger than its square root, the matching factor in that pair is smaller, so you would have met it already.

Take 97: since 10 × 10 = 100 is past it, the checks stop below 10, which leaves 2, 3, 5 and 7. None of them divides 97, so 97 is prime. The square numbers game builds the sense of where each square sits.

Three ways to find prime numbers: trial division, the sieve of Eratosthenes and factor pairs

Three methods find prime numbers: trial division decides one number, the sieve produces a whole list, and factor pairs shows why a composite number is composite.

MethodHow it worksBest forSpeed by handMain risk
Trial divisionDivide by 2, 3, 5, 7 and 11 up to the square rootDeciding one specific numberUnder a minute per numberStopping before the square root
Sieve of EratosthenesList 1 to 100, then cross out every multiple of 2, 3, 5 and 7Producing every prime to 100 at onceAbout 10 minutes for the full chartCrossing out the prime itself
Factor pairsWrite every pair that multiplies to the number: 1 × 24, 2 × 12, 3 × 8, 4 × 6Showing a child why a number is compositeTwo to three minutes per numberMissing a pair in the middle

Which method to pick

The sieve of Eratosthenes wins when a child needs every prime to 100, because one pass produces all 25 of them. Write 1 to 100 in a ten-by-ten grid, cross out 1, then circle 2 and cross out every other multiple of 2. Circle 3 and cross out its multiples, then do the same for 5 and for 7.

Crossing out multiples of 2, 3, 5 and 7 is enough for a hundred chart, because the next prime, 11, first reaches an uncrossed number at 11 × 11 = 121. Whatever is left standing is prime.

Factor pairs suit the child who has the definition but no feel for it. The factor pairs game covers that method, where seeing 4 × 6 next to 1 × 24 does more than being told that 24 is composite.

Prime factorization, worked

Prime factorization writes a number as a product of prime numbers, and every whole number above 1 has exactly one such product. For 84 that product is 2 × 2 × 3 × 7, whichever route the work takes.

The first route divides by the smallest prime that fits, over and over: 84 ÷ 2 = 42, 42 ÷ 2 = 21, 21 ÷ 3 = 7, and 7 is prime. Reading off the divisors gives 2 × 2 × 3 × 7, often written 2² × 3 × 7.

A bigger number behaves the same way: 360 ÷ 2 = 180, 180 ÷ 2 = 90, 90 ÷ 2 = 45, 45 ÷ 3 = 15, 15 ÷ 3 = 5, so 360 = 2³ × 3² × 5.

Factor trees

A factor tree splits a number into any two factors, then splits those, until every branch ends on a prime number. Starting 84 as 4 × 21 gives 4 = 2 × 2 and 21 = 3 × 7, so the branch ends read 2, 2, 3, 7.

Starting the same 84 as 12 × 7 gives 12 = 3 × 4 and 4 = 2 × 2, and the branch ends read 2, 2, 3, 7 again. The shape of the tree changes and the primes do not, which is the fundamental theorem of arithmetic drawn on a page. Ask your child to build both trees; the moment the two lists match is the moment the idea lands.

A factor tree that breaks 60 into 6 and 10, and then into the prime factors 2, 3, 2 and 5.
A factor tree that breaks 60 into 6 and 10, and then into the prime factors 2, 3, 2 and 5.

How to check your child has it

Five signals show whether prime numbers have landed, and each one takes under a minute to check.

  • The definition, said aloud: Ask what a prime number is, with no example. "Exactly two factors, 1 and itself" is the answer; "a number you cannot divide" is not.
  • The exception named: Ask whether an even number can be prime. The answer is 2, and only 2.
  • The primes to 50, in 30 seconds: Ask for them in order. Fifteen numbers from 2 to 47, with no 1 and no 9.
  • A hard number, decided with a reason: Give 91 and ask for the verdict plus the working. A child who answers "7 × 13, so composite" has the method; a child who answers "prime" is pattern-matching.
  • A factorization that checks out: Ask for the prime factorization of 60, then for the product back. The answer 2 × 2 × 3 × 5 = 60 shows both directions of the skill.

A five-minute test

A five-minute check beats a long quiz. The What Works Clearinghouse practice guide on assisting students struggling with mathematics recommends that teachers "regularly include timed activities as one way to build fluency in mathematics".

The same guide asks teachers to "teach clear and concise mathematical language", which here means four words used precisely: prime, composite, factor and multiple. A child who swaps factor and multiple fails on vocabulary, not on reasoning.

The division facts game supplies the recall the procedure leans on, since every divisibility check is a division question.

Common prime number mistakes and edge cases

Six mistakes cause most of the wrong answers on a prime number worksheet, and each has a one-line fix.

  • 1 marked as prime: The number 1 has a single factor, so it fails the "exactly two" rule and is neither prime nor composite.
  • 2 marked as composite: The number 2 is the only even prime, and a child who has learned "even means composite" needs that exception written at the top of the page.
  • 0 tested at all: Zero is neither prime nor composite, because every whole number above 0 divides it.
  • 9 and 21 called prime: Odd does not mean prime, since 9 = 3 × 3 and 21 = 3 × 7.
  • 51 and 57 called prime: Both fall to the digit-sum check for 3, since 51 = 3 × 17 and 57 = 3 × 19.
  • 91 called prime: The number 91 clears 2, 3 and 5, so a test that stops at 5 declares it prime. Dividing by 7 gives 13, and 91 = 7 × 13.

Negative numbers and fractions sit outside the question, because prime and composite are defined for whole numbers greater than 1.

Your prime numbers checklist

  • Say the definition: exactly two factors, 1 and itself.
  • Know 2: the only even prime, and the exception that halves every list.
  • Run the checks in order: 2, 3, 5, 7, then 11 above 120.
  • Stop at the square root: when the divisor times itself passes the number, the number is prime.
  • Check the answer: multiply the prime factors back and compare with the number you started from.

Practice fixes the last two lines faster than explanation does. The printable multiplication worksheet for 4th graders comes with an answer key, and the guide on how to learn the times tables fast covers the recall behind every divisibility check. The overview of what math each grade should know shows where prime numbers sit in the curriculum.

MathIt's free iOS and Android app has adaptive difficulty, so factor practice gets harder only after the easier numbers come out right, and 22 of its roughly 90 game types play free in a browser with no sign-up.

Practise it in the MathIt app

About 90 math games with adaptive difficulty, daily practice and 2–5 player battles — free on iOS and Android.

Download on the App StoreGet it on Google Play

Frequently asked questions

What is a prime number?

A prime number is a whole number greater than 1 that has exactly two factors, 1 and itself. The number 7 is prime because only 1 and 7 divide it evenly. The number 8 is composite because 1, 2, 4 and 8 all divide it. Every whole number greater than 1 is either prime or composite.

Why is 1 not a prime number?

The number 1 is not a prime number because it has only one factor, itself, and the definition asks for exactly two different factors. Mathematicians exclude 1 so that every whole number above 1 has exactly one prime factorization. If 1 counted as prime, 12 could be written as 2 × 2 × 3 or as 1 × 2 × 2 × 3, and that uniqueness would be gone.

What are the prime numbers up to 50?

The prime numbers up to 50 are 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43 and 47, fifteen numbers in all. The list leaves out 1, which is neither prime nor composite, and every even number except 2. Between 50 and 100 there are ten more, ending at 97.

Is 91 a prime number?

The number 91 is not a prime number, because 91 = 7 × 13. It passes the quick checks for 2, 3 and 5, which is why it slips past a test that stops too early. Dividing by 7 catches it, and any honest test of a two-digit number has to reach 7.

How do you check whether a number is prime?

You check whether a number is prime by dividing it by 2, 3, 5, 7 and 11 in turn, and stopping once the divisor multiplied by itself passes the number. For 97 the stop point is 10, because 10 × 10 = 100, so only 2, 3, 5 and 7 need testing. When none of them divides evenly, the number is prime.

Similar topics

All articles →