Back to homeMathematics · 2nd Year · Change subject
Start for free
2nd Year · Mathematics
Numbers · Natural numbers

Highest common factor

Before you start, make sure you know: Prime numbers and prime factorisation (1st Year, Junior Cycle)

Aoife is helping at her local GAA club, and the club has two ropes to mark out a pitch, $20$ and $28$ metres long. She wants to cut them into equal pieces, as long as possible, with nothing left over. That is the question the highest common factor (HCF) answers.

What the HCF is

Venn diagram showing the factors of 24 and 36 and highlighting the common factors, marking 12 as the highest common factor. 8, 24 Factors of 24 Factors of 36 9, 18, 36 1, 2, 3, 4, 6, 12 HCF = 12
Practice★☆☆Not started
Look at the factors of the numbers $24$ and $36$: $Div(24) = \{1, 2, 3, 4, 6, 8, 12, 24\}$ $Div(36) = \{1, 2, 3, 4, 6, 9, 12, 18, 36\}$ From these lists: a) Write down…

Look at the factors of the numbers $24$ and $36$:

  • $Div(24) = \{1, 2, 3, 4, 6, 8, 12, 24\}$

  • $Div(36) = \{1, 2, 3, 4, 6, 9, 12, 18, 36\}$

From these lists:

  1. a) Write down the common factors of both numbers.
  2. b) Identify the highest of these common factors. What do we call this number?
Solve
Practice★☆☆Not started
You are going to calculate the greatest common divisor of $48$ and $80$, but before applying any algorithm you must anticipate what the solution will look like: a)…

You are going to calculate the greatest common divisor of $48$ and $80$, but before applying any algorithm you must anticipate what the solution will look like:

  1. a) Estimate: Without decomposing the numbers into prime factors, answer with reasoning:
  • Can the result be greater than $48$? Why?

  • Knowing that both $48$ and $80$ are even, could the result be an odd number?

  • Check mentally whether $10$ could be a common divisor of both. Why is it immediately ruled out?

  1. b) Check: Decompose $48$ and $80$ into prime factors, calculate the $\text{gcd}(48, 80)$, and verify whether the value obtained satisfies all the deductions you made in your estimation.
Solve

Finding the HCF by prime factorisation

The quick method for large numbers: break each number down into primes and take only the common factors, raised to the lowest power.

To write a number as a product of primes you can use a factor tree (split the number into any two factors, then keep splitting until every branch ends in a prime) or repeated division (divide by the smallest prime that goes in, again and again, until you reach $1$). Every natural number greater than $1$ has exactly one prime factorisation (apart from the order of the factors). We state this without proving it.

Calculation of the h.c.f. of 12 and 18 from their prime factorisation, selecting the common factors with the lowest power. 12 = 2² · 3 18 = 2 · 3² HCF = 2 · 3 = 6 only factors common to both, with the lowest power
Practice★☆☆Not started
Calculate the greatest common divisor (g.c.d.) of the following numbers using the prime factorization method (remember: you take the common factors raised to the lowest…

Calculate the greatest common divisor (g.c.d.) of the following numbers using the prime factorization method (remember: you take the common factors raised to the lowest exponent):

  1. a) $12$ and $18$
  2. b) $20$ and $30$
  3. c) $15$ and $25$
Solve
Practice★☆☆Not started
Two numbers are called co-prime if their only common factor is $1$. Check whether the following pairs of numbers are co-prime by calculating their highest common factor:…

Two numbers are called co-prime if their only common factor is $1$. Check whether the following pairs of numbers are co-prime by calculating their highest common factor:

  1. a) $8$ and $15$
  2. b) $14$ and $21$
  3. c) $9$ and $20$
Solve
Practice★☆☆Not started
Cian has to calculate the greatest common divisor of $72$ and $120$. After decomposing both numbers into prime factors, he writes in his notebook: $$72 = 2^3 \times…

Cian has to calculate the greatest common divisor of $72$ and $120$. After decomposing both numbers into prime factors, he writes in his notebook:

$$72 = 2^3 \times 3^2$$ $$120 = 2^3 \times 3 \times 5$$

And he concludes: "Since the gcd is the greatest, I choose all the factors that appear raised to their highest exponent: $\text{gcd}(72, 120) = 2^3 \times 3^2 \times 5 = 360$".

  1. a) Without doing complex calculations, explain why Cian's result is impossible by reasoning about the meaning of the word "divisor".
  2. b) What concept has Cian actually calculated instead of the gcd?
  3. c) Explain the correct rule for calculating the gcd from the prime factorizations and find the correct result.
Solve

A quicker method: the Euclidean algorithm

For big numbers, factorising is slow. The Euclidean algorithm uses repeated division: divide the larger number by the smaller, then divide the number you just divided by by the remainder, and so on until the remainder is $0$. The last number you divided by is the HCF.

Why? Any common factor of two numbers also divides their remainder, so the HCF never changes from one step to the next.

