Factorising Before Finding HCF and LCM
You cannot read the highest common factor or the lowest common multiple of two algebraic expressions just by looking at them. Each expression must first be broken into its factors. Only then can you see which pieces the expressions share and which they do not. Take the two expressions \( 2x^2 - 8y^2 \) and \( 2x^4 + 16xy^3 \).
Step 1: Taking the common number 2 out of the first expression and writing the bracket as a difference of two squares:
\[ \begin{aligned} 2x^2 - 8y^2 &= 2(x^2 - 4y^2) \\ &= 2\{x^2 - (2y)^2\} \\ &= 2(x - 2y)(x + 2y) \end{aligned} \]
Step 2: Taking 2x out of the second expression and treating the bracket as a sum of two cubes:
\[ \begin{aligned} 2x^4 + 16xy^3 &= 2x(x^3 + 8y^3) \\ &= 2x\{(x)^3 + (2y)^3\} \\ &= 2x(x + 2y)(x^2 - 2xy + 4y^2) \end{aligned} \]
Step 3: Multiplying the factors that appear in both, which are 2 and \( (x + 2y) \), gives the HCF:
\[ \text{HCF} = 2 \times (x + 2y) = 2(x + 2y) \]
The same factors also give the lowest common multiple: the common factors multiplied by every factor left over, which comes to \( 2x(x - 2y)(x^3 + 8y^3) \). Both answers grow out of one factorisation, and that is why factorising always comes first. From here on we look closely at the HCF.
Common Factors and the HCF
Consider the two binomials \( x^2 - 4 \) and \( x^3 - 8 \). The first is a difference of two squares and the second is a difference of two cubes. Factorising both:
\[ x^2 - 4 = (x + 2)(x - 2) \]
\[ x^3 - 8 = (x - 2)(x^2 + 2x + 4) \]
The factors of the first are \( (x + 2) \) and \( (x - 2) \). The factors of the second are \( (x - 2) \) and \( (x^2 + 2x + 4) \). Only \( (x - 2) \) is on both lists, so it is the common factor. \( (x + 2) \) belongs to the first alone and \( (x^2 + 2x + 4) \) to the second alone.
Common factor: a factor that appears in every one of the given expressions.
A Venn diagram shows this clearly. Let A be the set of factors of the first expression and B the set of factors of the second. A factor in both sets sits where the two circles overlap, and every other factor sits in the part of its own circle that the other circle does not cover.

The product of the factors in the overlap is the highest common factor of the expressions. Here the overlap holds a single factor, so the HCF of \( x^2 - 4 \) and \( x^3 - 8 \) is \( x - 2 \).
Highest common factor (HCF): the product of the common factors of the given expressions.
The HCF divides every given expression exactly. Because it is built from all the common factors multiplied together, no bigger expression can divide all of them.
Identities That Help in Factorising
Finding an HCF is only as easy as the factorising behind it. Factorising follows the same order every time: first take out any common number or letter, then rewrite what is left in the shape of a known identity, and then use that identity to factorise. The identities used most in this topic are these:
- Difference of two squares: \( a^2 - b^2 = (a + b)(a - b) \)
- Sum of two cubes: \( a^3 + b^3 = (a + b)(a^2 - ab + b^2) \)
- Difference of two cubes: \( a^3 - b^3 = (a - b)(a^2 + ab + b^2) \)
- Perfect squares: \( a^2 + 2ab + b^2 = (a + b)^2 \) and \( a^2 - 2ab + b^2 = (a - b)^2 \)
- Turning a sum of squares into a perfect square: \( a^2 + b^2 = (a + b)^2 - 2ab \)
- Splitting the middle term: \( x^2 + (p + q)x + pq = (x + p)(x + q) \)
In a sum of cubes the middle sign of the second factor is minus; in a difference of cubes it is plus. \( a^2 - ab + b^2 \) and \( a^2 + ab + b^2 \) are different expressions, so they are never a common factor of each other.
Steps for Finding the HCF
Whether there are two expressions or three or more, the HCF is found in the same order:
- Factorise each expression completely, until no factor can be broken down any further.
- Write out the factors of each expression separately, in a Venn diagram if that helps.
- Pick out only the factors that appear in every expression.
- Multiply those common factors together. The product is the HCF.
- If no factor other than 1 is common, the HCF is 1.
Worked Example: A Difference of Squares and a Sum of Cubes
Find the HCF of \( x^2 - 9 \) and \( x^3 + 27 \), and show it in a Venn diagram. Since 9 is \( 3^2 \) and 27 is \( 3^3 \), both expressions fit a known identity.
Step 1: Factorising the first expression as a difference of two squares:
\[ x^2 - 9 = x^2 - 3^2 = (x + 3)(x - 3) \]
Step 2: Factorising the second expression as a sum of two cubes:
\[ \begin{aligned} x^3 + 27 &= (x)^3 + (3)^3 \\ &= (x + 3)(x^2 - 3x + 9) \end{aligned} \]
Step 3: The only factor in both lists is \( (x + 3) \), so the HCF is:
\[ \text{HCF} = x + 3 \]
With A as the set of factors of the first expression and B as the set of factors of the second, \( (x - 3) \) goes in the part of A alone, \( (x^2 - 3x + 9) \) goes in the part of B alone, and \( (x + 3) \) goes in the overlap.

