# ## Difference of Squares

The difference of squares formula is a shortcut that you can use anytime you need to factor an expression that has a perfect square subtracted from another perfect square.

## How to Factor a Difference of Squares

1. Make sure the polynomial is a difference of squares.
• Does the polynomial have two terms connected with a subtraction sign?
• Are the terms perfect squares?
2. Find the square root of each term.
3. Plug the results of Step 2 into the difference of squares formula.

## Examples

Factor: $x^2-9$

Is $$\yellow x^2 -9$$ a difference of squares?

Yes, $$\yellow x^2$$ and $$\yellow 9$$ are perfect squares that are connected with a subtraction sign.

What are the square roots of $$\yellow x^2$$ and $$\yellow 9$$?

$\sqrt{\yellow x^2}={\yellow x}$

$\sqrt{\yellow 9}={\yellow 3}$

What is the factored form of $$\yellow x^2-9$$?

To find the factored form of $$\yellow x^2-9$$, I will substitute $$\yellow x$$ and $$\yellow 3$$ into the difference of squares formula.

${\yellow x^2}-{\yellow 9}=({\yellow x}+{\yellow 3})({\yellow x}-{\yellow 3})$

The factored form of $$\yellow x^2-9$$ is…

$\yellow (x+3)(x-3)$

Factor: $36y^2-25x^2$

Is $$\green 36y^2 -25x^2$$ a difference of squares?

Yes, $$\green 36 y^2$$ and $$\green 25x^2$$ are perfect squares that are connected with a subtraction sign.

What are the square roots of $$\green 36 y^2$$ and $$\green 25x^2$$?

$\sqrt{\green 36y^2}={\green 6y}$

$\sqrt{\green 25x^2}={\green 5x}$

What is the factored form of $$\green 36y^2-25x^2$$?

To find the factored form of $$\green 36y^2-25x^2$$, I will substitute $$\green 6y$$ and $$\green 5x$$ into the difference of squares formula.

${\green 36y^2}-{\green 25x^2}=({\green 6y}+{\green 5x})({\green 6y}-{\green 5x})$

The factored form of $$\green 36y^2-25x^2$$ is…

$\green (6y+5x)(6y-5x)$

Factor: $81x^{12}-16x^4$

Is $$\purple 81x^{12}-16x^4$$ a difference of squares?

Yes, $$\purple 81x^{12}$$ and $$\purple 16x^4$$ are perfect squares that are connected with a subtraction sign.

What are the square roots of $$\purple 81x^{12}$$ and $$\purple 8x^4$$?

$\sqrt{\purple 81x^{12}}={\purple 9x^6}$

$\sqrt{\purple 16x^4}={\purple 4x^2}$

What is the factored form of $$\purple 81x^{12}-16x^4$$?

To find the factored form of $$\purple 81x^{12}-16x^4$$, I will substitute $$\purple 9x^6$$ and $$\purple 4x^2$$ into the difference of squares formula.

${\purple 81x^{12}}-{\purple 16x^4}=({\purple 9x^6}+{\purple 4x^2})({\purple 9x^6}-{\purple 4x^2})$

The difference of squares formula tells me that the factored form of $$\purple 81x^{12}-16x^4$$ is…

$\purple(9x^6+ 4x^2)(9x^6-4x^2)$

However, this expression can be factored even further because the second factor $$\purple (9x^6-4x^2)$$ is another difference of squares that can be factored to $$\purple (3x^3+2x)(3x^3-2x)$$.

So, the fully factored form of $$\purple 81x^{12}-16x^4$$ is…

$\purple (9x^6+4x^2)(3x^3+2x)(3x^3-2x)$

## How to Factor a Sum of Squares

When you first learn how to factor polynomials, your teacher may tell you that there is no way to factor a sum of squares.

That is partially true. Sums of squares are not factorable unless you use complex numbers. And you will not be expected to find the complex factors of a polynomial in most algebra classes.

However, if you are asked to find the complex factors of a polynomial, you can apply the difference of squares formula to factor a sum of squares like this:

Factor: $x^2+25$

Is $$\blue x^2 +25$$ a difference of squares?

No, $$\blue x^2$$ and $$\blue 25$$ are perfect squares but they are connected with an addition sign instead of a subtraction sign.

However, subtracting a negative is equivalent to adding a positive, so I could rewrite the expression so there is a subtraction sign.

$\blue x^2+25 = x^2- -25$

What are the square roots of $$\blue x^2$$ and $$\blue -25$$?

$\sqrt{\blue x^2}={\blue x}$

$\sqrt{\blue -25}={\blue 5i}$

What is the factored form of $$\blue x^2- -25$$?

To find the factored form of $$\blue x^2- -25$$, I will substitute $$\blue x$$ and $$\blue 5i$$ into the difference of squares formula.

${\blue x^2}-{\blue -25}=({\blue x}-{\blue 5i})({\blue x}+{\blue 5i})$

The factored form of $$\blue x^2+25$$ is…

$\blue (x-5i)(x+5i)$

## Why It Works

The difference of squares formula works because factoring “un-does” polynomial multiplication.

You can see where the formula comes from if you reverse engineer the process and multiply the sum $$(a+b)$$ and difference $$(a-b)$$ of two terms.

To understand where the formula comes from…

1. Multiply $$(a+b)(a-b)$$.
2. Undo the multiplication to find the Difference of Squares Formula.

I like using the FOIL method to multiply binomials, but you can also use the box method or the multiplication algorithm. $(a+b)(a-b)$

Multiply the FIRST terms: $({\red a})({\red a})={\red a^2}$

Multiply the OUTER terms: $({\yellow a})({\yellow -b})={\yellow -ab}$

Multiply the INNER terms: $({\green b})({\green a})={\green ab}$

Multiply the LAST terms: $({\blue b})({\blue -b})={\blue -b^2}$

When the like terms ($$\yellow -ab$$ and $$\green ab$$) are combined, they cancel each other out.

The remaining terms create a difference of squares:  $(a+b)(a-b)={\red a^2}{\blue -b^2}$

If the simplified polynomial multiplication is always a difference of squares…

$(a+b)(a-b)=a^2-b^2$

Then we can “un-do” the multiplication and write the equation backwards to find the formula to factor a difference of squares…

$a^2-b^2=(a+b)(a-b)$