What is Completing the Square?

A Geometric Intuition for Completing the Square


Completing the square is one of the most important concepts taught in an algebra class. It allows us to solve equations of the form ax2+bx+c=0ax^2+bx+c=0 or rewrite equations such as y=ax2+bx+cy=ax^2+bx+c in vertex form. But one of the first questions a student might have is: why is it even called completing the square? Hopefully, by the end of this post, you will know why.

Case 1

Let’s start off with a simple expression, x2+bx.x^2+bx. If we assume that xx and bb are both positive, we can represent this quantity as the sum of the areas of a square with length xx and a rectangle with a length of xx and a width of b.b. Geometrically, it might look something like this:

diagram 2-1

We somehow want to rearrange these components to look like an incomplete square, so that we can then “complete the square.” Is this achieveable? Certainly! We can split the rectangle into two identical, smaller rectangles with a length of xx and a width of b2.\frac{b}{2}. We can then place one on top and one to the right of the square. We now have the following:

diagram 2-2

This now looks like an incomplete square! The entire figure looks like a square of length x+b2x + \frac{b}{2} with a missing portion on the top right. Note that the figure still has an area of x2+bxx^2+bx since we didn’t add or remove any components (we only did some rearranging). Let’s fill in this missing portion and continue our investigation.

diagram 2-3

The purple shape on the top right actually turns out to be a square of length b2\frac{b}{2} (our splitting of the green rectangle exactly in half ensures this). The area of this purple square is (b2)2.\left(\frac{b}{2}\right)^2.

So, what did we just show? If we take our original area, x2+bx,x^2+bx, and add (b2)2,\left(\frac{b}{2}\right)^2, we achieve the area of a square with length x+b2x + \frac{b}{2} . Algebraically, we have the following:

x2+bx+(b2)2=(x+b2)2x^2+bx + \left(\frac{b}{2}\right)^2 = \left(x+\frac{b}{2}\right)^2

As mentioned prior, this geometric intution only works for positive values of xx and b,b, but the equation actually holds for all values of xx and b.b.

Case 2

Let’s now consider the expression x2bx.x^2-bx. Similar to case 1, we will assume that xx and bb are both positive so that our geometric representation makes sense. In this case, however, since we are subtracting bx,bx, we will also assume that b<xb<x so that we will still have an area left over once we perform the subtraction. I am stating these assumptions and restrictions in order to be rigorous, but there’s no need to get caught up with them if they’re confusing to understand, as they are not integral in the demonstration.

So far we have the quantity x2bx,x^2-bx, which can be represented as the area of a square with length x,x, minus the area of a rectangle with a length of xx and a width of b.b. The diagram is essentially the same as that of the beginning of case 1, but the rectangle is now shaded in red because we want to subtract off this area.

diagram 2-4

Similar to case 1, we’re going to split the rectangle into two identical, smaller rectangles with a length of xx and a width of b2.\frac{b}{2}. This time, however, we’re going to subtract off the areas of the smaller rectangles one at a time:

diagram 2-5

After we subtract off the first rectangle, we are left with the following:

diagram 2-6

Let’s now try to subtract off the remaining rectangle:

diagram 2-7

We’re not able to subtract this rectangle completely; it seems like a small square is left over. Remember, we’re subtracting off these rectangles in this specific manner in order to be left with an incomplete square. We’re now left with the following:

diagram 2-8

Finally, let’s shave off this tiny square from the top right of our larger square.

diagram 2-9

What does this accomplish? Well, the area of our remaining figure is actually equal to the original quantity that we started with, x2bx.x^2-bx. Notice that we were successfully able to subtract off the red area from the blue area in such a way that we are left with an incomplete square. All that’s left now is to complete the square, and with the way that the diagram is already set up, it’s really easy! We just have to add back the same area as the small red square, which is (b2)2.\left(\frac{b}{2}\right)^2. If we do so, we’ll have the area of a square with length xb2.x-\frac{b}{2}. Algebraically, we just showed the following:

x2bx+(b2)2=(xb2)2x^2-bx + \left(\frac{b}{2}\right)^2 = \left(x-\frac{b}{2}\right)^2

As mentioned prior, this geometric intution only works for positive values of xx and bb with the additional constraint that b<x,b<x, but the equation actually holds for all values of xx and b.b.

Application

Hopefully by this point, you know exactly why completing the square is named the way it is. Along the way, we also discovered two powerful equations:

x2+bx+(b2)2=(x+b2)2x^2+bx + \left(\frac{b}{2}\right)^2 = \left(x+\frac{b}{2}\right)^2 x2bx+(b2)2=(xb2)2x^2-bx + \left(\frac{b}{2}\right)^2 = \left(x-\frac{b}{2}\right)^2

But so what? What are these equations useful for? Remember, completing the square gives us a method for solving certain types of equations. Going over some examples will demonstrate this.

Example 1

Let’s consider the equation x2+4x=5.x^2+4x=5. Analagous to splitting the rectangle in half, we’re going to take half of the coefficient of the xx term, which is 44 in this case. Half of 44 is 2.2. Going back to our analogy, we now have the side length of the small square. We now have to add the area of this small square to both sides, which is 22=4.2^2=4. We now have the following:

x2+4x+4=9x^2+4x+4=9

We can now factor the left side as the square of a term (which was the whole point of completing the square):

(x+2)2=9(x+2)^2=9

We can now take the square root of both sides, but remember, we have to consider plus or minus.

x+2=±9=±3x+2= \pm\sqrt{9} = \pm 3

Solving for x,x, we get x=2±3,x=-2 \pm 3, which leads us to x=1x=1 or x=5.x=-5. Plugging in these values to the original equation indeed shows that the equality holds.

Example 2

Let’s consider a more complex equation, 36x2+60x=83.36x^2+60x=83. You might be tempted to just take half of 60,60, square it, and add that number to both sides of the equation. However, this would be incorrect! Notice that the coefficient of the x2x^2 term is 3636 in this example. Everything that we went through so far was with an x2x^2 term with a coefficient of 1.1. So, to solve this example, we’ll have to be a bit more clever.

First, in order to achieve an x2x^2 term with a coefficient of 1,1, we’re going to factor out a 3636 from the left side of the equation. It might be odd to factor out a 3636 from 60,60, but it’s actually possible! We’ll end up with the following:

36(x2+53x)=8336\left(x^2+\frac{5}{3}x\right) = 83

Dividing both sides by 3636 would have also been possible, but let’s just continue with this method for the sake of demonstration. Now that the inside of the parenthesis looks like something familiar, we can begin to complete the square. We take half of 53,\frac{5}{3}, which is 56,\frac{5}{6}, and square it to get (56)2.\left(\frac{5}{6}\right)^2. We want to add this quantity to the inside of the parenthesis. But remember, if we add something to one side of the equation, we must add the same thing to the other side. But are we really adding just (56)2\left(\frac{5}{6}\right)^2 to the left side? No! We’re actually adding 36(56)236\left(\frac{5}{6}\right)^2 because of the 3636 on the outside of the parenthesis. So, by adding (56)2\left(\frac{5}{6}\right)^2 to the inside of the parenthesis, we’re actually adding by 36(56)2.36\left(\frac{5}{6}\right)^2. So, we’ll have the following:

36(x2+53x+(56)2)=83+36(56)236\left(x^2+\frac{5}{3}x + \left(\frac{5}{6}\right)^2 \right) = 83 + 36 \left(\frac{5}{6}\right)^2

Factoring and simplifying, we have:

36(x+56)2=83+25=10836\left(x + \frac{5}{6}\right)^2 = 83 + 25 = 108

Now, if we divide by 36,36, we have:

(x+56)2=3\left(x + \frac{5}{6}\right)^2 = 3

Taking the square root of both sides, we get:

x+56=±3x + \frac{5}{6}= \pm \sqrt{3}

Finally, we subtract by 56\frac{5}{6} to get our final answer:

x=56±3x = - \frac{5}{6} \pm \sqrt{3}