When the HCF Is 1
Sometimes the factors simply do not match. Look at \( p^3 - q^3 \) and \( p^3 + q^3 \). Both fit the cube identities.
Step 1: Factorising the first as a difference of cubes:
\[ p^3 - q^3 = (p - q)(p^2 + pq + q^2) \]
Step 2: Factorising the second as a sum of cubes:
\[ p^3 + q^3 = (p + q)(p^2 - pq + q^2) \]
Step 3: All four factors are different. \( (p - q) \) is not \( (p + q) \), and the two trinomials differ in their middle sign. The number 1 divides every expression, so the HCF is:
\[ \text{HCF} = 1 \]
When the given expressions have no common factor other than 1, their HCF is 1.
Writing 0 when nothing is common is wrong, because nothing can be divided by 0. The answer is 1.
Fourth-Power Expressions with Three Terms
Expressions shaped like \( a^4 + a^2b^2 + b^4 \) do not match any identity directly. The trick is to complete a perfect square and turn the expression into a difference of two squares. Find the HCF of \( 8x^3 + y^3 \) and \( 16x^4 + 4x^2y^2 + y^4 \).
Step 1: Writing the first expression as a sum of cubes and factorising:
\[ \begin{aligned} 8x^3 + y^3 &= (2x)^3 + (y)^3 \\ &= (2x + y)(4x^2 - 2xy + y^2) \end{aligned} \]
Step 2: Writing the first and last terms of the second expression as squares:
\[ 16x^4 + 4x^2y^2 + y^4 = (4x^2)^2 + (y^2)^2 + 4x^2y^2 \]
Step 3: Using \( a^2 + b^2 = (a + b)^2 - 2ab \) and collecting like terms:
\[ \begin{aligned} &= (4x^2 + y^2)^2 - 2 \cdot 4x^2 \cdot y^2 + 4x^2y^2 \\ &= (4x^2 + y^2)^2 - 4x^2y^2 \end{aligned} \]
Step 4: Writing \( 4x^2y^2 \) as \( (2xy)^2 \) and factorising as a difference of squares:
\[ \begin{aligned} &= (4x^2 + y^2)^2 - (2xy)^2 \\ &= (4x^2 + y^2 + 2xy)(4x^2 + y^2 - 2xy) \\ &= (4x^2 + 2xy + y^2)(4x^2 - 2xy + y^2) \end{aligned} \]
Step 5: The factor found in both is \( (4x^2 - 2xy + y^2) \), so the HCF is:
\[ \text{HCF} = 4x^2 - 2xy + y^2 \]
The same method gives a result you will use again and again: \( a^4 + a^2b^2 + b^4 = (a^2 + ab + b^2)(a^2 - ab + b^2) \)
HCF of Three Expressions
With three expressions the method is the same, but a common factor must now appear in all three. Find the HCF of \( x^3y + y^4 \), \( x^4 + x^2y^2 + y^4 \) and \( 2x^3 - 2x^2y + 2xy^2 \).
Step 1: Taking y out of the first and factorising the sum of cubes:
\[ \begin{aligned} x^3y + y^4 &= y(x^3 + y^3) \\ &= y(x + y)(x^2 - xy + y^2) \end{aligned} \]
Step 2: Completing the square in the second and factorising the difference of squares:
\[ \begin{aligned} x^4 + x^2y^2 + y^4 &= (x^2 + y^2)^2 - 2x^2y^2 + x^2y^2 \\ &= (x^2 + y^2)^2 - (xy)^2 \\ &= (x^2 + xy + y^2)(x^2 - xy + y^2) \end{aligned} \]
Step 3: Taking 2x out of the third:
\[ 2x^3 - 2x^2y + 2xy^2 = 2x(x^2 - xy + y^2) \]
Step 4: The only factor in all three is \( (x^2 - xy + y^2) \), so the HCF is:
\[ \text{HCF} = x^2 - xy + y^2 \]
For a second example take \( 5m^3 - 20m \), \( m^3 - 3m^2 - 10m \) and \( m^3 - m^2 - 2m + 8 \).
Step 1: Taking 5m out of the first and factorising the difference of squares:
\[ \begin{aligned} 5m^3 - 20m &= 5m(m^2 - 4) \\ &= 5m(m + 2)(m - 2) \end{aligned} \]
Step 2: Taking m out of the second and splitting the middle term \( -3m \) into \( -5m + 2m \):
\[ \begin{aligned} m^3 - 3m^2 - 10m &= m(m^2 - 5m + 2m - 10) \\ &= m\{m(m - 5) + 2(m - 5)\} \\ &= m(m - 5)(m + 2) \end{aligned} \]
Step 3: Grouping \( m^3 + 8 \) together in the third and using the sum of cubes:
\[ \begin{aligned} m^3 - m^2 - 2m + 8 &= (m^3 + 8) - m(m + 2) \\ &= (m + 2)(m^2 - 2m + 4) - m(m + 2) \\ &= (m + 2)(m^2 - 3m + 4) \end{aligned} \]
Step 4: The first two expressions share both m and \( (m + 2) \), but the third has no factor m. Only \( (m + 2) \) is in all three, so the HCF is:
\[ \text{HCF} = m + 2 \]
A factor found in only two of the three expressions does not go into the HCF. In the example above, m is in the first two but not in the third, so the HCF is not \( m(m + 2) \).
Numbers and Powers in the HCF
Factors can also be numbers, and letters raised to powers. For the numbers, take the HCF of the numbers. For each letter that appears in every expression, take its smallest power, because only the smallest power fits inside all of them. Look at \( 4a^3b(a - b)(a + b - 1) \) and \( 16a^2b^2(a + 2b)(a + b - 1) \).
- The HCF of 4 and 16 is 4.
- Between \( a^3 \) and \( a^2 \) the smaller power is \( a^2 \).
- Between b and \( b^2 \) the smaller power is b.
- Among the brackets only \( (a + b - 1) \) is in both. \( (a - b) \) and \( (a + 2b) \) are not shared.
Multiplying all of these gives the HCF:
\[ \text{HCF} = 4a^2b(a + b - 1) \]
If the numbers share nothing, the number part of the HCF is just 1. In \( 3x^2 + 9x = 3x(x + 3) \) and \( 7x + 21 = 7(x + 3) \), the HCF of 3 and 7 is 1 and x is missing from the second, so the HCF is simply \( x + 3 \).
The HCF takes the smallest power of a letter, not the largest. What \( a^3 \) and \( a^2 \) share is \( a^2 \), not \( a^3 \).
The full lesson is waiting for you
The notes are free to read in full. A free account opens the rest of the practice, and tracks your progress and confidence score for every subject. Presentations and videos need approval from Learn Yeti.