In algebra, a difference of squares is just one method of factoring expressions. It is used in the special case when we have a binomial with square terms: one positive term and one negative term.

So, what is a difference of squares? **A difference of squares is a binomial expression of the form a ^{2} – b^{2}. You can factor a difference of squares as a product of two binomials with the formula a^{2} – b^{2} = (a + b)(a – b). You can verify this formula by using FOIL and combining the middle terms (which are like terms).**

Of course, if you allow radicals, you can factor a difference of terms that are not perfect squares. If you allow imaginary numbers, you can factor a sum of squares.

In this article, we’ll talk about how to use difference of squares and what to look for. We’ll go over several examples to make the concept clear.

Let’s get started.

## What Is A Difference Of Squares?

A difference of squares (or difference of two squares) is a binomial expression of the form a^{2} – b^{2}. You can factor a difference of squares as a product of two binomials, according to the formula:

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

The reason this formula works is because of the special way that FOIL (first, outer, inner, last) works for a product of binomials in this form:

**(a + b)(a – b)****=a*a + a*(-b) + b*a + b*(-b)**[FOIL – first, outer, inner, last]**=a**^{2}– ab + ab – b^{2}**=a**[combine like terms to cancel: ab – ab = 0]^{2}– b^{2}

Note that a difference of squares must satisfy some conditions:

**Two terms**– a difference of squares has exactly two terms (no more, no less).**Square terms**– each term is a square: a perfect square coefficient and an even exponent for each variable (this assumes that we do not want to deal with radicals).**Difference**– a difference of squares has subtraction, so that one term is positive and one is negative (this assumes that we do not want to deal with imaginary numbers).

These conditions will help you to identify what is a difference of squares and what is not.

Note that in some cases, a difference of squares may be “hidden” until we remove a GCF (greatest common factor).

### How Do You Tell If A Binomial Is The Difference Of Two Squares?

To tell if a binomial is a difference of two squares, use these steps:

**Factor out the GCF**(greatest common factor) – sometimes, there will be no GCF to factor out.**Look for a difference**– one of the terms should have a positive coefficient, and the other should have a negative coefficient. If necessary, rewrite the expression so the positive term comes first (on the left), followed by the negative term (on the right).**Look at the coefficients**– the coefficient of each term should be a perfect square: 1, 4, 9, 16, 25, etc.**Look at the exponents**– the exponent of each variable in each term should be even: 2, 4, 6, 8, 10, etc.

If all of these conditions are satisfied, then the binomial is a difference of two squares, and we can factor according to the formula:

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

Note that this will require us to take the square root of both terms to find a and b. One factor is the sum of a and b, while the other factor is the difference of a and b.

## Difference Of Squares Examples

Let’s look at some examples of differences of squares to see how these steps work in practice for various situations.

### Example 1: Difference Of Squares With One Variable

Consider the expression

**x**^{2}– 9

There is no GCF to factor out, since the coefficients (1 and 9) have no common factor, and the two terms share no common variables.

We have two terms in this expression (x^{2} and 9), and we have a difference of terms (the first is positive, the second is negative).

The coefficients are perfect squares: 1 = 1^{2} and 9 = 3^{2}.

Finally, the exponents of all variables are even: x^{2} has an exponent of 2.

So, we have a difference of squares. Taking the square roots of each term, we get:

**a = √(x**^{2}) = x**b = √9 = 3**

Now we can factor according to the difference of squares formula:

**a**^{2}– b^{2}= (a + b)(a – b)**x**^{2}– 3^{2}= (x + 3)(x – 3)**x**^{2}– 9 = (x + 3)(x – 3)

### Example 2: Difference Of Squares With Two Variables

Consider the expression

**4x**^{2}– 9y^{4}

There is no GCF to factor out, since the coefficients (4 and 9) have no common factor, and the two terms share no common variables.

We have two terms in this expression (4x^{2} and 9y^{4}), and we have a difference of terms (the first is positive, the second is negative).

The coefficients are perfect squares: 4 = 2^{2} and 9 = 3^{2}.

Finally, the exponents of all variables are even: x^{2} has an exponent of 2, and y^{4 }has an exponent of 4.

So, we have a difference of squares. Taking the square roots of each term, we get:

