Skip to main content
Mathematics LibreTexts

5.1: Greatest Common Factor

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

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

    \( \newcommand{\dsum}{\displaystyle\sum\limits} \)

    \( \newcommand{\dint}{\displaystyle\int\limits} \)

    \( \newcommand{\dlim}{\displaystyle\lim\limits} \)

    \( \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{\longvect}{\overrightarrow}\)

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

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    Find the Greatest Common Factor of Two or More Expressions

    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.

    In Arithmetic, we 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.

    Definition: 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.

    Example \(\PageIndex{1}\)

    Find the greatest common factor of \(21x^3,\space 9x^2,\space 15x\).

    Solution
    The greatest number that divides into each of the constants is \( 3 \). Moreover, each expression has a factor of \( x \). The lowest such power of \( x \) common to all of these expressions is the first power, or \( x^1 = x \). Thus, the GCF is \( 3x \).
     
    Checkpoint \(\PageIndex{1}\)

    Find the greatest common factor: \(25m^4,\space 35m^3,\space 20m^2.\)

    Answer

    \(5m^2\)

    Factor the Greatest Common Factor from a Polynomial

    Factoring from a polynomial is essentially the Distributive Property "in reverse." We state the Distributive Property here just as you saw it your Algebra course.

    Axiom: Distributive Property

    If \( a \), \( b \), and \( c \) are real numbers, then\[a(b+c)=ab+ac \quad \text{and} \quad ab+ac=a(b+c).\nonumber\]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 \(\PageIndex{2}\): Use the Distributive Property to Factor the GCF from a Polynomial

    Factor: \(8m^3−12m^2n+20mn^2\).

    Solution

    As before, we start by considering the constant coefficients of each term - \( 8 \), \( -12 \), and \( 20 \). The greatest number that divides into each of these is \( 4 \). Hence,\[ 8m^3−12m^2n+20mn^2 = 4\left( \dfrac{8}{4}m^3−\dfrac{12}{4}m^2n+\dfrac{20}{4}mn^2 \right) = 4\left( 2m^3 - 3m^2 n + 5 mn^2 \right). \nonumber \]Notice that we "divided out" the factor of \( 4 \). This is essentially what factoring is - the opposite of distribution, which is multiplication.

    We now focus on the variable expressions. The polynomial has two such expressions - \( m \) and \( n \). \( m \) exists in all three terms of the polynomial. The lowest occurring power of \( m \) is the first power, so we will factor out \( m^1 = m \).\[ \begin{array}{rclcl}
    4\left( 2m^3 - 3m^2 n + 5 mn^2 \right) & = & 4m\left( \dfrac{2m^3}{m} - \dfrac{3m^2 n}{m} + \dfrac{5 mn^2}{m} \right) & \quad & \left( \text{dividing out a power of }m \right) \\[6pt]
    & = & 4m\left( \dfrac{2 m \cdot m^2}{m} - \dfrac{3m \cdot m n}{m} + \dfrac{5 mn^2}{m} \right) & \quad & \left( \text{Laws of Exponents} \right) \\[6pt]
    & = & 4m\left( \dfrac{2 \cancel{m} \cdot m^2}{\cancel{m}} - \dfrac{3 \cancel{m} \cdot m n}{\cancel{m}} + \dfrac{5 \cancel{m} n^2}{\cancel{m}} \right) & \quad & \left( \text{canceling like factors} \right) \\[6pt]
    & = & 4m\left( 2m^2 - 3m n + 5 n^2 \right) & \quad & \left( \text{simplifying} \right) \\[6pt]
    \end{array} \nonumber \]Finally, we check the variable expression \( n \). Since not all terms have a power of \( n \), we do not try to factor out a power of \( n \). After factoring out the GCF, we have\[ 8m^3−12m^2n+20mn^2 = 4m\left( 2m^2 - 3m n + 5 n^2 \right). \nonumber \]

    Checkpoint \(\PageIndex{2}\)

    Factor: \(9xy^2+6x^2y^2+21y^3\).

    Answer

    \(3y^2(3x+2x^2+7y)\)

    As an aside, we use "factor" as both a noun and a verb:\[\begin{array} {ll} \text{Noun:} &\hspace{50mm} 7 \text{ is a factor of }14 \\[6pt] \text{Verb:} &\hspace{50mm} \text{factor }3 \text{ from }3a+3\end{array}\nonumber\]

    Example \(\PageIndex{3}\)

    Factor: \(5x^3−25x^2\).

    Solution
    Both coefficients are divisble by \( 5 \) and both terms have a power of \( x \). The lowest such occurring power is \( 2 \). Hence, \( x^2 \) can be factored out of the expression. Let's try this factoring all at once.\[ \begin{array}{rclcl}
    5x^3 - 25x^2 & = & 5x^2\left( \dfrac{5x^3}{5x^2} - \dfrac{25 x^2}{5x^2} \right) & \quad & \left( \text{dividing out }5x^2 \right) \\[6pt]
    & = & 5x^2\left( \dfrac{5x^2 \cdot x}{5x^2} - \dfrac{5 \cdot 5 x^2}{5x^2} \right) &  &  \\[6pt]
    & = & 5x^2\left( \dfrac{\cancel{5x^2} \cdot x}{\cancel{5x^2}} - \dfrac{5 \cdot \cancel{5 x^2}}{\cancel{5x^2}} \right) & \quad & \left( \text{canceling like factors in each term} \right) \\[6pt]
    & = & 5x^2\left( x - 5 \right) & & \\[6pt]
    \end{array} \nonumber \]
    Checkpoint \(\PageIndex{3}\)

    Factor: \(2x^3+12x^2\).

    Answer

    \(2x^2(x+6)\)

    Example \(\PageIndex{4}\)

    Factor: \(8x^3y−10x^2y^2+12xy^3\).

    Solution
    Each of the coefficients is divisble by \( 2 \) (and they don't have a greater common factor). Moreover, all terms have both \( x \) and \( y \). The lowest occurring power on \( x \) is the first power, so we will factor out \( x^1 = x \). Likewise, the lowest occurring power on \( y \) is the first power, so we factor out \( y^1 = y \). This time, we speed up our work by not justifying each step.\[ \begin{array}{rcl}
    8x^3y−10x^2y^2+12xy^3 & = & 2xy \left(\dfrac{8x^3y}{2xy}−\dfrac{10x^2y^2}{2xy}+\dfrac{12xy^3}{2xy} \right) \\[6pt]
    & = & 2xy \left(4x^2−5xy+6y^2 \right) \\[6pt]
    \end{array} \nonumber \]
    Checkpoint \(\PageIndex{4}\)

    Factor: \(15x^3y−3x^2y^2+6xy^3\).

    Answer

    \(3xy(5x^2−xy+2y^2)\)

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

    Example \(\PageIndex{5}\)

    Factor: \(−4a^3+36a^2−8a\).

    Solution

    The leading coefficient is negative, so the GCF will be negative.\[ \begin{array}{rcl}
    −4a^3+36a^2−8a & = & −4a\left(\dfrac{-4a^3}{-4a}+\dfrac{36a^2}{-4a}−\dfrac{8a}{-4a}\right)  \\[6pt]
    & = & −4a\left(a^2+\left(-9a\right)−\left(-2\right)\right)  \\[6pt]
    & = & −4a\left(a^2-9a+2\right)  \\[6pt]
    \end{array} \nonumber \]

    Be careful when factoring out negative factors. The signs of each of the terms should switch. 

    Checkpoint \(\PageIndex{5}\)

    Factor: \(−4b^3+16b^2−8b\).

    Answer

    \(−4b(b^2−4b+2)\)

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

    Example \(\PageIndex{6}\)

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

    Solution

    Since both terms have the common expression \( (y + 7) \), the GCF is the binomial \(y+7\). Otherwise, the factoring process is identical to what we have been doing all along.\[ \begin{array}{rclcl}
    3y(y+7)−4(y+7) & = & 3 \left( y + 7 \right)\left( \dfrac{3y(y+7)}{(y + 7)} − \dfrac{4(y+7)}{(y + 7)} \right) & \quad & \left( \text{dividing out }(y + 7) \right) \\[6pt]
    & = & 3 \left( y + 7 \right)\left( \dfrac{3y \cancel{(y+7)}}{\cancel{(y + 7)}} − \dfrac{4\cancel{(y+7)}}{\cancel{(y + 7)}} \right) & \quad & \left( \text{canceling like factors} \right) \\[6pt]
    & = & 3 \left( y + 7 \right)\left( 3y − 4 \right) & \quad & \left( \text{simplifying} \right) \\[6pt]
    \end{array} \nonumber \]

    Checkpoint \(\PageIndex{6}\)

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

    Answer

    \((m+3)(4m−7)\)


    This page titled 5.1: Greatest Common Factor is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Roy Simpson, Cosumnes River College via source content that was edited to the style and standards of the LibreTexts platform.