Skip to main content
Mathematics LibreTexts

6.2: Greatest Common Factor and Factor by Grouping

  • Page ID
    114188
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    Learning Objectives

    By the end of this section, you will be able to:

    • Find the greatest common factor of two or more expressions
    • Factor the greatest common factor from a polynomial
    • Factor by grouping
    Be Prepared 6.1

    Before you get started, take this readiness quiz.

    Factor 56 into primes.
    If you missed this problem, review Example 1.2.

    Be Prepared 6.2

    Find the least common multiple (LCM) of 18 and 24.
    If you missed this problem, review Example 1.3.

    Be Prepared 6.3

    Multiply: −3a(7a+8b).−3a(7a+8b).
    If you missed this problem, review Example 5.26.

    Find the Greatest Common Factor of Two or More Expressions

    Earlier we multiplied factors together to get a product. Now, we will reverse this process; we will start with a product and then break it down into its factors. Splitting a product into factors is called factoring.

    8 times 7 is 56. Here 8 and 7 are factors and 56 is the product. An arrow pointing from 8 times 7 to 56 is labeled multiply. An arrow pointing from 56 to 8 times 7 is labeled factor. 2x open parentheses x plus 3 close parentheses equals 2x squared plus 6x. Here the left side of the equation is labeled factors and the right side is labeled products.

    We have learned how to factor numbers to find the least common multiple (LCM) of two or more numbers. Now we will factor expressions and find the greatest common factor of two or more expressions. The method we use is similar to what we used to find the LCM.

    Greatest Common Factor

    The greatest common factor (GCF) of two or more expressions is the largest expression that is a factor of all the expressions.

    We summarize the steps we use to find the greatest common factor.

    How To

    Find the greatest common factor (GCF) of two expressions.

    1. Step 1. Factor each coefficient into primes. Write all variables with exponents in expanded form.
    2. Step 2. List all factors—matching common factors in a column. In each column, circle the common factors.
    3. Step 3. Bring down the common factors that all expressions share.
    4. Step 4. Multiply the factors.

    The next example will show us the steps to find the greatest common factor of three expressions.

    Example 6.1

    Find the greatest common factor of 21x3,9x2,15x.21x3,9x2,15x.

    Answer
    Factor each coefficient into primes and write the
    variables with exponents in expanded form.
    Circle the common factors in each column.
    Bring down the common factors.
    .
    Multiply the factors. .
      The GCF of 21x321x3, 9x29x2 and 15x15x is 3x3x.
    Try It 6.1

    Find the greatest common factor: 25m4,35m3,20m2.25m4,35m3,20m2.

    Try It 6.2

    Find the greatest common factor: 14x3,70x2,105x.14x3,70x2,105x.

    Factor the Greatest Common Factor from a Polynomial

    It is sometimes useful to represent a number as a product of factors, for example, 12 as 2·62·6 or 3·4.3·4. In algebra, it can also be useful to represent a polynomial in factored form. We will start with a product, such as 3x2+15x,3x2+15x, and end with its factors, 3x(x+5).3x(x+5). To do this we apply the Distributive Property “in reverse.”

    We state the Distributive Property here just as you saw it in earlier chapters and “in reverse.”

    Distributive Property

    If a, b, and c are real numbers, then

    a(b+c)=ab+acandab+ac=a(b+c)a(b+c)=ab+acandab+ac=a(b+c)

    The form on the left is used to multiply. The form on the right is used to factor.

    So how do you use the Distributive Property to factor a polynomial? You just find the GCF of all the terms and write the polynomial as a product!

    Example 6.2

    How to Use the Distributive Property to factor a polynomial

    Factor: 8m312m2n+20mn2.8m312m2n+20mn2.

    Answer
    Step 1 is find the GCF of all the terms in the polynomial. GCF of 8 m cubed, 12 m squared n and 20 mn squared is 4m. Step 1 is find the GCF of all the terms in the polynomial. GCF of 8 m cubed, 12 m squared n and 20 mn squared is 4m. In step 3, use the reverse Distributive Property to factor the expression as 4m open parentheses 2 m squared minus 3 mn plus 5 n squared close parentheses. Step 4 is to check by multiplying the factors. By multiplying the factors, we get the original polynomial.
    Try It 6.3

    Factor: 9xy2+6x2y2+21y3.9xy2+6x2y2+21y3.

    Try It 6.4

    Factor: 3p36p2q+9pq3.3p36p2q+9pq3.

    How To

    Factor the greatest common factor from a polynomial.

    1. Step 1. Find the GCF of all the terms of the polynomial.
    2. Step 2. Rewrite each term as a product using the GCF.
    3. Step 3. Use the “reverse” Distributive Property to factor the expression.
    4. Step 4. Check by multiplying the factors.
    Factor as a Noun and a Verb

    We use “factor” as both a noun and a verb:

    Noun:7 is afactorof 14Verb:factor3 from3a+3Noun:7 is afactorof 14Verb:factor3 from3a+3

    Example 6.3

    Factor: 5x325x2.5x325x2.

    Answer
    Find the GCF of 5x35x3 and 25x2.25x2. .
        .
        .
    Rewrite each term.   .
    Factor the GCF.   .
    Check:

    5x2(x5)5x2·x5x2·55x325x25x2(x5)5x2·x5x2·55x325x2
       
    Try It 6.5

    Factor: 2x3+12x2.2x3+12x2.

    Try It 6.6

    Factor: 6y315y2.6y315y2.

    Example 6.4

    Factor: 8x3y10x2y2+12xy3.8x3y10x2y2+12xy3.

    Answer
    The GCF of 8x3y,−10x2y2,and12xy38x3y,−10x2y2,and12xy3
    is 2xy.2xy.
    .
      .
           .
    Rewrite each term using the GCF, 2xy.2xy.       .
    Factor the GCF.      .
    Check:

    2xy(4x25xy+6y2)2xy·4x22xy·5xy+2xy·6y28x3y10x2y2+12xy32xy(4x25xy+6y2)2xy·4x22xy·5xy+2xy·6y28x3y10x2y2+12xy3
     
    Try It 6.7

    Factor: 15x3y3x2y2+6xy3.15x3y3x2y2+6xy3.

    Try It 6.8

    Factor: 8a3b+2a2b26ab3.8a3b+2a2b26ab3.

    When the leading coefficient is negative, we factor the negative out as part of the GCF.

    Example 6.5

    Factor: −4a3+36a28a.−4a3+36a28a.

    Answer

    The leading coefficient is negative, so the GCF will be negative.

      .
    Rewrite each term using the GCF, −4a.−4a. .
    Factor the GCF. .
    Check:

    −4a(a29a+2)−4a·a2(−4a)·9a+(−4a)·2−4a3+36a28a−4a(a29a+2)−4a·a2(−4a)·9a+(−4a)·2−4a3+36a28a
     
    Try It 6.9

    Factor: −4b3+16b28b.−4b3+16b28b.

    Try It 6.10

    Factor: −7a3+21a214a.−7a3+21a214a.

    So far our greatest common factors have been monomials. In the next example, the greatest common factor is a binomial.

    Example 6.6

    Factor: 3y(y+7)4(y+7).3y(y+7)4(y+7).

    Answer

    The GCF is the binomial y+7.y+7.

      .
    Factor the GCF, (y+7).(y+7). .
    Check on your own by multiplying.     
    Try It 6.11

    Factor: 4m(m+3)7(m+3).4m(m+3)7(m+3).

    Try It 6.12

    Factor: 8n(n4)+5(n4).8n(n4)+5(n4).

    Factor by Grouping

    Sometimes there is no common factor of all the terms of a polynomial. When there are four terms we separate the polynomial into two parts with two terms in each part. Then look for the GCF in each part. If the polynomial can be factored, you will find a common factor emerges from both parts. Not all polynomials can be factored. Just like some numbers are prime, some polynomials are prime.

    Example 6.7

    How to Factor a Polynomial by Grouping

    Factor by grouping: xy+3y+2x+6.xy+3y+2x+6.

    Answer
    Step 1 is to group the terms with common factors. There is no greatest common factor in all the four terms of xy plus 3y plus 2x plus 6. So, separate the first two terms from the second two. Step 2 is to factor out the common factor in each group. By factoring the GCF from the first 2 terms, we get y open parentheses x plus 3 close parentheses plus 2x plus 6. Factoring the GCF from the second 2 terms, we get y open parentheses x plus 3 close parentheses plus 2 open parentheses x plus 3 close parentheses. Step 3 is to factor the common factor from the expression. Notice that each term has a common factor of x plus 3. By factoring this out, we get open parentheses x plus 3 close parentheses open parentheses y plus 2 close parentheses Step 4 is to check by multiplying the expressions to get the result xy plus 3y plus 2x plus 6.
    Try It 6.13

    Factor by grouping: xy+8y+3x+24.xy+8y+3x+24.

    Try It 6.14

    Factor by grouping: ab+7b+8a+56.ab+7b+8a+56.

    How To

    Factor by grouping.

    1. Step 1. Group terms with common factors.
    2. Step 2. Factor out the common factor in each group.
    3. Step 3. Factor the common factor from the expression.
    4. Step 4. Check by multiplying the factors.
    Example 6.8

    Factor by grouping: x2+3x2x6x2+3x2x6 6x23x4x+2.6x23x4x+2.

    Answer

    There is no GCF in all four terms. x2+3x2x6x2+3x2x6
    Separate into two parts. x2+3x−2x6x2+3x−2x6
    Factor the GCF from both parts. Be careful with the signs when factoring the GCF from the last two terms. x(x+3)2(x+3)x(x+3)2(x+3)
    Factor out the common factor. (x+3)(x2)(x+3)(x2)
    Check on your own by multiplying.  

    There is no GCF in all four terms. 6x23x4x+26x23x4x+2
    Separate into two parts. 6x23x−4x+26x23x−4x+2
    Factor the GCF from both parts. 3x(2x1)2(2x1)3x(2x1)2(2x1)
    Factor out the common factor. (2x1)(3x2)(2x1)(3x2)
    Check on your own by multiplying.  
    Try It 6.15

    Factor by grouping: x2+2x5x10x2+2x5x10 20x216x15x+12.20x216x15x+12.

    Try It 6.16

    Factor by grouping: y2+4y7y28y2+4y7y28 42m218m35m+15.42m218m35m+15.

    Section 6.1 Exercises

    Practice Makes Perfect

    Find the Greatest Common Factor of Two or More Expressions

    In the following exercises, find the greatest common factor.

    1.

    10 p 3 q , 12 p q 2 10 p 3 q , 12 p q 2

    2.

    8 a 2 b 3 , 10 a b 2 8 a 2 b 3 , 10 a b 2

    3.

    12 m 2 n 3 , 30 m 5 n 3 12 m 2 n 3 , 30 m 5 n 3

    4.

    28 x 2 y 4 , 42 x 4 y 4 28 x 2 y 4 , 42 x 4 y 4

    5.

    10 a 3 , 12 a 2 , 14 a 10 a 3 , 12 a 2 , 14 a

    6.

    20 y 3 , 28 y 2 , 40 y 20 y 3 , 28 y 2 , 40 y

    7.

    35 x 3 y 2 , 10 x 4 y , 5 x 5 y 3 35 x 3 y 2 , 10 x 4 y , 5 x 5 y 3

    8.

    27 p 2 q 3 , 45 p 3 q 4 , 9 p 4 q 3 27 p 2 q 3 , 45 p 3 q 4 , 9 p 4 q 3

    Factor the Greatest Common Factor from a Polynomial

    In the following exercises, factor the greatest common factor from each polynomial.

    9.

    6 m + 9 6 m + 9

    10.

    14 p + 35 14 p + 35

    11.

    9 n 63 9 n 63

    12.

    45 b 18 45 b 18

    13.

    3 x 2 + 6 x 9 3 x 2 + 6 x 9

    14.

    4 y 2 + 8 y 4 4 y 2 + 8 y 4

    15.

    8 p 2 + 4 p + 2 8 p 2 + 4 p + 2

    16.

    10 q 2 + 14 q + 20 10 q 2 + 14 q + 20

    17.

    8 y 3 + 16 y 2 8 y 3 + 16 y 2

    18.

    12 x 3 10 x 12 x 3 10 x

    19.

    5 x 3 15 x 2 + 20 x 5 x 3 15 x 2 + 20 x

    20.

    8 m 2 40 m + 16 8 m 2 40 m + 16

    21.

    24 x 3 12 x 2 + 15 x 24 x 3 12 x 2 + 15 x

    22.

    24 y 3 18 y 2 30 y 24 y 3 18 y 2 30 y

    23.

    12 x y 2 + 18 x 2 y 2 30 y 3 12 x y 2 + 18 x 2 y 2 30 y 3

    24.

    21 p q 2 + 35 p 2 q 2 28 q 3 21 p q 2 + 35 p 2 q 2 28 q 3

    25.

    20 x 3 y 4 x 2 y 2 + 12 x y 3 20 x 3 y 4 x 2 y 2 + 12 x y 3

    26.

    24 a 3 b + 6 a 2 b 2 18 a b 3 24 a 3 b + 6 a 2 b 2 18 a b 3

    27.

    −2 x 4 −2 x 4

    28.

    −3 b + 12 −3 b + 12

    29.

    −2 x 3 + 18 x 2 8 x −2 x 3 + 18 x 2 8 x

    30.

    −5 y 3 + 35 y 2 15 y −5 y 3 + 35 y 2 15 y

    31.

    −4 p 3 q 12 p 2 q 2 + 16 p q 2 −4 p 3 q 12 p 2 q 2 + 16 p q 2

    32.

    −6 a 3 b 12 a 2 b 2 + 18 a b 2 −6 a 3 b 12 a 2 b 2 + 18 a b 2

    33.

    5 x ( x + 1 ) + 3 ( x + 1 ) 5 x ( x + 1 ) + 3 ( x + 1 )

    34.

    2 x ( x 1 ) + 9 ( x 1 ) 2 x ( x 1 ) + 9 ( x 1 )

    35.

    3 b ( b 2 ) 13 ( b 2 ) 3 b ( b 2 ) 13 ( b 2 )

    36.

    6 m ( m 5 ) 7 ( m 5 ) 6 m ( m 5 ) 7 ( m 5 )

    Factor by Grouping

    In the following exercises, factor by grouping.

    37.

    a b + 5 a + 3 b + 15 a b + 5 a + 3 b + 15

    38.

    c d + 6 c + 4 d + 24 c d + 6 c + 4 d + 24

    39.

    8 y 2 + y + 40 y + 5 8 y 2 + y + 40 y + 5

    40.

    6 y 2 + 7 y + 24 y + 28 6 y 2 + 7 y + 24 y + 28

    41.

    u v 9 u + 2 v 18 u v 9 u + 2 v 18

    42.

    p q 10 p + 8 q 80 p q 10 p + 8 q 80

    43.

    u 2 u + 6 u 6 u 2 u + 6 u 6

    44.

    x 2 x + 4 x 4 x 2 x + 4 x 4

    45.

    9 p 2 + 12 p 15 p 20 9 p 2 + 12 p 15 p 20

    46.

    16 q 2 + 20 q 28 q 35 16 q 2 + 20 q 28 q 35

    47.

    m n 6 m 4 n + 24 m n 6 m 4 n + 24

    48.

    r 2 3 r r + 3 r 2 3 r r + 3

    49.

    2 x 2 14 x 5 x + 35 2 x 2 14 x 5 x + 35

    50.

    4 x 2 36 x 3 x + 27 4 x 2 36 x 3 x + 27

    Mixed Practice

    In the following exercises, factor.

    51.

    −18 x y 2 27 x 2 y −18 x y 2 27 x 2 y

    52.

    −4 x 3 y 5 x 2 y 3 + 12 x y 4 −4 x 3 y 5 x 2 y 3 + 12 x y 4

    53.

    3 x 3 7 x 2 + 6 x 14 3 x 3 7 x 2 + 6 x 14

    54.

    x 3 + x 2 + x + 1 x 3 + x 2 + x + 1

    55.

    x 2 + x y + 5 x + 5 y x 2 + x y + 5 x + 5 y

    56.

    5 x 3 3 x 2 + 5 x 3 5 x 3 3 x 2 + 5 x 3

    Writing Exercises

    57.

    What does it mean to say a polynomial is in factored form?

    58.

    How do you check result after factoring a polynomial?

    59.

    The greatest common factor of 36 and 60 is 12. Explain what this means.

    60.

    What is the GCF of y4,y5,y4,y5, and y10?y10? Write a general rule that tells you how to find the GCF of ya,yb,ya,yb, and yc.yc.

    Self Check

    After completing the exercises, use this checklist to evaluate your mastery of the objectives of this section.

    This table has 4 columns, 3 rows and a header row. The header row labels each column I can, confidently, with some help and no I don’t get it. The first column has the following statements: find the greatest common factor of 2 or more expressions, factor the greatest common factor from a polynomial, factor by grouping. The remaining columns are blank.

    If most of your checks were:

    …confidently. Congratulations! You have achieved your goals in this section! Reflect on the study skills you used so that you can continue to use them. What did you do to become confident of your ability to do these things? Be specific!

    …with some help. This must be addressed quickly as topics you do not master become potholes in your road to success. Math is sequential - every topic builds upon previous work. It is important to make sure you have a strong foundation before you move on. Whom can you ask for help?Your fellow classmates and instructor are good resources. Is there a place on campus where math tutors are available? Can your study skills be improved?

    …no - I don’t get it! This is critical and you must not ignore it. You need to get help immediately or you will quickly be overwhelmed. See your instructor as soon as possible to discuss your situation. Together you can come up with a plan to get you the help you need.


    This page titled 6.2: Greatest Common Factor and Factor by Grouping is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by OpenStax via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.