**a = √(4x**^{2}) = 2x**b = √(9y**^{4}) = 3y^{2}

Now we can factor according to the difference of squares formula:

**a**^{2}– b^{2}= (a + b)(a – b)**(2x)**^{2}– (3y)^{2}= (2x + 3y^{2})(2x – 3y^{2})**4x**^{2}– 9y^{4}= (2x + 3y^{2})(2x – 3y^{2})

### Example 3: Difference Of Squares After Factoring Out A GCF (Greatest Common Factor)

Consider the expression

**3x**^{2}y – 48y

There is a GCF to factor out, since both terms share a factor of 3 in the coefficient, and both have a y variable.

The GCF is 3y, which we remove to get:

**3x**^{2}y – 48y**=3y(x**^{2}– 16)

For the term in parentheses, there is no GCF to factor out, since the coefficients (1 and 16) have no common factor, and the two terms share no common variables.

We have two terms in the expression inside parentheses (x^{2} and 16), and we have a difference of terms (the first is positive, the second is negative).

The coefficients are perfect squares: 1 = 1^{2} and 16 = 4^{2}.

Finally, the exponents of all variables are even: x^{2} has an exponent of 2.

So, we have a difference of squares. Taking the square roots of each term, we get:

**a = √(x**^{2}) = x**b = √16 = 4**

Now we can factor according to the difference of squares formula:

**a**^{2}– b^{2}= (a + b)(a – b)**x**^{2}– 4^{2}= (x + 4)(x – 4)**x**^{2}– 16 = (x + 4)(x – 4)

Now we use this to give the complete factorization:

**3x**^{2}y – 48y**=3y(x**^{2}– 16)**=3y(x + 4)(x – 4)**

### Example 4: Difference Of Squares Applied Twice

Consider the expression

**x**^{4}– 16

There is no GCF to factor out, since the coefficients (1 and 16) have no common factor, and the two terms share no common variables.

We have two terms in this expression (x^{4} and 16), and we have a difference of terms (the first is positive, the second is negative).

The coefficients are perfect squares: 1 = 1^{2} and 16 = 4^{2}.

Finally, the exponents of all variables are even: x^{4} has an exponent of 4.

So, we have a difference of squares. Taking the square roots of each term, we get:

**a = √(x**^{4}) = x^{2}**b = √(16) = 4**

Now we can factor according to the difference of squares formula:

**a**^{2}– b^{2}= (a + b)(a – b)**(x**^{2})^{2}– (4)^{2}= (x^{2}+ 4)(x^{2}– 4)**x**^{4}– 16 = (x^{2}+ 4)(x^{2}– 4)

However, we are not done yet! We can still factor the second binomial, x^{2} – 4, as a difference of squares, according to the formula:

**x**^{2}– 4 = (x + 2)(x – 2)

So, the complete factorization is given by:

**x**^{4}– 16**=(x**^{2}+ 4)(x^{2}– 4)**=(x**^{2}+ 4)(x + 2)(x – 2)

### Example 5: Difference Of Squares Applied Three Times

Consider the expression

**x**^{8}– 1

There is no GCF to factor out, since the coefficients (1 and 1) have no common factor other than 1, and the two terms share no common variables.

We have two terms in this expression (x^{8} and 1), and we have a difference of terms (the first is positive, the second is negative).

The coefficients are perfect squares: 1 = 1^{2} and 1 = 1^{2}.

Finally, the exponents of all variables are even: x^{8} has an exponent of 8.

So, we have a difference of squares. Taking the square roots of each term, we get:

**a = √(x**^{8}) = x^{4}**b = √(1) = 1**

Now we can factor according to the difference of squares formula:

**a**^{2}– b^{2}= (a + b)(a – b)**(x**^{4})^{2}– (1)^{2}= (x^{4}+ 1)(x^{4}– 1)**x**^{8}– 1 = (x^{4}+ 1)(x^{4}– 1)

However, we are not done yet! We can still factor the second binomial, x^{4} – 1, as a difference of squares, according to the formula:

**x**^{4}– 1 = (x^{2}+ 1)(x^{2}– 1)

We are still not done yet! We can also factor the second binomial, x^{2} – 1, as a difference of squares, according to the formula:

