In this explainer, we will learn how to factor the difference of two squares and apply the result to evaluate numerical expressions.
Dina and Nabil are both asked to calculate . They each approach the problem in a different way: Nabil directly calculates each of the squares and then finds the difference, whereas Dina finds the sum of 51 and 49 and the difference between 51 and 49 and multiplies her two answers. Dina’s method is clearly quicker, but is it correct? Let us look at each of Nabil’s and Dina’s working out. Nabil used long multiplication as follows:
Dina’s working is shown here:
Clearly, the methods produce the same result and, in fact, we can easily show that Dina’s method is correct. If we expand the two brackets in the first stage of Dina’s working, we get which simplifies to
This result is called the difference of two squares. We can also express this idea more generally to obtain the following formula.
Formula: Difference of Two Squares
An expression of the form is called a difference of two squares; it can always be factored by using the formula
This is a powerful result that can be used to simplify algebraic and numerical expressions.
Let us start with a numerical example similar to the one we discussed above, showing how we can reduce a calculation involving large square numbers to a much easier one by treating it as a difference of two squares.
Example 1: Evaluating a Numerical Expression Using the Difference of Squares
By factorizing or otherwise, evaluate .
Answer
Recall that a difference of two squares is of the form and can be factored by using the formula
Comparing the given calculation with the expression , we have and . Taking square roots in both cases, we get and .
We are now ready to apply the formula and evaluate the result:
Thus, we have worked out that .
We now show how to apply the formula to a simple algebraic expression.
Example 2: Factoring a Simple Difference of Two Squares
Factor the expression .
Answer
If we consider the given expression, we can see that the first term, , is the square of , and the second term, 49, is the square of 7. This means that the expression is a difference of two squares.
Recall that a difference of two squares is of the form , which can be factored by using the formula
Therefore, taking and , we can rewrite the expression as and factor it as follows:
Next, we look at a slightly more complicated example, where the coefficient of in the original expression is greater than 1.
Example 3: Factoring a Difference of Two Squares
Factorize fully .
Answer
In the given expression, notice that and are perfect squares, and is the square of . This suggests we can rewrite as a difference of two squares.
Recall that a difference of two squares is of the form , which can be factored by using the formula
Therefore, we start by comparing with the general form to work out the values of and .
For the first term, taking the square root of , we get so . For the second term, taking the square root implies that .
Rewriting the original expression as a difference of two squares and applying the formula, we get
Hence, factoring the expression gives .
It is worth noting here that, for an expression of a difference of two squares in the form , the terms and can contain both numbers and variables. In the previous two examples, was a number, but this is not always the case.
Example 4: Factoring a Difference of Two Squares with Two Variables
Factorize fully .
Answer
In the given expression, notice that and are perfect squares, is the square of , and is the square of . This suggests that we can rewrite as a difference of two squares.
Recall that a difference of two squares is an expression of the form , which can be factored by using the formula
Comparing with , by taking square roots, we get and . We can, therefore, rewrite the expression as , which factors as
Another common assumption is that this method can only be applied to expressions that contain exponents of 2, for example, or . However, this is not true, as the next example shows.
Example 5: Factoring a Difference of Two Squares with Higher Exponents
Factorize fully .
Answer
Though it is perhaps not immediately clear, the expression can be rewritten in the form . Recall that an expression of the form is called a difference of two squares, which can be factored by using the formula
In the first term, notice that is a perfect square and , so giving . Similarly, in the second term, is a perfect square and , so giving . This enables us to rewrite the original expression as the difference of two squares . We can then factor it by applying the formula, as follows:
Furthermore, we can still use this method even in cases where expressions feature more than two variables. Here is an example of this type.
Example 6: Factoring a Difference of Two Squares with Three Variables
Factorize fully .
Answer
Notice that the numbers 49 and 64 are both perfect squares. This suggests that the given expression could be a difference of two squares. Recall that a difference of two squares is an expression of the form , which can be factored by using the formula
Comparing with and with , we can work out the values of and by taking square roots. Therefore, so . Similarly, giving . Finally, we can apply the formula to get
We conclude that completely factoring the expression gives .
In some questions, we can use this idea to rewrite a given expression as a difference of two squares and then use the formula to help us evaluate the result.
Example 7: Evaluating an Expression Using the Difference of Squares
If , what is the value of ?
Answer
In this case, we are given the expression , which is in the form of a difference of two squares, . Recall the formula for factoring a difference of two squares:
Our strategy will be to work out the values of and and then apply the formula. Once we have done this, we can use information from the question to work out the numerical answer.
If and , then taking square roots gives and . Hence, applying the formula, we have
Simplifying the right-hand side, we get
Therefore, we have used the formula to show that the original expression simplifies to . Moreover, the question tells us that , so substituting for in the expression gives the answer .
We conclude that if , the value of is 96.
In our final example, we show how the difference of two squares method can be applied in a geometric context to solve problems about right triangles. As we will show, this is not really surprising, because the relationship between side lengths in right triangles is given by the Pythagorean theorem, which is expressed in terms of the squares of the side lengths.
Example 8: Using the Difference of Squares to Find an Unknown Value given a Right Triangle
The length of the hypotenuse of a right triangle is 64 cm and the length of one of the other sides is 59 cm. Find the area of the square drawn on that unknown side.
Answer
In this question, we are given the lengths of the hypotenuse and one other side of a right triangle, and we must use this information to find the area of the square drawn on the unknown side. It helps to draw a sketch of the situation, as shown below. Note that if we label the unknown side length as cm long, then the square drawn on the unknown side will have an area of cm2.
We recall the Pythagorean theorem, which states that in any right triangle, the square of the hypotenuse is equal to the sum of the squares of the two shorter sides. Writing for the length of the hypotenuse and and for the lengths of the two shorter sides, this can be expressed algebraically as
We will first use the Pythagorean theorem to find an expression for , the square of the unknown side length. Importantly, this will also be the area of the square drawn on the unknown side, which is what we have been asked to find.
Starting with the Pythagorean theorem , we make the subject by subtracting from both sides:
Notice now that the right-hand side, , is in the form of a difference of two squares. Recall that a difference of two squares can be factored by using the formula
Applying the formula, we get
Finally, we have that and , so substituting these values gives
Since the side lengths were given in centimetres, then this area will be in square centimetres. Therefore, we have found that the area of the square drawn on the unknown side is 615 cm2.
Let us finish by recapping some key concepts from this explainer.
Key Points
- An expression of the form is called a difference of two squares; it can always be factored by using the formula .
- For an expression of a difference of two squares in the form , the terms and can contain both numbers and multiple variables, including variables with exponents greater than 1.
- We can rewrite numerical expressions as differences of two squares and then use the formula to simplify and evaluate them.
- The difference of two squares method can also be applied to solve problems about right triangles. This is a natural context because the relationship between side lengths in right triangles is given by the Pythagorean theorem, which is expressed in terms of the squares of the side lengths.