If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Factoring by grouping

Learn about a factorization method called "grouping." For example, we can use grouping to write 2x²+8x+3x+12 as (2x+3)(x+4).

What you need to know for this lesson

Factoring a polynomial involves writing it as a product of two or more polynomials. It reverses the process of polynomial multiplication.
We have seen several examples of factoring already. However, for this article, you should be especially familiar with taking common factors using the distributive property. For example, 6x2+4x=2x(3x+2) .

What you will learn in this lesson

In this article, we will learn how to use a factoring method called grouping.

Example 1: Factoring 2x2+8x+3x+12

First, notice that there is no factor common to all terms in 2x2+8x+3x+12. However, if we group the first two terms together and the last two terms together, each group has its own GCF, or greatest common factor:
(2x2+8x)first grouping+(3x+12)second grouping
In particular, there is a GCF of 2x in the first grouping and a GCF of 3 in the second grouping. We can factor these out to obtain the following expression:
2x(x+4)+3(x+4)
Notice that this reveals yet another common factor between the two terms: x+4. We can use the distributive property to factor out this common factor.
2x(x+4)+3(x+4)=(x+4)(2x+3)
Since the polynomial is now expressed as a product of two binomials, it is in factored form. We can check our work by multiplying and comparing it to the original polynomial.

Example 2: Factoring 3x2+6x+4x+8

Let's summarize what was done above by factoring another polynomial.
=3x2+6x+4x+8=(3x2+6x)+(4x+8)Group terms=3x(x+2)+4(x+2)Factor out GCFs=3x(x+2)+4(x+2)Common factor!=(x+2)(3x+4)Factor out x+2
The factored form is (x+2)(3x+4).

Check your understanding

1) Factor 9x2+6x+12x+8.
Choose 1 answer:

2) Factor 5x2+10x+2x+4.

3) Factor 8x2+6x+4x+3.

Example 3: Factoring 3x26x4x+8

Extra care should be taken when using the grouping method to factor a polynomial with negative coefficients.
For example, the steps below can be used to factor 3x26x4x+8.
0=3x26x4x+8(1)=(3x26x)+(4x+8)Group terms(2)=3x(x2)+(4)(x2)Factor out GCFs(3)=3x(x2)4(x2)Simplify(4)=3x(x2)4(x2)Common factor!(5)=(x2)(3x4)Factor out x2
The factored form of the polynomial is (x2)(3x4). We can multiply the binomials to check our work.
A few of the steps above may seem different than what you saw in the first example, so you may have a few questions.
Where did the "+" sign between the groupings come from?
In step (1), a "+" sign was added between the groupings (3x26x) and (4x+8). This is because the third term (4x) is negative, and the sign of the term must be included within the grouping.
Keeping the minus sign outside the second grouping is tricky. For example, a common error is to group 3x26x4x+8 as (3x26x)(4x+8). This grouping, however, simplifies to 3x26x4x8, which is not the same as the original expression.
Why factor out 4 instead of 4?
In step (2), we factored out a 4 to reveal a common factor of (x2) between the terms. If we instead factored out a positive 4, we would not obtain that common binomial factor seen above:
(3x26x)+(4x+8)=3x(x2)+4(x+2)
When the leading term in a group is negative, we will often need to factor out a negative common factor.

Check your understanding

4) Factor 2x23x4x+6.
Choose 1 answer:

5) Factor 3x2+3x10x10.

6) Factor 3x2+6xx2.

Challenge problem

7*) Factor 2x3+10x2+3x+15.

When can we use the grouping method?

The grouping method can be used to factor polynomials whenever a common factor exists between the groupings.
For example, we can use the grouping method to factor 3x2+9x+2x+6 since it can be written as follows:
(3x2+9x)+(2x+6)=3x(x+3)+2(x+3)
We cannot, however, use the grouping method to factor 2x2+3x+4x+12 because factoring out the GCF from both groupings does not yield a common factor!
(2x2+3x)+(4x+12)=x(2x+3)+4(x+3)

Using grouping to factor trinomials

You can also use grouping to factor certain three termed quadratics (i.e. trinomials) like 2x2+7x+3. This is because we can rewrite the expression as follows:
2x2+7x+3=2x2+1x+6x+3
Then we can use grouping to factor 2x2+1x+6x+3 as (x+3)(2x+1).
For more on factoring quadratic trinomials like these using the grouping method, check out our next article.

