Prime Numbers and Prime Factorisation

How to tell whether a whole number is prime, and how to write a number as a product of its prime factors in index notation.

Before you start: factors and multiples

A factor of a whole number is a whole number that divides it exactly, leaving no remainder. A multiple of a number is the result of multiplying it by 1, 2, 3, ...

Example: the factors of 36. 36=1×36=2×18=3×12=4×9=6×636 = 1 \times 36 = 2 \times 18 = 3 \times 12 = 4 \times 9 = 6 \times 6, so the factors of 36 are 1, 2, 3, 4, 6, 9, 12, 18 and 36, and 36 is a multiple of each of them.

Prime Numbers and Composite Numbers

Count the factors of each whole number from 1 to 10.

NumberFactorsHow many factors
111
21, 22
31, 32
41, 2, 43
51, 52
61, 2, 3, 64
71, 72
81, 2, 4, 84
91, 3, 93
101, 2, 5, 104

The numbers 2, 3, 5 and 7 have exactly two factors; 4, 6, 8, 9 and 10 have more than two; 1 has only one.

Prime number

A prime number is a whole number greater than 1 that has exactly two different factors, 1 and itself.

The prime numbers less than 50: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47.

Composite number

A composite number is a whole number greater than 1 that has more than two different factors.

Examples: 4, 6, 8, 9, 10, 12, 14, 15.

0 and 1 are neither prime nor composite. The number 1 has only one factor, itself.

2 is the only even prime number. Every even number greater than 2 has the factor 2, as well as 1 and itself.

Testing Whether a Number Is Prime

A whole number greater than 1 is composite if it has a factor other than 1 and itself. Only prime numbers need to be tried as divisors (the numbers we divide by): if 3 does not divide a number exactly, then 9=3×39 = 3 \times 3 cannot divide it either.

We can also stop early. Factors come in pairs, as in the recap, and the smaller factor of a pair, multiplied by itself, is never more than the number. So a composite number always has a factor other than 1 that, multiplied by itself, is not more than the number. Once prime × prime is greater than the number, no such factor is left to find.

The test for a prime number

To test a whole number greater than 1, divide it by the prime numbers 2, 3, 5, 7, 11, ... in turn, for as long as prime × prime is not greater than the number.

  • If one of them divides it exactly, the number is composite.
  • If none of them does, the number is prime.

Divisibility tests for 2, 3 and 5

A whole number is divisible byexactly when
2its last digit is 0, 2, 4, 6 or 8
3the sum of its digits is divisible by 3
5its last digit is 0 or 5

For 7, 11, 13 and larger primes, divide and look at the remainder.

Example 1: A prime number

Is 61 prime or composite?

  • Try 2: the last digit, 1, is odd, so 61 is not divisible by 2.
  • Try 3: 6+1=76 + 1 = 7 is not divisible by 3, so 61 is not divisible by 3.
  • Try 5: the last digit is not 0 or 5, so 61 is not divisible by 5.
  • Try 7: 61÷7=8 R 561 \div 7 = 8 \text{ R } 5, so 61 is not divisible by 7.
  • The next prime is 11, but 11×11=12111 \times 11 = 121 is greater than 61, so we stop.

Answer: None of 2, 3, 5 and 7 divides 61 exactly, so 61 is a prime number.

Example 2: A composite number

Is 323 prime or composite?

17×17=28917 \times 17 = 289 is less than 323, but 19×19=36119 \times 19 = 361 is greater, so the primes up to 17 may all be needed.

PrimeWorkingDivides 323 exactly?
2the last digit, 3, is oddNo
33+2+3=83 + 2 + 3 = 8, not divisible by 3No
5the last digit is not 0 or 5No
7323÷7=46 R 1323 \div 7 = 46 \text{ R } 1No
11323÷11=29 R 4323 \div 11 = 29 \text{ R } 4No
13323÷13=24 R 11323 \div 13 = 24 \text{ R } 11No
17323÷17=19323 \div 17 = 19Yes

Answer: 323=17×19323 = 17 \times 19, so 323 has factors other than 1 and itself. 323 is a composite number.

Prime Factorisation with a Factor Tree

A composite number can always be broken down into factors that are prime numbers, called its prime factors. For example, 70=2×5×770 = 2 \times 5 \times 7 has the prime factors 2, 5 and 7.