**x**^{2}– 1 = (x + 1)(x – 1)

So, the complete factorization is given by:

**x**^{8}– 1**=(x**^{4}+ 1)(x^{4}– 1)**=(x**^{4}+ 1)(x^{2}+ 1)(x^{2}– 1)**=(x**^{4}+ 1)(x^{2}+ 1)(x+ 1)(x – 1)

## Difference Of Squares With Square Root

If we wish to deal with radicals, we can ignore the “perfect square coefficient” rule for a difference of squares. Here is an example.

### Example 1: Difference Of Squares With A Square Root (A Coefficient That Is Not A Perfect Square)

Consider the expression

**x**^{2}– 3

There is no GCF to factor out, since the coefficients (1 and 3) have no common factor, and the two terms share no common variables.

We have two terms in this expression (x^{2} and 3), and we have a difference of terms (the first is positive, the second is negative).

The coefficients are not both perfect squares: 1 = 1^{2} is a perfect square, but 3 is not a perfect square.

Finally, the exponents of all variables are even: x^{2} has an exponent of 2.

So, we can use the formula for a difference of squares that involves radicals. Taking the square roots of each term, we get:

**a = √(x**^{2}) = x**b = √3**

Now we can factor according to the difference of squares formula:

**a**^{2}– b^{2}= (a + b)(a – b)**x**^{2}– (√3)^{2}= (x + √3)(x – √3)**x**^{2}– 3 = (x + √3)(x – √3)

We can also ignore the rule about “even exponents” if we wish:

### Example 2: Difference Of Squares With A Square Root (Odd Exponents)

Consider the expression

**x**^{3}– 4

There is no GCF to factor out, since the coefficients (1 and 4) have no common factor, and the two terms share no common variables.

We have two terms in this expression (x^{3} and 4), and we have a difference of terms (the first is positive, the second is negative).

The coefficients are both perfect squares: 1 = 1^{2} and 4 = 2^{2}.

However, the exponents of the variables are not even: x^{3} has an exponent of 3.

So, we can use the formula for a difference of squares that involves radicals. Taking the square roots of each term, we get:

**a = √(x**since taking a square root is the same as raising to a power of ½]^{3}) = x^{3/2}[**b = √4 = 2**

Now we can factor according to the difference of squares formula:

**a**^{2}– b^{2}= (a + b)(a – b)**(x**^{3/2})^{2}– (√3)^{2}= (x^{3/2}+ 2)( x^{3/2}– 2)**x**^{3}– 4 = (x^{3/2}+ √3)( x^{3/2}– √3)**x**[since x^{3}– 4 = (x√x + √3)(x√x – √3)^{3/2}= x^{1 + ½}= x^{1}x^{1/2}= x√x]

## Sum Of Squares

If we are willing consider imaginary numbers, we can also factor a sum of squares by using a modified version of the formula for a difference of squares.

### Example: Factor A Sum Of Squares Using The Difference Of Squares Formula (Imaginary Numbers)

Consider the expression

**x**^{2}+ 25

There is no GCF to factor out, since the coefficients (1 and 25) have no common factor, and the two terms share no common variables.

We have two terms in this expression (x^{2} and 25), and we have a sum of terms (both are positive). However, we can rewrite it as a difference:

**x**^{2}+ 25**=x**^{2}– (-25)

The coefficients are both perfect squares: 1 = 1^{2} and 25 = 5^{2}.

So, we can use the formula for a difference of squares that involves imaginary numbers. Taking the square roots of each term, we get:

**a = √(x**^{2}) = x**b = √-25 = 5i**[where i = √-1]

Now we can factor according to the difference of squares formula:

**a**^{2}– b^{2}= (a + b)(a – b)**(x)**^{2}– (5i)^{2}= (x+ 5i)( x – 5i)**x**^{2}– 25i^{2}= (x+ 5i)(x – 5i)**x**[since i^{2}+ 25 = (x+ 5i)(x – 5i)^{2}= -1]

## Conclusion

Now you know what a difference of squares is, along with what to look for to identify one.

You might also want to read my article on how to factor a quadratic binomial.

I hope you found this article helpful. If so, please share it with someone who can use the information.

Don’t forget to subscribe to my YouTube channel & get updates on new math videos!

~Jonathon