Factoring by Grouping

Reverse FOIL for Quadratics

The acronym FOIL provides a reminder for how to expand the product of two binomials (sum of two terms), say \(A+B\) times \(C+D\). The acronym reminds us to multiply the First terms, the Outer terms, the Inner terms, and the Last terms and then add the results: \[(A+B)(C+D) = AC + AD + BC + BD.\]

As we are interested in using FOIL in reverse to factor a quadratic, let us consider multiplying out something that is already factored so that we know what to look for: \[(x+a)(x+b) = x^2 + bx + ax + ab = x^2 + (a+b)x + ab.\] So Reverse FOIL is to look at a quadratic that will be of the form \(x^2+cx+d\) and try to identify two numbers \(a\) and \(b\) so that \(ab=d\) and \(a+b=c\). That is, we are going to rewrite the term \(cx\) as \(ax+bx\) and then factor.

Example: Factor \(x^2-5x+6\).

We begin by rewriting this as a pure sum, \(x^2+-5x+6\). In the language of symbols above, we have \(c=-5\) and \(d=6\) (although using such names is not necessary). We are looking for factors of 6, call them \(a\) and \(b\) that add to -5. Since \(ab=6\) is positive, \(a\) and \(b\) must have the same sign. Since they add to \(a+b=-5\), they must both be negative.

The ways to factor 6 with negative factors are \(6=-1 \cdot -6 = -2 \cdot -3\). We see that \(-2 \cdot -3 = 6\) and \(-2+-3=-5\). This means that we can rewrite our original quadratics as \[ x^2-5x+6 = x^2+-2x + -3x + 6. \] We now perform a grouping of terms, factoring out the common factors: \[ (x^2+-2x) + (-3x+6) = x(x+-2) + -3(x+-2) = (x+-2)(x+-3). \] This gives us our final factorization, \[ x^2-5x+6 = (x-2)(x-3). \]

Example: Factor \(x^2-3x-10\).

As a pure sum, we are factoring \(x^2+-3x+-10\). The strategy of Reverse FOIL tells us to look for factors of -10 whose sum is -3, \(ab=-10\) and \(a+b=-3\). Because \(ab\) is negative, the numbers \(a\) and \(b\) have opposite signs. So when we look at factors of -10, we need to consider both sign possibilities: \[-10 = -1 \cdot 10 = -2 \cdot 5 = -5 \cdot 2 = -10 \cdot 1.\] (Because the sum \(a+b=-3\) is negative, it is possible to focus only on factors where the larger magnitude factor is negative, but thinking through this may not be worth the effort.) We see that the appropriate factors of -10 whose sum is -3 are 2 and -5, allowing us to regroup and factor: \[ \begin{align*} x^2-3x-10 &= x^2+2x+-5x+-10 = x(x+2) + -5(x+2) \\ &= (x+2)(x+-5) = (x+2)(x-5) \end{align*} \]

Example: Factor \(x^2-7x-12\).

As a pure sum, we are factoring \(x^2+-7x+-12\). The strategy of Reverse FOIL tells us to look for factors of -12 whose sum is -7, \(ab=-12\) and \(a+b=-7\). Because \(ab\) is negative, the numbers \(a\) and \(b\) must be opposite sign. \[ -12 = -1 \cdot 12 = -2 \cdot 6 = -3 \cdot 4 = -4 \cdot 3 = -6 \cdot 2 = -12 \cdot 1\] This time, none of the sums of factors equals -7. This means that a factorization over integers is not possible. There is a way to factor this, but it requires the quadratic formula.

Suppose we solve the quadratic equation, \(ax^2+bx+c=0\), using the quadratic formula, \[ x = \frac{-b \pm \sqrt{b^2-4ac}}{2a}.\] If we label the two solution \(r_1\) and \(r_2\), then the factorization will be \[ ax^2+bx+c = a(x-r_1)(x-r_2). \] For our problem, \(a=1\), \(b=-7\) and \(c=-12\). So our two roots are \[ x = \frac{7 \pm \sqrt{97}}{2}. \] The factorization will be \[ x^2-7x-12 = (x - \frac{7 - \sqrt{97}}{2})(x-\frac{7+\sqrt{97}}{2}). \]

The more general problem for factoring a quadratic is to factor an expression that also has a coefficient on the \(x^2\) term. The typical starting point using FOIL is a product of the form \[(ax+b)(cx+d) = (ac)x^2 + (ad+bc)x + (bd).\] That is, we need to find four numbers \(a\), \(b\), \(c\) and \(d\) so that the quadratic \(Ax^2+Bx+C\) can be matched to \(ac=A\), \(ad+bc=B\) and \(bd=C\). To keep your life simpler, you should always factor out any common factors from the coefficients \(A\), \(B\) and \(C\) before proceeding.

While judicious guessing can sometimes help you find the answer quickly, there is a strategy that will find the integer solutions, if such exists. The idea is to multiply the coefficients \(A\) and \(C\), and use the integer factors of \(AC\) to find the values of products \(ad\) and \(bc\) so that \(ad \cdot bc = AC\) and \(ad+bc=B\). If we expand the term \(Bx\) to \(adx+bcx\), then factoring by grouping will finish the problem.

Example: Factor \(3x^2-7x-20\).

As a sum, we are factoring \(3x^2+-7x+-20\). We multiply the coefficients \(A=3\) and \(C=-20\) to get \(AC=-60\). We want to find factors of -60 that sum to -7. After a short search, you should find that \(-12 \cdot 5 = -60\) and \(-12+5=-7\). This allows us to rewrite our quadratic as four terms that can be grouped and factored: \[ \begin{align*} 3x^2-7x-20 &= 3x^2 + -12x + 5x - 20 = 3x(x+-4) + 5(x+-4) \\ &= (3x+5)(x-4) \end{align*} \]

Factoring Cubics by Grouping

A cubic polynomial is a polynomial with \(x^3\) as the highest power. There are no general strategies for factoring a cubic polynomial, but sometimes the cubic is already organized to be conveniently factored using grouping. This occurs if you can group the \(x^3\) and \(x^2\) terms and factor out common factors, and then group the \(x\) and constant terms and factor out common factors. If these two groups share the same common factors, then we factor one more time. Otherwise, this strategy didn't pan out.

Example: Factor \(x^3 - 3x^2 + 6x - 18\).

When we group the terms and factor common factors, we find \[ \begin{align*} x^3 - 3x^2 + 6x - 18 &= (x^3 + -3x^2) + (6x+-18) = x^2(x+-3) + 6(x+-3) \\ &= (x+-3)(x^2+6) = (x-3)(x^2+6). \end{align*} \]

Go back to the table of contents.