When carrying out mathematical operations it is common to find subtractions between two numbers, however, when finding the subtraction of the squares of two numbers we will say that this is a difference of squares and it is of our particular interest because through the distributive property, we can express it as the product of two factors.
Formally, if and
are two real numbers, then the difference of their squares will be equal to the sum of the first plus the second, multiplied by the subtraction of the first by the second, that is,

This equality can be deduced by performing the distributive property of the real numbers, let’s see then,

This type of expression is often found in the development of algebraic operations and is used mainly for factoring operations, let’s see in the following examples how to apply this operation
Examples
Example 1
Factorize the expression . Note that in this case, we can simply apply the power of each of the summands and perform the subtraction directly.
Example 2
Factorize the expression . We notice that in this case, one of the summands is an x squared and the other one is a nine, so we cannot make the subtraction between them so we apply the difference of squares noting that nine is equal to three squared.
Example 3
Factorize the expression . We notice that in this case, one of the summands is an x-squared and the other is two, so we cannot perform the subtraction between them so we apply the difference of squares noting that two can be rewritten as
.
In this way, we can notice that if the square root of a number is not exact, it can be rewritten to use the difference of squares.
Example 4
Factorize the expression . We notice that in this case, one of the summands is 8 and the other one is x to six, so we cannot make the subtraction between them so we apply the difference of squares noting that eight can be rewritten as
and x to six as
.
Example 5
Factorize the expression . We notice that in this case, we cannot make the subtraction between them so we apply the difference of squares using the observations exposed in the previous examples.