Prime factorisation

Prime factorisation is the process of expressing a composite number as a product of its prime factors.

A factor tree does this by breaking the number into smaller factors until every factor is prime.

Example 3: A factor tree

Find the prime factorisation of 660 using a factor tree.

Factor tree for 660. 660 splits into 2 and 330. 330 splits into 10 and 33. 10 splits into 2 and 5. 33 splits into 3 and 11. The primes 2, 2, 5, 3 and 11 at the ends of the branches are circled.6602330103325311
  1. Break 660 into any two factors other than 1 and 660: 660=2×330660 = 2 \times 330.
  2. 2 is prime, so circle it. 330 is composite, so break it down again: 330=10×33330 = 10 \times 33.
  3. Go on until every branch ends in a prime: 10=2×510 = 2 \times 5 and 33=3×1133 = 3 \times 11.
  4. Write 660 as the product of the circled primes, smallest first.

Answer: 660=2×2×3×5×11660 = 2 \times 2 \times 3 \times 5 \times 11

A different first step gives the same answer. Starting with 660=66×10660 = 66 \times 10:

A second factor tree for 660. 660 splits into 66 and 10. 66 splits into 6 and 11. 6 splits into 2 and 3. 10 splits into 2 and 5. The primes 2, 3, 11, 2 and 5 at the ends of the branches are circled.66066106112523

The circled primes are again 2, 2, 3, 5 and 11. However a number is broken down, its prime factors come out the same.

Prime Factorisation by Repeated Division

Repeated division

Divide the number by the smallest prime number that divides it exactly, and write the quotient underneath. Do the same to each quotient until the quotient is 1. The number is the product of all the divisors.

Example 4: Repeated division

Find the prime factorisation of 660 by repeated division.

Repeated division of 660. 660 divided by 2 is 330. 330 divided by 2 is 165. 165 divided by 3 is 55. 55 divided by 5 is 11. 11 divided by 11 is 1. The divisors down the left-hand side are 2, 2, 3, 5 and 11.26602330316555511111
  1. 660 is even: 660÷2=330660 \div 2 = 330, and again 330÷2=165330 \div 2 = 165.
  2. 165 is odd, but 1+6+5=121 + 6 + 5 = 12 is divisible by 3: 165÷3=55165 \div 3 = 55.
  3. 55 is not divisible by 3, but it ends in 5: 55÷5=1155 \div 5 = 11.
  4. 11 is prime: 11÷11=111 \div 11 = 1. Stop, and read the divisors down the left-hand side.

Answer: 660=2×2×3×5×11660 = 2 \times 2 \times 3 \times 5 \times 11, the same as from the factor tree.

Index Notation

When the same factor is repeated, index notation is a shorter way to write the product.

ProductIndex notationHow it is read
5×55 \times 5525^{2}5 to the power of 2
5×5×55 \times 5 \times 5535^{3}5 to the power of 3
5×5×5×55 \times 5 \times 5 \times 5545^{4}5 to the power of 4

Base and index

5 to the power of 3, written as a large 5 with a small raised 3. The 5 is labelled base and the 3 is labelled index.53indexbase

In 535^{3}, 5 is the base and 3 is the index. The index tells us how many times the base is used as a factor: 53=5×5×55^{3} = 5 \times 5 \times 5. A factor used only once has index 1, and the 1 is not written: 51=55^{1} = 5.

Example 5: Index notation

(a) Write 3×3×3×3×7×73 \times 3 \times 3 \times 3 \times 7 \times 7 in index notation. (b) Find the value of 23×32×72^{3} \times 3^{2} \times 7.

(a) 3 is used as a factor 4 times and 7 is used twice: 34×723^{4} \times 7^{2}.

(b) 23=2×2×2=82^{3} = 2 \times 2 \times 2 = 8 and 32=3×3=93^{2} = 3 \times 3 = 9, so 23×32×7=8×9×7=5042^{3} \times 3^{2} \times 7 = 8 \times 9 \times 7 = 504.

Answer: (a) 34×723^{4} \times 7^{2} (b) 504

A Product of Prime Factors in Index Notation