Want to join the conversation?

  • duskpin tree style avatar for user Nin
    This may sound a bit dumb, but is there any significant difference between factoring, grouping trinomials, difference of squares, and GCF?
    (40 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user daleighellison
    How would you work out the problem if there were only 3 terms?
    (16 votes)
    Default Khan Academy avatar avatar for user
    • primosaur seed style avatar for user Ian Pulizzotto
      Find two numbers that add to the middle coefficient and multiply to give the product of the first and last coefficients (or constants). This is called the ac method.

      Example: Factor 6x^2 + 19x + 10.
      6*10 = 60, so we need to find two numbers that add to 19 and multiply to give 60. These numbers (after some trial and error) are 15 and 4. So split up 19x into 15x + 4x (or 4x + 15x), then factor by grouping:

      6x^2 + 19x + 10 = 6x^2 + 15x + 4x + 10
      = 3x(2x + 5) + 2(2x + 5)
      = (3x + 2)(2x + 5).

      Have a blessed, wonderful day!
      (76 votes)
  • female robot grace style avatar for user rama
    what the meaning of GCF?
    (2 votes)
    Default Khan Academy avatar avatar for user
  • purple pi purple style avatar for user louisaandgreta
    Why are they called quadratics? They are typically trinomials with a leading term raised to the second degree.
    (2 votes)
    Default Khan Academy avatar avatar for user
    • stelly yellow style avatar for user lemonomadic
      Quadratics actually are derived from the Latin word, 'quadratum', which literally means 'square'.
      A quadratic is basically a type of problem that deals with a variable multiplied by itself — an operation known as squaring.
      So, you could relate the word quadratic to Latin, not mathematics
      (18 votes)
  • leaf blue style avatar for user Seraj shaheen
    Wow I got this better than how I learned it in school thanks Sal!
    (8 votes)
    Default Khan Academy avatar avatar for user
  • male robot donald style avatar for user Dannon Foster
    Lets say there is no GCF in anything. Then What?
    (3 votes)
    Default Khan Academy avatar avatar for user
    • duskpin ultimate style avatar for user AuroraAlberts
      There is always a GCF, it just depends on how many there are.
      Take 8 and 6, the factors of those two numbers are 1 and 2.
      2 is bigger, so the GCF of 8 and 6 is 2.
      That works the same with every other set of numbers.

      Let's take 4 and 3.
      The factors of 3 are 1,3
      The factors of 4 are 1,2,4

      The only common factor here is 1, so 1 is the GCF of 4 and 3!

      So to answer your question, if you can't find the greatest common factor of two numbers, it's 1.
      (8 votes)
  • primosaur seed style avatar for user Hafsa Mohamed
    In problem 3, I solved the expression and got the answer (4x+2)(2x+1.5). It said my answer was correct, but when I checked my answer, I got the same expression. What did I do wrong?
    (6 votes)
    Default Khan Academy avatar avatar for user
  • piceratops seedling style avatar for user Altangerel Chinzorig
    Why does it say we cannot use grouping on this one 2x^2+3x+4x+12. It is usable though isn't it? Answer would be (x+2)(2x+3) right?
    (1 vote)
    Default Khan Academy avatar avatar for user
    • stelly blue style avatar for user Kim Seidel
      Your factors actually don't create the polynomial. If you multiply your factors, you will get: 2x^2+3x+4x+6, which does not match the original polynomial.

      Now, how do you know if isn't working before checking the factors by multiplying them.

      Pull the GCF from each pair of terms to get:
      2x^2+3x+4x+12 = x(2x+3) + 4(x+3)

      Notice, the 2 binomials in parentheses do not match. To go to factors from this point, we need to remove a common binomial factor from each term. There is no common binomial factor. This tells use that the polynomial is not factorable.

      Hope this helps.
      (11 votes)
  • blobby green style avatar for user tarasandbeck
    Hi Professor,
    Why dont you use the formula Ax^2+Bx-C where A*C=a*b AND B=a+b ? It helps me to learn it this way, since it opens up for future equations that take the square of A and C.
    (6 votes)
    Default Khan Academy avatar avatar for user
    • primosaur ultimate style avatar for user Gonzalo Sandmeier
      Hello! That's a great observation and method for understanding quadratic equations. The formula you mentioned, Ax^2 + Bx - C = 0, certainly has its benefits. It's a quadratic formula derived from completing the square.

      The quadratic formula you provided, where A*C = a*b and B = a + b, can be derived by equating the quadratic equation, ax^2 + bx + c = 0, with this particular form. By assuming that the equation has real roots, and then manipulating it further, you'll eventually arrive at the given formula.

      The advantage of using this form is that it allows you to see the connection between the quadratic equation and the coefficients A, B, and C. For example, you can notice the relationship between A and C and A^2 and C^2. This approach can be helpful for understanding various properties and relationships between the coefficients.

      In the end, both the traditional quadratic formula (-b ± √(b^2 - 4ac))/(2a) and the form you mentioned are mathematically equivalent. Using either form is a matter of personal preference and what you find most intuitive. It's great that you have found a method that helps you learn and understand quadratic equations better.
      (2 votes)
  • purple pi teal style avatar for user Joshua Zanetta
    I'm getting this!
    (5 votes)
    Default Khan Academy avatar avatar for user