Skip to main content
Mathematics LibreTexts

12.2.2: Factoring- Special Cases

  • Page ID
    69581
  • \( \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}}} \)

    \(\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}\)
    Learning Objectives
    • Factor trinomials that are perfect squares.
    • Factor binomials in the form of the difference of squares.

    Introduction

    One of the keys to factoring is finding patterns between the trinomial and the factors of the trinomial. Learning to recognize a few common polynomial types will lessen the amount of time it takes to factor them. Knowing the characteristic patterns of special products, trinomials that come from squaring binomials, for example, provides a shortcut to finding their factors.

    Perfect Squares

    Perfect squares are numbers that are the result of a whole number multiplied by itself or squared. For example 1, 4, 9, 16, 25, 36, 49, 64, 81, and 100 are all perfect squares; they come from squaring each of the numbers from 1 to 10. Notice that these perfect squares can also come from squaring the negative numbers from -1 to -10, as \(\ (-1)(-1)=1\), \(\ (-2)(-2)=4\), \(\ (-3)(-3)=9\), and so on.

    A perfect square trinomial is a trinomial that is the result of a binomial multiplied by itself or squared. For example, \(\ (x+3)^{2}=(x+3)(x+3)=x^{2}+6 x+9\). The trinomial \(\ x^{2}+6 x+9\) is a perfect square trinomial. Let’s factor this trinomial using the methods you have already seen.

    Example

    Factor \(\ x^{2}+6 x+9\).

    Solution

    \(\ x^{2}+3 x+3 x+9\) Rewrite \(\ 6x\) as \(\ 3 x+3 x\), as \(\ 3 \cdot 3=9\), the last term, and \(\ 3+3=6\), the middle term.
    \(\ \left(x^{2}+3 x\right)+(3 x+9)\) Group pairs of terms.
    \(\ x(x+3)+3(x+3)\) Factor \(\ x\) out of the first pair, and factor 3 out of the second pair.
    \(\ \begin{array}{r}
    (x+3)(x+3) \\
    \text { or }(x+3)^{2}
    \end{array}\)

    Factor out \(\ x+3\).

    \(\ (x+3)(x+3)\) can also be written as \(\ (x+3)^{2}\).

    \(\ (x+3)(x+3) \text { or }(x+3)^{2}\)

    Notice that in the trinomial \(\ x^{2}+6 x+9\), the \(\ a\) and \(\ c\) terms are each a perfect square, as \(\ x^{2}=x \cdot x\), and \(\ 9=3 \cdot 3\). Also the middle term is twice the product of the \(\ x\) and 3 terms, \(\ 2(3) x=6 x\).

    Let’s consider a slightly different example next. The above example shows how \(\ (x+3)^{2}=x^{2}+6 x+9\). What do you suppose \(\ (x-3)^{2}\) equals? Using what you know about multiplying binomials, you see the following.

    \(\ \begin{array}{l}
    (x-3)^{2} \\
    (x-3)(x-3) \\
    x^{2}-3 x-3 x+9 \\
    x^{2}-6 x+9
    \end{array}\)

    Notice that \(\ (x+3)^{2}=x^{2}+6 x+9\) and \(\ (x-3)^{2}=x^{2}-6 x+9\)! Here, 9 can be written as \(\ (-3)^{2}\), so the middle term is \(\ 2(-3) x=-6 x\). So when the sign of the middle term is negative, the trinomial may be factored as \(\ (a-b)^{2}\).

    Let’s try one more example: \(\ 9 x^{2}-24 x+16\). Notice that \(\ 9 x^{2}\) is a perfect square, as \(\ (3 x)^{2}=9 x^{2}\) and that 16 is a perfect square, as \(\ 4^{2}=16\). However, the middle term, \(\ -24 x\) is negative, so try \(\ 16=(-4)^{2}\). In this case, the middle term is \(\ 2(3 x)(-4)=-24 x\). So the trinomial \(\ 9 x^{2}-24 x+16\) is a perfect square and factors as \(\ (3 x-4)^{2}\).

    You can also continue to factor using grouping as shown below.

    Example

    Factor \(\ 9 x^{2}-24 x+16\).

    Solution

    \(\ 9 x^{2}-12 x-12 x+16\) Rewrite \(\ -24 x\) as \(\ -12 x-12 x\)
    \(\ \left(9 x^{2}-12 x\right)+(-12 x+16)\) Group pairs of terms. (Keep the negative sign with the 12.)
    \(\ 3 x(3 x-4)-4(3 x-4)\) Factor \(\ 3x\) out of the first group, and factor out -4 from the second group.
    \(\ \begin{array}{r}
    (3 x-4)(3 x-4) \\
    \text { or }(3 x-4)^{2}
    \end{array}\)

    Factor out \(\ (3 x-4)\).

    \(\ (3 x-4)(3 x-4)\) can also be written as \(\ (3 x-4)^{2}\).

    \(\ (3 x-4)^{2}\)

    Notice that if you had factored out 4 rather than -4, the \(\ 3 x-4\) factor would have been \(\ -3 x+4\), which is the opposite of \(\ 3 x-4\). By factoring out the -4, the factors from the grouping come out the same, both as \(\ 3 x-4\). We need that to happen if we are going to pull a common grouping factor out for our next step.

    The pattern for factoring perfect square trinomials lead to this general rule.

    Perfect Square Trinomials

    A trinomial in the form \(\ a^{2}+2 a b+b^{2}\) can be factored as \(\ (a+b)^{2}\).

    A trinomial in the form \(\ a^{2}-2 a b+b^{2}\) can be factored as \(\ (a-b)^{2}\).

    Examples:

    The factored form of \(\ 4 x^{2}+20 x+25\) is \(\ (2 x+5)^{2}\).

    The factored form of \(\ x^{2}-10 x+25\) is \(\ (x-5)^{2}\).

    Let’s factor a trinomial using the rule above. Once you have determined that the trinomial is indeed a perfect square, the rest is easy. Notice that the \(\ c\) term is always positive in a perfect trinomial square.

    Example

    Factor \(\ x^{2}-14 x+49\).

    Solution

    \(\ x^{2}-14 x+49\) Determine if this is a perfect square trinomial. The first term is a square, as \(\ x^{2}=x \cdot x\). The last term is a square as \(\ 7 \cdot 7=49\). Also \(\ -7 \cdot-7=49\).
    \(\ -14 x=-7 x+-7 x\) So, \(\ a=x\) and \(\ b=7\) or -7. The middle term is \(\ -2 a b\) if we use \(\ b=7\), because \(\ -2 x \cdot 7=-14 x\). It is a perfect square trinomial.
    \(\ (x-7)^{2}\) Factor as \(\ (a-b)^{2}\).

    \(\ (x-7)^{2}\)

    You can, and should, always multiply to check the answer. \(\ (x-7)^{2}=(x-7)(x-7)=x^{2}-7 x-7 x+49=x^{2}-14 x+49\).

    Exercise

    Factor \(\ x^{2}-12 x+36\).

    1. \(\ (x-4)(x-9)\)
    2. \(\ (x+6)^{2}\)
    3. \(\ (x-6)^{2}\)
    4. \(\ (x+6)(x-6)\)
    Answer
    1. Incorrect. While \(\ -4 \cdot(-9)\) gives the constant term 36, the middle term would be \(\ -13 x\) rather than \(\ -12 x\). The correct answer is \(\ (x-6)^{2}\).
    2. Incorrect. While \(\ 6^{2}\) is 36, the middle term in the original polynomial is negative, so you must subtract in the binomial you square. The correct answer is \(\ (x-6)^{2}\).
    3. Correct. This is a perfect square trinomial \(\ a^{2}-2 a b+b^{2}\) where \(\ a=x\) and \(\ b=6\). The factored form is \(\ (a-b)^{2}\), or \(\ (x-6)^{2}\).
    4. Incorrect. This is a perfect square trinomial \(\ a^{2}-2 a b+b^{2}\) where \(\ a=x\) and \(\ b=6\), so the factored form is \(\ (a-b)^{2}\), or \(\ (x-6)^{2}\). Notice that if you expand \(\ (x+6)(x-6)\), you get \(\ x^{2}+6 x-6 x-36\). The 36 is subtracted rather than added, and the \(\ 6 x-6 x\) gives a middle term of 0 (that is, no middle term at all).

    Factoring a Difference of Squares

    The difference of two squares, \(\ a^{2}-b^{2}\), is also a special product that factors into the product of two binomials.

    Let’s factor \(\ 9 x^{2}-4\) by writing it as a trinomial, \(\ 9 x^{2}+0 x-4\). Now you can factor this trinomial just as you have been doing.

    \(\ 9 x^{2}+0 x-4\) fits the standard form of a trinomial, \(\ a x^{2}+b x+c\). Let’s factor this trinomial the same way you would any other trinomial. Find the factors of \(\ a c(9 \cdot-4=-36)\) whose sum is \(\ b\), in this case, 0.

    Factors of -36 Sum of the factors
    \(\ 1 \cdot-36=-36\) \(\ 1+(-36)-35\)
    \(\ 2 \cdot-18=-36\) \(\ 2+(-18)=-16\)
    \(\ 3 \cdot-12=-36\) \(\ 3+(-12)=-9\)
    \(\ 4 \cdot-9=-36\) \(\ 4+(-9)=-5\)
    \(\ 6 \cdot-6=-36\) \(\ 6+(-6)=0\)
    \(\ 9 \cdot-4=-36\) \(\ 9+(-4)=5\)
    ... ...

    There are more factors, but you have found the pair that has a sum of 0, 6 and -6. You can use these to factor \(\ 9 x^{2}-4\).

    Example

    Factor \(\ 9 x^{2}-4\).

    Solution

    \(\ \begin{array}{r}
    9 x^{2}+0 x-4 \\
    9 x^{2}-6 x+6 x-4
    \end{array}\)
    Rewrite \(\ 0 x\) as \(\ -6 x+6 x\).
    \(\ \left(9 x^{2}-6 x\right)+(6 x-4)\) Group pairs.
    \(\ 3 x(3 x-2)+2(3 x-2)\) Factor \(\ 3 x\) out of the first group. Factor 2 out of the second group.
    \(\ (3 x-2)(3 x+2)\) Factor out \(\ (3 x-2)\).

    \(\ (3 x-2)(3 x+2)\)

    Since multiplication is commutative, the answer can also be written as \(\ (3 x+2)(3 x-2)\).

    You can check the answer by multiplying \(\ (3 x-2)(3 x+2)=9 x^{2}+6 x-6 x-4=9 x^{2}-4\).

    Factoring a Difference of Squares

    A binomial in the form \(\ a^{2}-b^{2}\) can be factored as \(\ (a+b)(a-b)\).

    Examples

    The factored form of \(\ x^{2}-100\) is \(\ (x+10)(x-10)\).

    The factored form of \(\ 49 y^{2}-25\) is \(\ (7 y+5)(7 y-5)\).

    Let’s factor the difference of two squares using the above rule. Once you have determined that you have the difference of two squares, you just follow the pattern.

    Example

    Factor \(\ 4 x^{2}-36\).

    Solution

    \(\ 4 x^{2}-36\)

    \(\ 4 x^{2}=(2 x)^{2}\), so \(\ a=2 x\)

    \(\ 36=6^{2}\), so \(\ b=6\)

    And \(\ 4 x^{2}-36\) is the difference of two squares.

    \(\ (2 x+6)(2 x-6)\) Factor as \(\ (a+b)(a-b)\).

    \(\ (2 x+6)(2 x-6)\)

    Check the answer by multiplying: \(\ (2 x+6)(2 x-6)=4 x^{2}-12 x+12 x-36=4 x^{2}-36\).

    Exercise

    Factor \(\ 4 b^{2}-25\).

    1. \(\ (2 b-25)(2 b+1)\)
    2. \(\ (2 b+5)^{2}\)
    3. \(\ (2 b-5)^{2}\)
    4. \(\ (2 b+5)(2 b-5)\)
    Answer
    1. Incorrect. \(\ (2 b-25)(2 b+1)=4 b^{2}+2 b-50 b-25=4 b^{2}-48 b-25\). The middle term should be \(\ 0 b\), not \(\ -48 b\). The correct answer is \(\ (2 b+5)(2 b-5)\).
    2. Incorrect. \(\ (2 b+5)^{2}=(2 b+5)(2 b+5)=4 b^{2}+10 b+10 b+25=4 b^{2}+20 b+25\). The middle term should be \(\ 0 b\), not \(\ 20 b\). The correct answer is \(\ (2 b+5)(2 b-5)\).
    3. Incorrect. \(\ (2 b-5)^{2}=(2 b-5)(2 b-5)=4 b^{2}-10 b-10 b+25=4 b^{2}-20 b+25\). The middle term should be \(\ 0 b\), not \(\ -20 b\). The correct answer is \(\ (2 b+5)(2 b-5)\).
    4. Correct. \(\ 4 b^{2}-25\) is a special case. It is the difference of two squares. \(\ (2 b+5)(2 b-5)=4 b^{2}-10 b+10 b-25=(2 b+5)(2 b-5)\), which is correct.

    Notice that you cannot factor the sum of two squares, \(\ a^{2}+b^{2}\). You might be tempted to factor this as \(\ (a+b)^{2}\), but check it by multiplying: \(\ (a+b)^{2}=(a+b)(a+b)=a^{2}+a b+a b+b^{2}=a^{2}+2 a b+b^{2}\), NOT \(\ a^{2}+b^{2}\).

    Summary

    Learning to identify certain patterns in polynomials helps you factor some “special cases” of polynomials quickly. The special cases are:

    • trinomials that are perfect squares, \(\ a^{2}+2 a b+b^{2}\) and \(\ a^{2}-2 a b+b^{2}\), which factor as \(\ (a+b)^{2}\) and \(\ (a-b)^{2}\), respectively;
    • binomials that are the difference of two squares, \(\ a^{2}-b^{2}\), which factors as \(\ (a+b)(a-b)\).

    For some polynomials, you may need to combine techniques (looking for common factors, grouping, and using special products) to factor the polynomial completely.


    This page titled 12.2.2: Factoring- Special Cases is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by The NROC Project via source content that was edited to the style and standards of the LibreTexts platform.