Factorising algebraic expressions

Multiplying out (x+3)(x+4)(x+3)(x+4) to get x2+7x+12x^2+7x+12 is easy — you have four terms and you just add them up. Factorising is that process run in reverse: you are handed the expanded expression x2+7x+12x^2+7x+12 and asked to rediscover the two brackets that produced it. There is no single button to press; instead you learn to recognise four different shapes an expression can take, each pointing to a different method — pulling out a common factor, grouping four terms in pairs, matching one of the standard identities, or splitting the middle term of a trinomial. This chapter directly reverses the multiplication and identity work you have already done, so every method below is really an old identity read backwards. Getting fast at spotting which shape you are looking at, before you start manipulating symbols, is the real skill — and it is the one this article drills.

The core insight

Factorising reverses multiplication: pick the method (common factor, grouping, identity, or splitting the middle term) that matches the shape of the expression in front of you, then check your answer by multiplying the factors back out.

The core idea

Common factor. Pull out the highest common factor (HCF) of every term — this is always the first thing to check, since a hidden common factor can lurk inside an expression that also matches an identity.

ax+ay=a(x+y)ax+ay=a(x+y)

where: aa is the HCF shared by both terms, and (x+y)(x+y) is what remains once aa is divided out of each term.

Grouping. With four terms and no overall common factor, rearrange them into two pairs that each share a factor, pull that factor out of each pair, and the two pairs collapse into a common binomial.

ax+ay+bx+by=a(x+y)+b(x+y)=(x+y)(a+b)ax+ay+bx+by=a(x+y)+b(x+y)=(x+y)(a+b)

Identities read backwards. Every identity you learnt for expanding brackets has a mirror-image use for factorising — spot the right-hand-side pattern and jump straight to the left-hand side.

a2−b2=(a−b)(a+b)a^2-b^2=(a-b)(a+b)
a2+2ab+b2=(a+b)2a2−2ab+b2=(a−b)2a^2+2ab+b^2=(a+b)^2 \qquad a^2-2ab+b^2=(a-b)^2

where: aa and bb are the two terms whose squares appear; the sign of the middle term (+2ab+2ab or −2ab-2ab) tells you whether the answer is (a+b)2(a+b)^2 or (a−b)2(a-b)^2.

Splitting the middle term. For a monic trinomial x2+bx+cx^2+bx+c (coefficient of x2x^2 exactly 11), find two numbers pp and qq whose sum is bb and whose product is cc, then rewrite bxbx as px+qxpx+qx and group.

x2+bx+c=(x+p)(x+q)where p+q=b, pq=cx^2+bx+c=(x+p)(x+q) \quad\text{where } p+q=b,\ pq=c

where: bb is the coefficient of xx, cc is the constant term, and p,qp,q are the two numbers you search for — this only works when the leading coefficient is exactly 11; a general trinomial ax2+bx+cax^2+bx+c with a≠1a\neq1 needs a different method left for a later class. A reliable order to work through the methods: check for a common factor first (it keeps the numbers small); then look for a matching identity; if it is a four-term expression, try grouping; and if it is a trinomial that is not a perfect square, split the middle term. Applying the common-factor check first matters even when an identity is also present — a common factor can hide inside an expression that also matches a2−b2a^2-b^2 or a perfect-square trinomial, and pulling it out first keeps the remaining numbers smaller and the identity easier to spot. For example, 8x2−188x^2-18 has the common factor 22 hiding a difference of squares: 8x2−18=2(4x2−9)=2(2x−3)(2x+3)8x^2-18=2(4x^2-9)=2(2x-3)(2x+3), which is far tidier than trying to force the identity onto the original coefficients directly. The main skill across all four methods is the same: pattern recognition before manipulation. Look at the expression and ask how many terms it has, whether the terms share an obvious common factor, and whether it resembles the right-hand side of an identity you already know — only after answering these questions should you start moving symbols around.

Figure
An area rectangle split into four smaller cells showing x times x plus 4x plus 3x plus 12 combining into two matched sides x plus 3 and x plus 4
x squared + 7x + 12 as one rectangle, side by side width (x+4), height (x+3) — four cells sum to the same area x squared 4x 3x 12 width x width 4 height x height 3 Total area (x+4)(x+3) equals x squared + 4x + 3x + 12, which is x squared + 7x + 12
Derivation AFactorising a monic trinomial by splitting the middle term

Show, using only the identity for expanding two binomials, why searching for two numbers pp and qq with p+q=bp+q=b and pq=cpq=c correctly factorises any monic trinomial x2+bx+cx^2+bx+c into (x+p)(x+q)(x+p)(x+q), and why checking both conditions together — not just one — is essential.

Step 1. Start from the known identity for a product of two binomials of this shape, expanded fully:

(x+p)(x+q)=x2+px+qx+pq=x2+(p+q)x+pq(x+p)(x+q)=x^2+px+qx+pq=x^2+(p+q)x+pq

Step 2. Compare this expanded form with the trinomial we want to factorise, x2+bx+cx^2+bx+c. For the two to be the same expression, term by term, the coefficient of xx must match and the constant term must match:

p+q=bandpq=cp+q=b \qquad\text{and}\qquad pq=c

Step 3. This shows the search is exact, not a guess: any pair p,qp,q satisfying both conditions at once makes (x+p)(x+q)(x+p)(x+q) expand back to exactly x2+bx+cx^2+bx+c. Neither condition alone is enough — a pair could sum correctly but multiply to the wrong constant, or vice versa, so both must be checked together before accepting an answer.

