Prime Factorisation, HCF and LCM

On this page

How to write a number as a product of its prime factors with a factor tree, how to write it with powers, and how to use prime factors and Venn diagrams to find the highest common factor and lowest common multiple, including in problems.

Prime factors in the exam

A prime number has exactly two factors: 1 and itself. The first ten primes are 2, 3, 5, 7, 11, 13, 17, 19, 23 and 29. 1 is not a prime number, because it has only one factor.

Every whole number bigger than 1 can be made by multiplying primes together. For example, 42 = 2 \times 3 \times 7. This is called writing 42 as a product of its prime factors. Product means the numbers are multiplied.

In the exam you are usually asked to write a number as a product of its prime factors, for 2 marks. The next part often asks for the highest common factor (HCF) or the lowest common multiple (LCM) of two numbers, for 2 more marks. Some questions give two numbers already written with powers, such as 2^3 \times 5, and ask for their HCF or LCM.

Listing factors and multiples works well for small numbers. Prime factors are quicker and safer for bigger numbers, and this page shows how.

Factor trees

A factor tree splits a number into two factors, then splits those factors, until every branch ends in a prime. Circle each prime as you reach it, so you know that branch has stopped.

You can start with any factor pair except 1 and the number itself. Starting with 140 = 2 \times 70 or 140 = 4 \times 35 gives the same primes in the end: 2, 2, 5 and 7. Every number has only one set of prime factors.

Write the answer as a product, with multiplication signs, smallest prime first: 140 = 2 \times 2 \times 5 \times 7. A list such as 2, 2, 5, 7 is not a product. Check by multiplying back: 2 \times 2 \times 5 \times 7 = 140

Another way is to keep dividing by a prime that goes in exactly: 140 \div 2 = 70, then 70 \div 2 = 35, then 35 \div 5 = 7. The primes you divided by, and the 7 left at the end, are the prime factors.

Worked example 1: A product of prime factors

Write 154 as a product of its prime factors.

  1. 154 is even, so start with 2: 154 = 2 \times 77
  2. 2 is prime, so circle it. 77 is not prime, because it is in the 7 times table.
  3. Your turn. Work out 77 \div 7

    77 = 7 \times 11, and 7 and 11 are both prime.

  4. Check: 2 \times 7 \times 11 = 14 \times 11 = 154
  5. Answer: 154 = 2 \times 7 \times 11

Writing repeated primes as powers

When a prime appears more than once, write it as a power. 2 \times 2 \times 2 is 2^3, said 2 cubed or 2 to the power 3. The small number, the index, counts how many times the prime is multiplied.

So 140 = 2 \times 2 \times 5 \times 7 = 2^2 \times 5 \times 7. A prime that appears only once has no power written: 5 means 5^1

Edexcel asks for this as a product of powers of its prime factors. Write each prime once, smallest first, with its power.

Some questions give the form, such as 2^a \times 3^b, and ask for the values of a and b. Count how many 2s and how many 3s there are.

Worked example 2: A product of powers

Write 360 as a product of powers of its prime factors.

  1. Split 360 = 10 \times 36. Then 10 = 2 \times 5 and 36 = 6 \times 6
  2. Each 6 = 2 \times 3. In order, the primes are 2 \times 2 \times 2 \times 3 \times 3 \times 5
  3. Your turn. How many 2s are there? This is the power of 2.

    There are three 2s, so 2 \times 2 \times 2 = 2^3

  4. There are two 3s, so 3 \times 3 = 3^2. There is one 5.
  5. Check: 2^3 \times 3^2 \times 5 = 8 \times 9 \times 5 = 360
  6. Answer: 360 = 2^3 \times 3^2 \times 5

HCF and LCM with a Venn diagram

Write both numbers as products of prime factors first. For example, 42 = 2 \times 3 \times 7 and 70 = 2 \times 5 \times 7

Draw two overlapping circles, one for each number. A prime that is in both numbers goes in the overlap, once. The primes left over go in their own circle, outside the overlap.

The HCF is the product of the primes in the overlap: 2 \times 7 = 14. The LCM is the product of every prime in the diagram: 3 \times 2 \times 7 \times 5 = 210

When a prime is repeated, count carefully. Put it in the overlap as many times as it appears in both numbers, and put any extra copies in their own circle.

Check your answers. The HCF divides into both numbers: 42 \div 14 = 3 and 70 \div 14 = 5. The LCM is in both times tables: 210 \div 42 = 5 and 210 \div 70 = 3

Worked example 3: The HCF from prime factors