Practice★★☆Not started
The Euclidean algorithm is an ancient and effective method for finding the $m.c.d.$ of two numbers using successive division. It consists of dividing the larger number…

The Euclidean algorithm is an ancient and effective method for finding the $m.c.d.$ of two numbers using successive division. It consists of dividing the larger number by the smaller one; if the remainder is not zero, the divisor is divided by the remainder, and so on until the remainder is zero. The last divisor used is the $m.c.d.$

Use this method to find the $m.c.d.(525, 225)$. Check the result by doing the usual prime factorisation afterwards.

Solve

Relationship between the HCF and the LCM

For two numbers, the HCF and the LCM are linked by a very useful formula.

Diagram checking the equality between the product of 12 and 18 and the product of their HCF and LCM. 12 · 18 = 216 HCF = 6 LCM = 36 6 · 36 = 216 ✓ = 12 · 18
Practice★★☆Not started
It is known that the product of two natural numbers is $2160$ and that their lowest common multiple ($m.c.m.$) is $180$. Using the relationship between the product of…

It is known that the product of two natural numbers is $2160$ and that their lowest common multiple ($m.c.m.$) is $180$. Using the relationship between the product of two numbers, their $m.c.d.$ and their $m.c.m.$, find out what the Highest Common Factor of those numbers is.

Solve
Practice★★★Not started
Find two natural numbers, which we will call $x$ and $y$, knowing that their product is $x \times y = 11\,250$ and that their lowest common multiple is…

Find two natural numbers, which we will call $x$ and $y$, knowing that their product is $x \times y = 11\,250$ and that their lowest common multiple is $m.c.m.(x, y) = 750$.

Solve
Practice★★★Not started
We are looking for two three-digit natural numbers, $a$ and $b$ (with $a < b$), whose initial values are unknown, but we know that they simultaneously satisfy two…

We are looking for two three-digit natural numbers, $a$ and $b$ (with $a < b$), whose initial values are unknown, but we know that they simultaneously satisfy two conditions:

$$\text{gcd}(a, b) = 18$$ $$\text{lcm}(a, b) = 2160$$
  1. a) Apply the property relating the product of two numbers to their gcd and their lcm to calculate the exact value of the product $a \times b$.
  2. b) If we write $a = 18 \times x$ and $b = 18 \times y$, deduce what value the product $x \times y$ must have and reason why $x$ and $y$ must necessarily be coprime (that is, they cannot share any common factor).
  3. c) Decompose the product $x \times y$ into prime factors, analyze all possible pairs of factors $(x, y)$ that are coprime, and deduce which are the only values of $a$ and $b$ that satisfy that both have exactly three digits.
Solve

Applications of the HCF

The HCF turns up whenever you want to share out or cut into equal parts that are as large as possible, with nothing left over.

Diagram showing the division of two lengths into equal pieces of maximum size corresponding to their highest common factor. Rope A: 20 m Rope B: 28 m 4 m 4 m 4 m 4 m 4 m 4 m 4 m 4 m 4 m 4 m 4 m 4 m HCF(20, 28) = 4 m (5 pieces of A and 7 pieces of B)
Practice★☆☆Not started
At an adventure camp in the Wicklow Mountains, the instructors have two climbing ropes: one measures $20$ metres and the other $28$ metres. They want to cut them into…

At an adventure camp in the Wicklow Mountains, the instructors have two climbing ropes: one measures $20$ metres and the other $28$ metres. They want to cut them into equal pieces of the maximum possible length, with no rope left over. How long should each piece be?

20 m 28 m ? m Max piece
Solve
Practice★★☆Not started
A council worker wants to tile a rectangular area of a park measuring $24$ metres long by $18$ metres wide. To do this, they will use square tiles that are as large as…

A council worker wants to tile a rectangular area of a park measuring $24$ metres long by $18$ metres wide. To do this, they will use square tiles that are as large as possible and do not want to cut any.

  1. a) Determine the side length of each tile.
  2. b) Calculate the total number of tiles needed to cover the entire surface.
Tile l l 24 m 18 m
Solve
Practice★★★Not started
A marine wildlife rescue centre has received a donation of three heavy-duty hoses to clean the tanks. The lengths of the hoses are $156$ metres, $144$ metres and $108$…

A marine wildlife rescue centre has received a donation of three heavy-duty hoses to clean the tanks. The lengths of the hoses are $156$ metres, $144$ metres and $108$ metres.

They want to cut them into pieces of equal length, with nothing left over, to distribute them among different volunteer teams. The head of the centre sets the condition that the pieces must be as long as possible, but for safety reasons, no piece can measure more than $15$ metres.

What length should each piece be to meet all conditions? How many volunteers will receive a hose?

Solve

Back to the start: You factorise $20 = 2^2 \cdot 5$ and $28 = 2^2 \cdot 7$; their HCF is $2^2 = 4\text{ m}$, so you will get pieces of $4\text{ m}$ ($5$ pieces from the first rope and $7$ from the second).

Summary

See all the exercises in this section