**Factoring Difference of Two Perfect Squares**

At some point in your study of algebra, you’ll be asked to factor expressions by recognizing some special patterns. The **difference of two squares** is one of the most common. The good news is, this form is very easy to identify.

Whenever you have a binomial with each term being squared (having an exponent of 2), and they have subtraction as the middle sign, you are guaranteed to have the case of difference of two squares.

The diagram below should provide an intuitive understanding of this concept.

After verifying that you have a difference of two squares, you can now factor it out as product of two binomials with **alternating signs** in the middle, positive and negative.

These are **other ways** to write the formula of the difference of two squares using variables. Learn to recognize them in various appearances so that you know exactly how to handle them.

*a*^{2} − *b*^{2} = (*a* + *b*)(*a* − *b*)

*x*^{2 }− *y*^{2} = (*x* + *y*)(*x* − *y*)

*m*^{2} − *n*^{2} = (*m* + *n*)(*m* − *n*)

Let’s go over some examples!

**Example 1:** Factor the binomial ** x^{2} – 9** using the difference of two squares method.

The first term of the binomial is definitely a perfect square because the variable x is being raised to the second power. However, the second term of the binomial is not written as a square. So we need to rewrite it in such a way that 9 is expressed as some number with a power of 2. I hope you can see that 9 = (3)^{2}. Clearly, we have a difference of two squares because the sign between the two squared terms is subtraction.

For this example, the solution is broken down in just a few steps to highlight the procedure. Once you get comfortable with the process, you can skip a lot of steps. In fact, you can go straight from the difference of two squares to its factors.

**Example 2:** Factor the binomial **4 x^{2} – 49**.

At first, it appears that this is not a difference of two squares. What we need is to try rewriting it in the form that is easily recognizable.

For the first term of the binomial, what term when multiplied by itself gives 4*x*^{2} ? That should be **2 x** since

(2*x*)(2*x*) = (2*x*)^{2} = 4*x*^{2}.

For the second term, the number when multiplied by itself gives 49 is **7** because

(7)(7) = (7)^{2} = 49.

The solution to this problem looks like this,

**Example 3:** Factor the binomial **9 x^{2} − 16y^{2}**.

This problem is a little bit different because both terms of the binomial contain variables. If we can show that they are perfect squares then we should be alright!

- The first term is a perfect square since (3
*x*)(3*x*) = (3*x*)^{2}= 9*x*^{2}.

- More so, the second is also a perfect square because (4
*y*)(4*y*) = (4*y*)^{2}= 16*y*^{2}.

Applying the formula for difference of two squares we get,

**Example 4:** Factor the binomial **16 y^{4} − 81**.

Here’s an interesting problem. Maybe you already recognize that the pure numbers, **16** and **81**, are perfect squares. That’s good. The variable y though doesn’t have an exponent of 2, but instead has an exponent of 4. Does this qualify to be a square?

Don’t be quick to conclude that it is not. Can you think of a term which when multiplied by itself gives y^{4} ? You can do a trial and error on this. But if you apply your previous knowledge on the Product Rule of Exponents, it makes sense that

In fact, whenever the exponent of a variable is an even number, that expression can be expressed as a perfect square. Why? Because all even numbers are factorable by the number 2.

Now, we can truly rewrite this binomial as difference of two squares with distinct terms that are being raised to the second power.

- where 16
*y*^{4}= (4*y*^{2})^{2} - and 81 = (9)
^{2}

Putting this together, we get

Now you can break this up into two binomial factors with alternating signs,

Are we done already? Well, examine carefully the binomials you factored out. The second parenthesis is possibly a case of difference of two squares as well.

- since 4
*y*^{2 }= (2*y*)(2*y*) , and clearly 9^{ }= (3)(3)

This means you have to apply the formula for difference of two squares one more time.

Here’s the complete solution to this problem.

**Example 5:** Factor the binomial ** x^{4} – 256x^{12}**.

Notice that the binomial has only one kind of variable which is “*x*“. The basic strategy when you see something similar to this is to factor out the greatest common factor (GCF) among the variables.

Between *x*^{4 } and *x*^{12}, the GCF is *x*^{4}. If you factor this out , you get

Now we can deal with the binomial inside the parenthesis. It is actually a difference of two squares because we can express each term of the binomial as an expression with a power of 2.

Then we apply the formula for the difference of two squares,

Are we done? Nope! The second parenthesis is still a case of difference of two squares. We have no choice but to factor it out one more time.

Scan through the binomials again to see if there is still a case of difference of two squares. The last binomial definitely fits into the criteria.

Let’s work this out one last time and we’re done!

**Example 6:** Factor the binomial **( x − 3)^{2} − 4**.

I want to throw in this type of problem because you may encounter something similar to this in your studies. First, recognize that it is a binomial where the first term is (*x*-3)^{2} and the second term is 4. Since both are squared terms and being separated by subtraction, this is truly a case of difference of two squares.

You may keep it in that form as your final answer. But the best answer is to combine like terms by adding or subtracting the constants. This also simplifies the answer by getting rid of the inner parenthesis.