Find the highest common factor (HCF) of 48 and 180.

  1. 48 = 2 \times 2 \times 2 \times 2 \times 3 and 180 = 2 \times 2 \times 3 \times 3 \times 5
  2. Both numbers have at least two 2s and one 3, so 2, 2 and 3 go in the overlap.
  3. Your turn. Multiply the primes in the overlap. What is the HCF?

    HCF = 2 \times 2 \times 3 = 12

  4. Check: 48 \div 12 = 4 and 180 \div 12 = 15
  5. Answer: 12

Worked example 4: The LCM from prime factors

Find the lowest common multiple (LCM) of 56 and 84.

  1. 56 = 2 \times 2 \times 2 \times 7 and 84 = 2 \times 2 \times 3 \times 7
  2. They share 2, 2 and 7, so those go in the overlap. Left over: a 2 from 56 and a 3 from 84
  3. Your turn. Multiply every prime in the diagram. What is the LCM?

    LCM = 2 \times 2 \times 2 \times 7 \times 3 = 168

  4. Check: 168 \div 56 = 3 and 168 \div 84 = 2, so 168 is a multiple of both.
  5. Answer: 168

When the numbers are given with powers

Some questions give the numbers already as products of powers, for example A = 2^3 \times 7 and B = 2^2 \times 3 \times 7. You don't need to work out A and B first.

  • HCF: take each prime that is in both numbers, with the smaller power.
  • LCM: take every prime that is in either number, with the bigger power.

Here 2 and 7 are in both. The smaller powers give HCF = 2^2 \times 7 = 28. Every prime with its bigger power gives LCM = 2^3 \times 3 \times 7 = 168

In fact A = 56 and B = 84, the numbers from worked example 4, so the LCM is 168 again. This is the Venn diagram method written with powers.

Worked example 5: HCF and LCM from powers

A = 2^3 \times 3^2 \times 5 and B = 2 \times 3^3 \times 7. Find (a) the HCF of A and B, (b) the LCM of A and B. Give each answer as a whole number.

  1. 2 and 3 are in both numbers. 5 is only in A, and 7 is only in B.
  2. (a) The smaller powers are 2 (from B) and 3^2 (from A), so HCF = 2 \times 3^2
  3. Your turn. Work out 2 \times 3^2

    HCF = 2 \times 9 = 18

  4. (b) Take every prime with its bigger power: LCM = 2^3 \times 3^3 \times 5 \times 7
  5. 2^3 \times 3^3 = 8 \times 27 = 216 and 5 \times 7 = 35, so LCM = 216 \times 35 = 7560
  6. Answer: (a) 18 (b) 7560

HCF or LCM in a problem

Some questions don't say HCF or LCM. You have to decide which one you need.

  • HCF: splitting things into the largest possible equal groups or pieces, with nothing left over. For example, the longest equal lengths cut from two ropes, or the biggest identical bags made from two sets of sweets.
  • LCM: things that repeat, to find when they happen together again. For example, two lights flashing, or packs of different sizes when you want the same number of each.

A quick check: the HCF is never bigger than the smaller number, and the LCM is never smaller than the bigger number.

Worked example 6: Two machines checked together

In a factory, machine P is checked every 45 minutes and machine Q is checked every 54 minutes. Both machines are checked at 7 am. At what time are both machines next checked at the same time?

  1. The checks repeat, so this needs the LCM of 45 and 54
  2. 45 = 3 \times 3 \times 5 and 54 = 2 \times 3 \times 3 \times 3
  3. Overlap: 3 and 3. Left over: 5 from 45, and 2 and 3 from 54
  4. Your turn. Multiply every prime: 5 \times 3 \times 3 \times 2 \times 3. What is the LCM?

    LCM = 270, so both are next checked after 270 minutes.

  5. 4 \times 60 = 240 and 270 - 240 = 30, so 270 minutes is 4 hours 30 minutes after 7 am.
  6. Answer: 11:30 am

Common mistakes

  • Stopping before every branch ends in a prime. Numbers such as 21, 39 and 51 are not prime, so keep splitting until every branch ends in a prime.
  • Putting 1 in a factor tree or an answer. 1 is not prime, so never split a number as 1 times itself.
  • Writing a list instead of a product. Join the primes with multiplication signs, never commas or plus signs.
  • Leaving out the powers. A product of powers means writing 2^3, not 2 \times 2 \times 2
  • Mixing up the HCF and the LCM. The HCF is never bigger than the smaller number; the LCM is never smaller than the bigger number.
  • Giving one prime as the HCF or LCM. Multiply every prime in the overlap for the HCF, and every prime in the diagram for the LCM.

Practice questions