What Is A Difference Of Squares? (3 Things To Know)


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 a2 – b2. You can factor a difference of squares as a product of two binomials with the formula a2 – b2 = (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 a2 – b2.  You can factor a difference of squares as a product of two binomials, according to the formula:

  • a2 – b2 = (a + b)(a – b)
difference of two squares
A geometric view of the formula for a difference of two squares.

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]
  • =a2 – ab + ab – b2
  • =a2 – b2  [combine like terms to cancel: ab – ab = 0]

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.

difference of squares
A difference of squares has two exactly two terms (one positive, the other negative) with perfect square coefficients and even exponents on all variables.

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:

  • a2 – b2 = (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

  • x2 – 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 (x2 and 9), and we have a difference of terms (the first is positive, the second is negative).

The coefficients are perfect squares: 1 = 12 and 9 = 32.

Finally, the exponents of all variables are even: x2 has an exponent of 2.

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

  • a = √(x2) = x
  • b = √9 = 3

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

  • a2 – b2 = (a + b)(a – b)
  • x2 – 32 = (x + 3)(x – 3)
  • x2 – 9 = (x + 3)(x – 3)

Example 2: Difference Of Squares With Two Variables

Consider the expression

  • 4x2 – 9y4

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 (4x2 and 9y4), and we have a difference of terms (the first is positive, the second is negative).

The coefficients are perfect squares: 4 = 22 and 9 = 32.

Finally, the exponents of all variables are even: x2 has an exponent of 2, and y4 has an exponent of 4.

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

  • a = √(4x2) = 2x
  • b = √(9y4)  = 3y2

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

  • a2 – b2 = (a + b)(a – b)
  • (2x)2 – (3y)2 = (2x + 3y2)(2x – 3y2)
  • 4x2 – 9y4 = (2x + 3y2)(2x – 3y2)

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

Consider the expression

  • 3x2y – 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:

  • 3x2y – 48y
  • =3y(x2 – 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 (x2 and 16), and we have a difference of terms (the first is positive, the second is negative).

The coefficients are perfect squares: 1 = 12 and 16 = 42.

Finally, the exponents of all variables are even: x2 has an exponent of 2.

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

  • a = √(x2) = x
  • b = √16 = 4

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

  • a2 – b2 = (a + b)(a – b)
  • x2 – 42 = (x + 4)(x – 4)
  • x2 – 16 = (x + 4)(x – 4)

Now we use this to give the complete factorization:

  • 3x2y – 48y
  • =3y(x2 – 16)
  • =3y(x + 4)(x – 4)

Example 4: Difference Of Squares Applied Twice

Consider the expression

  • x4 – 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 (x4 and 16), and we have a difference of terms (the first is positive, the second is negative).

The coefficients are perfect squares: 1 = 12 and 16 = 42.

Finally, the exponents of all variables are even: x4 has an exponent of 4.

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

  • a = √(x4) = x2
  • b = √(16)  = 4

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

  • a2 – b2 = (a + b)(a – b)
  • (x2)2 – (4)2 = (x2 + 4)(x2 – 4)
  • x4 – 16 = (x2 + 4)(x2 – 4)

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

  • x2 – 4 = (x + 2)(x – 2)

So, the complete factorization is given by:

  • x4 – 16
  • =(x2 + 4)(x2 – 4)
  • =(x2 + 4)(x + 2)(x – 2)

Example 5: Difference Of Squares Applied Three Times

Consider the expression

  • x8 – 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 (x8 and 1), and we have a difference of terms (the first is positive, the second is negative).

The coefficients are perfect squares: 1 = 12 and 1 = 12.

Finally, the exponents of all variables are even: x8 has an exponent of 8.

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

  • a = √(x8) = x4
  • b = √(1)  = 1

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

  • a2 – b2 = (a + b)(a – b)
  • (x4)2 – (1)2 = (x4 + 1)(x4 – 1)
  • x8 – 1 = (x4 + 1)(x4 – 1)

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

  • x4 – 1 = (x2 + 1)(x2 – 1)

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

  • x2 – 1 = (x + 1)(x – 1)

So, the complete factorization is given by:

  • x8 – 1
  • =(x4 + 1)(x4 – 1)
  • =(x4 + 1)(x2 + 1)(x2 – 1)
  • =(x4 + 1)(x2 + 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

  • x2 – 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 (x2 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 = 12 is a perfect square, but 3 is not a perfect square.

Finally, the exponents of all variables are even: x2 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 = √(x2) = x
  • b = √3

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

  • a2 – b2 = (a + b)(a – b)
  • x2 – (√3)2 = (x + √3)(x – √3)
  • x2 – 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

  • x3 – 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 (x3 and 4), and we have a difference of terms (the first is positive, the second is negative).

The coefficients are both perfect squares: 1 = 12 and 4 = 22.

However, the exponents of the variables are not even: x3 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 = √(x3) = x3/2  [since taking a square root is the same as raising to a power of ½]
  • b = √4 = 2

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

  • a2 – b2 = (a + b)(a – b)
  • (x3/2)2 – (√3)2 = (x3/2 + 2)( x3/2 – 2)
  • x3 – 4 = (x3/2 + √3)( x3/2 – √3)
  • x3 – 4 = (x√x + √3)(x√x – √3)  [since x3/2 = x1 + ½ = x1x1/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

  • x2 + 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 (x2 and 25), and we have a sum of terms (both are positive).  However, we can rewrite it as a difference:

  • x2 + 25
  • =x2 – (-25)

The coefficients are both perfect squares: 1 = 12 and 25 = 52.

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 = √(x2) = x
  • b = √-25 = 5i  [where i = √-1]

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

  • a2 – b2 = (a + b)(a – b)
  • (x)2 – (5i)2 = (x+ 5i)( x – 5i)
  • x2 – 25i2 = (x+ 5i)(x – 5i)
  • x2 + 25 = (x+ 5i)(x – 5i)  [since i2 = -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

Recent Posts