Completing The Square

Malcolm McKinsey
Written by
Malcolm McKinsey
Fact-checked by
Paul Mazzola

Completing the square definition

Algebra and geometry are closely connected. Geometry, as in coordinate graphing and polygons, can help you make sense of algebra, as in quadratic equations. Completing the square is one additional mathematical tool you can use for many challenges:

  • Simplify algebraic expressions

  • Solve quadratic equations

  • Convert expressions from one form to another

  • Find the minimum or maximum values of quadratic functions

When completing the square, we can take a quadratic equation like this, and turn it into this:

Get free estimates from algebra tutors near you.

Completing the square

"Completing the square" comes from the exponent for one of the values, as in this simple binomial expression:

We use bb for the second term because we reserve aa for the first one. We might have had ax2a{x}^{2}, but if aa is 1, you have no need to write it.

Anyway, you have no idea what values xx or bb have, so how can you proceed? You already know xx will be multiplied times itself, to begin.

Think about a square in geometry. You have four congruent-length sides, with an enclosed area that comes from multiplying a number times itself. In this expression, xx times xx is a square with an area of x2{x}^{2}:

Hold on – we still have unknown variable bb times xx. What would that look like? That would be a rectangle xx units tall and bb units wide, attached to our x2{x}^{2} square:

To make better sense of that rectangle, divide it equally between the width and length of the x2{x}^{2} square. That would make each rectangle b2\frac{b}{2} times xx:

How To Complete The Square
How To Complete The Square

That means the new almost-square is x+b2x+\frac{b}{2}, but we are missing a tiny corner, which would have a value of b2\frac{b}{2} times itself, or (b2)2{\left(\frac{b}{2}\right)}^{2}:

That last step literally completed the square, so now we have this:

This refines or simplifies to:

You need to also subtract (b2)2{\left(\frac{b}{2}\right)}^{2} if you are, in fact, trying to work an equation (you cannot add something without balancing it by subtracting it). In our case, we were just showing how the square is really a square, in a geometric sense.

Completing the square formula

Here is a more complete version of the same thing:

As soon as you see x raised to a power, you know you are dealing with a candidate for "completing the square."

The role of bb from our earlier example is played here by the 2. We added a value, +3, so now we have a trinomial expression.

x2+2x+3{x}^{2}+2x+3 is rewritten as:

Completing the square formula and example
Completing the square formula and example

So, divide b by 2 and square it, which you then add and subtract to get:

Now, you can simplify as:

Which is equal to:

This simplifies to:

On a graph, this plots a parabola with a vertex at (-1, 2).

How to complete the square

You can use completing the square to simplify algebraic expressions. Here is a straightforward example with steps:

Divide the middle term, 20x, by 2 and square it, then both add and subtract it:

Completing The Square Methods To Simplify algebraic expressions
Completing The Square Methods To Simplify algebraic expressions

Simplify the expression:

Steps to completing the square

Seven steps are all you need to complete the square in any quadratic equation. The general form of a quadratic equation looks like this:

Completing The Square Steps
Completing The Square Steps

Completing the square steps:

  1. Isolate the number or variable c to the right side of the equation.

  2. Divide all terms by a (the coefficient of x2{x}^{2}, unless x2{x}^{2} has no coefficient).

  3. Divide coefficient b by two and then square it.

  4. Add this value to both sides of the equation.

  5. Rewrite the left side of the equation in the form (x+d)2{\left(x+d\right)}^{2} where dd is the value of b2\frac{b}{2} you found earlier.

  6. Take the square root of both sides of the equation; on the left side, this leaves you with x+dx+d.

  7. Subtract whatever number remains on the left side of the equation to yield x and complete the square.

Completing the square examples

We will provide three examples of quadratic equations progressing from easier to harder. Give each a try, following the seven steps described above. The first one does not place a coefficient with x2{x}^{2}.

  1. x2+3x−4=0{x}^{2}+3x-4=0

  2. x2+3x=4{x}^{2}+3x=4

  3. x2+3x+(32)2=4+(32)2{x}^{2}+3x+{\left(\frac{3}{2}\right)}^{2}=4+{\left(\frac{3}{2}\right)}^{2}

  4. (x+32)2=254{\left(x+\frac{3}{2}\right)}^{2}=\frac{25}{4}

  5. x+32=−254x+\frac{3}{2}=-\sqrt{\frac{25}{4}}

  6. x+32=254x+\frac{3}{2}=\sqrt{\frac{25}{4}}

x=1x=1 and x=−4x=-4.

Solving quadratic equations by completing the square

Our second example uses a coefficient with x2{x}^{2} for solving a quadratic equation by completing the square:

  1. 2x2−4x−2=02{x}^{2}-4x-2=0

  2. 2x2−4x=22{x}^{2}-4x=2

  3. x2−2x=1{x}^{2}-2x=1

  4. x2−2x+(−22)2=1+(−22)2{x}^{2}-2x+{\left(\frac{-2}{2}\right)}^{2}=1+{\left(\frac{-2}{2}\right)}^{2}

  5. x2−2x+(−1)2=1+(−1)2{x}^{2}-2x+{\left(-1\right)}^{2}=1+{\left(-1\right)}^{2}

  6. x2−2x+(−1)2=2{x}^{2}-2x+{\left(-1\right)}^{2}=2

  7. (x−1)2=2{\left(x-1\right)}^{2}=2

  8. x−1=−2x-1=-\sqrt{2}

  9. x−1=2x-1=\sqrt{2}

x=−2+1x=-\sqrt{2+1} and x=2+1x=\sqrt{2+1}.

Challenge example

Our third example is all bells and whistles with really big numbers. See how you do!

  1. 20x2−30x−40=020{x}^{2}-30x-40=0

  2. 20x2−30x=4020{x}^{2}-30x=40

  3. x2−1.5x=2{x}^{2}-1.5x=2

  4. x2−1.5x+(−1.52)2=2+(−1.52)2{x}^{2}-1.5x+{\left(\frac{-1.5}{2}\right)}^{2}=2+{\left(\frac{-1.5}{2}\right)}^{2}

  5. x2−1.5x+(0.75)2=2+(0.75)2{x}^{2}-1.5x+{\left(0.75\right)}^{2}=2+{\left(0.75\right)}^{2}

  6. x2−1.5x+(−0.75)2=4116{x}^{2}-1.5x+{\left(-0.75\right)}^{2}=\frac{41}{16}

  7. (x−0.75)2=4116{\left(x-0.75\right)}^{2}=\frac{41}{16}

  8. x−0.75=−4116x-0.75=-\sqrt{\frac{41}{16}}

  9. x−0.75=4116x-0.75=\sqrt{\frac{41}{16}}

x=(−41+3)4x=\frac{\left(-\sqrt{41+3}\right)}{4} and x=(41+3)4x=\frac{\left(\sqrt{41+3}\right)}{4}.