Write the prime factors in order, smallest first, and use an index for each one that is repeated. From Examples 3 and 4, 660=2×2×3×5×11=22×3×5×11660 = 2 \times 2 \times 3 \times 5 \times 11 = 2^{2} \times 3 \times 5 \times 11.

Example 6: Prime factors in index notation

Express 2772 as a product of its prime factors in index notation.

Factor tree for 2772. 2772 splits into 12 and 231. 12 splits into 2 and 6. 6 splits into 2 and 3. 231 splits into 3 and 77. 77 splits into 7 and 11. The primes 2, 2, 3, 3, 7 and 11 at the ends of the branches are circled.2772122312637723711
  1. Any two factors will do to start a factor tree. Here we use 2772=12×2312772 = 12 \times 231. If you do not spot 12, start with 2×13862 \times 1386, since 2772 is even: the primes at the ends come out the same.
  2. 12=2×612 = 2 \times 6 and 6=2×36 = 2 \times 3.
  3. 2+3+1=62 + 3 + 1 = 6 is divisible by 3, so 231 is divisible by 3: 231=3×77231 = 3 \times 77, and 77=7×1177 = 7 \times 11.
  4. Write 2772 as the product of the circled primes, in order. 2 and 3 are each used twice.

Answer: 2772=2×2×3×3×7×11=22×32×7×112772 = 2 \times 2 \times 3 \times 3 \times 7 \times 11 = 2^{2} \times 3^{2} \times 7 \times 11

Common Mistakes

  • Calling 1 a prime number. 1 has only one factor, so it is not prime.
  • Stopping a test too early. 119 is not divisible by 2, 3 or 5, but 119=7×17119 = 7 \times 17.
  • Leaving a composite number in the answer. 660=2×2×3×55660 = 2 \times 2 \times 3 \times 55 is not a prime factorisation, because 55=5×1155 = 5 \times 11.
  • Multiplying the base by the index. 23=2×2×2=82^{3} = 2 \times 2 \times 2 = 8, not 2×3=62 \times 3 = 6.

Practice

Work each question on paper before you open its solution.

Question 1

State whether each number is prime or composite. Show your working. (a) 171 (b) 31 (c) 143

ShowHide solution

(a) 1+7+1=91 + 7 + 1 = 9 is divisible by 3, so 171 is divisible by 3: 171=3×57171 = 3 \times 57. 171 is composite.

(b) 31 is odd, 3+1=43 + 1 = 4 is not divisible by 3, and the last digit is not 0 or 5. The next prime is 7, but 7×7=497 \times 7 = 49 is greater than 31, so we stop. 31 is prime.

(c) 143 is odd, 1+4+3=81 + 4 + 3 = 8 is not divisible by 3, the last digit is not 0 or 5, and 143÷7=20 R 3143 \div 7 = 20 \text{ R } 3. But 11×11=12111 \times 11 = 121 is less than 143, so 11 must be tried: 143÷11=13143 \div 11 = 13 exactly. 143=11×13143 = 11 \times 13, so 143 is composite.

Question 2

Use a factor tree to find the prime factorisation of 54. Give your answer in index notation.

ShowHide solution
Factor tree for 54. 54 splits into 6 and 9. 6 splits into 2 and 3. 9 splits into 3 and 3. The primes 2, 3, 3 and 3 at the ends of the branches are circled.54692333

54=6×954 = 6 \times 9. Then 6=2×36 = 2 \times 3 and 9=3×39 = 3 \times 3. All four ends are prime.

Answer: 54=2×3×3×3=2×3354 = 2 \times 3 \times 3 \times 3 = 2 \times 3^{3}

Question 3

(a) Write 2×2×5×5×5×72 \times 2 \times 5 \times 5 \times 5 \times 7 in index notation. (b) Find the value of 24×3×522^{4} \times 3 \times 5^{2}.

ShowHide solution

(a) 2 is used as a factor twice, 5 three times and 7 once. Answer: 22×53×72^{2} \times 5^{3} \times 7

(b) 24=2×2×2×2=162^{4} = 2 \times 2 \times 2 \times 2 = 16 and 52=5×5=255^{2} = 5 \times 5 = 25, so 24×3×52=16×3×25=12002^{4} \times 3 \times 5^{2} = 16 \times 3 \times 25 = 1200. Answer: 1200

