4.4: Factoring Differences of Squares
- Page ID
- 173474
\( \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{\ket}[1]{\left| #1 \right>}\)
\(\newcommand{\bra}[1]{\left< #1 \right|}\)
\(\newcommand{\braket}[2]{\left< #1 \vphantom{#2} \right| \left. #2 \vphantom{#1} \right>}\)
\(\newcommand{\braopket}[3]{\left< #1 \vphantom{#2}\vphantom{#3} \right| #2 \vphantom{#1}\vphantom{#3} \left| #3 \vphantom{#1}\vphantom{#2} \right>}\)
\(\newcommand{\qmvec}[1]{\mathbf{\vec{#1}}}\)
\(\newcommand{\op}[1]{\hat{\mathbf{#1}}}\)
\(\newcommand{\expect}[1]{\langle #1 \rangle}\)
\(\newcommand{\dfn}[1]{\emph{\textbf{#1}}}\)
Videos
Lecture: Factoring a Difference of Squares
Example: Completely Factoring the Difference of Squares
Example: Factoring a Difference of Squares Requiring Factoring Out the GCF First
Lecture: Using Difference of Squares to Speed Up Integer Multiplication
Example: Advanced Example of Factoring a Difference of the Squares of Two Trinomials
Definitions and Theorems
The difference of squares is one of the most frequently used factoring patterns. Recognizing it lets you factor certain binomials at sight, without trial and error.
An expression is a perfect square if it is equal to the square of another expression. A number is a perfect square if it is the square of an integer.
For example, \(25\) is a perfect square because \(25=5^2\), and \(9x^2\) is a perfect square because \(9x^2=(3x)^2\). Likewise, \(x^4\) is a perfect square because \(x^4=(x^2)^2\).
A difference of squares is a binomial of the form \(a^2-b^2\), in which one perfect square is subtracted from another perfect square.
For any algebraic expressions \( F \) and \( L \), \[ F^2 - L^2 = \left( F - L \right)\left( F + L \right). \nonumber \]
- Proof
- \[ \begin{array}{rclcl}
\left( F - L \right)\left( F + L \right) & = & F^2 + FL - FL - L^2 & \quad & \left( \text{distributing} \right) \\[6pt]
& = & F^2 - L^2 & \quad & \left( \text{simplifying} \right) \\[6pt]
\end{array} \nonumber \]
A binomial is a difference of squares when all three of the following hold: it has exactly two terms, both terms are perfect squares, and the terms are separated by subtraction. When you spot this pattern, take the square root of each term to identify \(a\) and \(b\), then write the product \((a-b)(a+b)\).
The pattern applies only to a difference. A sum of squares, \(a^2+b^2\), does not factor over the real numbers. For instance, \(x^2+9\) is prime over the reals; it is not equal to \((x+3)(x-3)\), which expands to \(x^2-9\).
Always remove any greatest common factor before checking for a difference of squares. An expression such as \(2x^2-8\) is not itself a difference of squares, but after factoring out \(2\) it becomes \(2(x^2-4)\), which is.
Examples
Factor \(x^2-16\).
- Answer
- Each term is a perfect square: \(x^2=(x)^2\) and \(16=(4)^2\). Writing the binomial in the form \(a^2-b^2\) with \(a=x\) and \(b=4\),\[x^2-16=(x)^2-(4)^2=(x-4)(x+4).\nonumber\]
Factor \(9x^2-25\).
- Answer
- Both terms are perfect squares: \(9x^2=(3x)^2\) and \(25=(5)^2\). With \(a=3x\) and \(b=5\),\[9x^2-25=(3x)^2-(5)^2=(3x-5)(3x+5).\nonumber\]
Factor \(49x^2-4y^2\).
- Answer
- Take the square root of each term: \(49x^2=(7x)^2\) and \(4y^2=(2y)^2\). With \(a=7x\) and \(b=2y\),\[49x^2-4y^2=(7x)^2-(2y)^2=(7x-2y)(7x+2y).\nonumber\]
Factor \(3x^2-27\) completely.
- Answer
- The terms share a common factor of \(3\), which we remove first:\[3x^2-27=3(x^2-9).\nonumber\]The remaining binomial is a difference of squares, since \(x^2=(x)^2\) and \(9=(3)^2\). Factoring it gives\[3(x^2-9)=3(x-3)(x+3).\nonumber\]
Factor \(x^4-16\) completely.
- Answer
- Since \(x^4=(x^2)^2\) and \(16=(4)^2\), the expression is a difference of squares with \(a=x^2\) and \(b=4\):\[x^4-16=(x^2)^2-(4)^2=(x^2-4)(x^2+4).\nonumber\]The first factor, \(x^2-4\), is itself a difference of squares and factors as \((x-2)(x+2)\). The second factor, \(x^2+4\), is a sum of squares and does not factor over the reals. The complete factorization is\[x^4-16=(x-2)(x+2)(x^2+4).\nonumber\]
Determine whether each binomial is a difference of squares. If it is, factor it.
- \(x^2-49\)
- \(x^2+49\)
- \(x^2-7\)
- Answers
-
- Both terms are perfect squares and they are separated by subtraction, so this is a difference of squares. With \(a=x\) and \(b=7\),\[x^2-49=(x-7)(x+7).\nonumber\]
- The terms are separated by addition, so this is a sum of squares, not a difference. It does not factor over the reals.
- From an introductory frame of reference, the first term is a perfect square but \(7\) is not a perfect square. Therefore, this is not a difference of two perfect squares, so it cannot be factored using this pattern.
Now, let's step into our college shoes. As long as you know how to deal with radicals, \(x^2 - 7\) can be rewritten as \(x^2 - (\sqrt{7})^2\). As such, it can be factored using the difference of squares formula (despite not being a true difference of squares) as \((x - \sqrt{7})(x + \sqrt{7})\).
MyOpenMath Practice
Sources
Several parts of this text use modifications from the following source:
- Wikipedia article: "Difference of two squares"
This source is released under the Creative Commons Attribution-Share-Alike License 4.0.


