Factoring the difference of two squares is a special case of factoring a polynomial, where you’ll be factoring a binomial which is a difference of two terms that are both perfect squares.

For example, ???9x^2-16??? is the difference of two squares, because ???9x^2??? is the perfect square ???(3x)^2???, ???16??? is the perfect square ???4^2???, and ???16??? is being subtracted from ???9x^2???.

How do you factor the difference of two squares

To factor a difference of two squares, you simply take the expressions that are squared (in the example the expressions ???3x??? and ???4???) and put both of them (in the given order) into the terms in both factors of the given binomial. In one factor, you’ll add the second expression to the first one; in the other factor, you’ll subtract the second expression from the first one. Therefore, ???9x^2-16??? is factored as ???(3x+4)(3x-4)???.

How do you factor the difference of two squares

Example

Factor the binomial.

???x^2-25???

Since ???x^2??? and ???25??? are both perfect squares (the squares of ???x??? and ???5???, respectively), ???x^2-25??? is factored as

???(x+5)(x-5)???

Let’s try another example of factoring the difference of two squares.

How do you factor the difference of two squares

In one factor, you’ll add the second expression to the first one; in the other factor, you’ll subtract the second expression from the first one.

Example

Factor the binomial.

???64x^4y^2-9z^6???

Notice that ???64x^4y^2=(8x^2y)^2???, and that ???9z^6=(3z^3)^2???. Therefore, ???64x^4y^2-9z^6??? is factored as

???(8x^2y+3z^3)(8x^2y-3z^3)???