Question 4

Use repeated division to express 702 as a product of its prime factors in index notation.

ShowHide solution
Repeated division of 702. 702 divided by 2 is 351. 351 divided by 3 is 117. 117 divided by 3 is 39. 39 divided by 3 is 13. 13 divided by 13 is 1. The divisors down the left-hand side are 2, 3, 3, 3 and 13.27023351311733913131

702 is even: 702÷2=351702 \div 2 = 351.

351 is odd, but 3+5+1=93 + 5 + 1 = 9 is divisible by 3: 351÷3=117351 \div 3 = 117, 117÷3=39117 \div 3 = 39 and 39÷3=1339 \div 3 = 13.

13 is prime: 13÷13=113 \div 13 = 1.

Answer: 702=2×3×3×3×13=2×33×13702 = 2 \times 3 \times 3 \times 3 \times 13 = 2 \times 3^{3} \times 13

Question 5

Farid says, "Every prime number is odd." Mei Ling says, "Every odd number greater than 1 is prime." Give one number that shows each of them is wrong, with your reason.

ShowHide solution

Farid: 2 is prime, because its only factors are 1 and 2, and 2 is even.

Mei Ling: 9 is odd, but 9=3×39 = 3 \times 3, so 9 has the factors 1, 3 and 9 and is composite. (15, 21 or 25 would also do.)

Question 6

A teacher has 91 chairs to set out in the school hall in equal rows. She wants more than one row, and more than one chair in each row. (a) Show how this can be done. (b) Explain why it cannot be done with 97 chairs.

ShowHide solution

(a) The number of rows must be a factor of 91 other than 1 and 91. 91 is odd, 9+1=109 + 1 = 10 is not divisible by 3, and the last digit is not 0 or 5, but 91÷7=1391 \div 7 = 13 exactly. So 91=7×1391 = 7 \times 13. She can set out 7 rows of 13 chairs, or 13 rows of 7 chairs.

(b) 97 is odd, 9+7=169 + 7 = 16 is not divisible by 3, the last digit is not 0 or 5, and 97÷7=13 R 697 \div 7 = 13 \text{ R } 6. The next prime is 11, but 11×11=12111 \times 11 = 121 is greater than 97, so 97 is prime. Its only factors are 1 and 97, so the only equal rows are 1 row of 97 chairs or 97 rows of 1 chair.

Question 7

A cuboid has a volume of 385 cm3385 \text{ cm}^{3}. The length of each edge is a whole number of centimetres and is more than 1 cm. Find the lengths of its edges.

ShowHide solution

The volume is length × breadth × height, so express 385 as a product of prime factors.

385 ends in 5: 385÷5=77385 \div 5 = 77. Then 77÷7=1177 \div 7 = 11, and 11 is prime. So 385=5×7×11385 = 5 \times 7 \times 11.

There are exactly three prime factors, and each edge, being more than 1 cm long, must take at least one of them. So each edge takes exactly one.

The edges are 5 cm, 7 cm and 11 cm long.

Key Points

  • A whole number greater than 1 is prime if it has exactly two different factors, 1 and itself, and composite if it has more than two.
  • 0 and 1 are neither prime nor composite. 2 is the only even prime number.
  • To test whether a number is prime, divide it by the primes 2, 3, 5, 7, ... in turn, for as long as prime × prime is not greater than the number.
  • A number is divisible by 2 when its last digit is even, by 3 when the sum of its digits is divisible by 3, and by 5 when its last digit is 0 or 5.
  • Prime factorisation expresses a composite number as a product of its prime factors, by a factor tree or by repeated division.
  • In 53=5×5×55^{3} = 5 \times 5 \times 5, 5 is the base and 3 is the index.
  • Write the primes in order, with an index for each repeated prime: 660=22×3×5×11660 = 2^{2} \times 3 \times 5 \times 11.

Exercises on this lesson in the Secondary 1 book

1.2 Highest Common Factor ›

All Secondary 1 (Grade 7) lessons

Home Campus has lessons, practice questions with worked solutions and worksheets for Primary 3 to Secondary 1. Register free to practise and keep track of progress.

This lesson follows the Singapore Secondary 1 syllabus and was checked question by question before it was published. Spotted a mistake? Tell us.