Factoring a trinomial using decomposition

Factoring a trinomial such as 5x^2-12x-9 can be tricky. There are several techniques, including inspection, using a grid, and decomposition – also known as ‘splitting the middle’. This page gives some examples of the decomposition technique.

Review when a=1: x^2+bx+c

Let’s expand (x+3)(x+4):

    \begin{align*}&(x+3)(x+4)\\[10pt]=&x^2+4x+3x+12\\[10pt]=&x^2+7x+12 \end{align*}

We notice that 4+3 gives us the 7; and that 4\times3 gives us the constant 12.

To factor a trinomial of the form x^2+bx+c, we need two values p,q such that p+q=b and p\times q=c.

Click here to review factoring x^2+bx+c.

Factor ax^2+bx+c, where a\ne1

To factor a trinomial where a\ne1 we need p+q=b and p\times q=a\times c.

First, let’s examine the expansion of a factored trinomial of this form:


This time, notice that 15+2=17 as expected, but 15 \times 2 \ne 10. Rather, 15\times 2 = 30.

Instead of looking for two numbers that add to 17 and multiply to 10, we need to look for two numbers that add to 17 and multiply to 30.

Example 1:



Look for two numbers, p and q, such that p+q=22 and p\times q = 5 \times 8=40.
The factor pairs of 40 are: (1,40); (2,20); (4,10); (5, 8)

To make 22, we need to use the pair (2,20).

We write a new line of work:


(It doesn’t matter if you write the 20x first or the 2x first).

Now we look for a common factor in the first two terms:


Perhaps suprisingly, (explained here), let’s look at the last two terms;


Ha! (x+4) is a common factor! Put together we have:


Taking out (x+4) as a common factor, we have:


Example 2:


Find two numbers, p and q such that p+q=-5 and p \times q = 4\times -6 = -24.

Factor pairs of 24 are (1,24); (2,12); (3,8); (4,6). Now 3-8=-5 so let p=3 and q=-8.

Splitting the middle term with 3 and -8 we have:


Grouping we have:


Completing we have


Example 3:


First, we notice that all three terms share a common factor 3. Let’s factor this out:


Now we factor the reduced trinomial 2x^2+9x+4; however the 3 is kept present throughout. You might also try factoring without reducing to see how the result compares.

Now we look for p and q such that p+q=9, and p \times q = 2 \times 4 = 8.

Factor pairs of 8 are (1, 8); (2, 4). To satisfy p+q=9, we need to use p=1 and q=8.

Splitting the middle term we have


Grouping gives


Completing we have


Try it out

With help – use the first applet below. No help? Use the second applet.

Correct fields show as green, incorrect as red.

applet link,

applet link

Why method works

Done here! go back to Number and Algebra menu