Step 4. Once such a pair is found, rewrite the middle term bxbx as the sum px+qxpx+qx (legal since p+q=bp+q=b means px+qx=bxpx+qx=bx), which turns the trinomial into a four-term expression that groups cleanly:

x2+bx+c=x2+px+qx+c=x(x+p)+q(x+p)=(x+p)(x+q)x^2+bx+c=x^2+px+qx+c=x(x+p)+q(x+p)=(x+p)(x+q)

Step 5. This confirms the method: splitting the middle term is nothing but running Step 1 in reverse, using grouping as the mechanical tool to get from four terms back to two brackets.

Worked example

Factorise the trinomial x2+7x+12x^2+7x+12 by splitting the middle term.

Step 1. Identify b=7b=7 and c=12c=12, so we need two numbers p,qp,q with p+q=7p+q=7 and pq=12pq=12.

Step 2. Test factor pairs of 1212: (1,12)(1,12) gives sum 1313; (2,6)(2,6) gives sum 88; (3,4)(3,4) gives sum 77 — matches, and 3×4=123\times4=12 also matches. Both conditions hold for p=3, q=4p=3,\,q=4.

Step 3. Split the middle term 7x7x as 3x+4x3x+4x:

x2+7x+12=x2+3x+4x+12x^2+7x+12=x^2+3x+4x+12

Step 4. Group into pairs and pull the common factor from each: x(x+3)+4(x+3)x(x+3)+4(x+3).

Step 5. Factor out the shared binomial (x+3)(x+3) to reach the final factorisation.

x2+7x+12=(x+3)(x+4)x^2+7x+12=(x+3)(x+4)

Check: (x+3)(x+4)=x2+4x+3x+12=x2+7x+12(x+3)(x+4)=x^2+4x+3x+12=x^2+7x+12 ✓, matching the original expression, so the factorisation is (x+3)(x+4)(x+3)(x+4).

Competitive stretch

The same splitting works when cc is negative, since pp and qq just take opposite signs. For x2+2x−15x^2+2x-15: we need p+q=2p+q=2 and pq=−15pq=-15. The pair 55 and −3-3 works, since 5+(−3)=25+(-3)=2 and 5×(−3)=−155\times(-3)=-15. Splitting gives x2+5x−3x−15=x(x+5)−3(x+5)=(x+5)(x−3)x^2+5x-3x-15=x(x+5)-3(x+5)=(x+5)(x-3), checked by expanding back: x2−3x+5x−15=x2+2x−15x^2-3x+5x-15=x^2+2x-15 ✓.

Common traps

  • Stopping after removing only part of the common factor — e.g. writing 6x2y−9xy2=3(2x2y−3xy2)6x^2y-9xy^2=3(2x^2y-3xy^2) instead of pulling out the full HCF 3xy3xy to get 3xy(2x−3y)3xy(2x-3y).
  • In splitting the middle term, picking a pair that satisfies the sum but not the product (or vice versa) — both conditions must hold together, not just one.
  • Misapplying a2−b2=(a−b)(a+b)a^2-b^2=(a-b)(a+b) to a sum of squares, a2+b2a^2+b^2, which does not factorise this way over ordinary numbers.
  • Forgetting to check the sign of the middle term when choosing between (a+b)2(a+b)^2 and (a−b)2(a-b)^2 for a perfect-square trinomial — a middle term of −2ab-2ab means the answer is (a−b)2(a-b)^2, never (a+b)2(a+b)^2.
  • Attempting to split the middle term of a non-monic trinomial (leading coefficient not 11) using the plain p+q=b, pq=cp+q=b,\,pq=c shortcut — this simple version of the method only works when the coefficient of x2x^2 is exactly 11; a different technique is needed otherwise, and it is outside this chapter.

Ask the tutor: Not sure which method fits an expression you are stuck on, or want more practice splitting the middle term? Ask the AI tutor to walk through extra factorisation problems with you.

How do I decide which of the four factorisation methods to use?

Work through them in order. First check for a common factor across all terms — pulling it out first keeps the remaining numbers smaller. Then check whether what is left matches a standard identity, such as a difference of squares or a perfect-square trinomial. If it is a four-term expression with no obvious identity, try grouping into pairs. If it is a trinomial that is not a perfect square, split the middle term. Practising this checklist on many expressions is what makes the recognition automatic.

Why does splitting the middle term always require both a sum and a product condition?

Because a monic trinomial x2+bx+cx^2+bx+c has two separate pieces of information baked into it — the coefficient bb and the constant cc — and a valid pair of brackets (x+p)(x+q)(x+p)(x+q) must reproduce both at once, since expanding gives x2+(p+q)x+pqx^2+(p+q)x+pq. A pair that only matches the sum but not the product would expand to a different trinomial, so checking both conditions together is not optional caution, it is the actual definition of a correct factor pair.

Can I use splitting the middle term on x squared minus 5x plus 6, where both b and c look different in sign?

Yes — the method does not change with signs, only the search for pp and qq does. Here b=−5b=-5 and c=6c=6, so you need p+q=−5p+q=-5 and pq=6pq=6; both numbers must be negative for the product to be positive and the sum to be negative, and −2,−3-2,-3 works since (−2)+(−3)=−5(-2)+(-3)=-5 and (−2)×(−3)=6(-2)\times(-3)=6. So x2−5x+6=(x−2)(x−3)x^2-5x+6=(x-2)(x-3), which you can check by expanding back out.

Before this

Where this leads