Allday Education

Completing the Square

Completing the square rewrites a quadratic so one side is a perfect square trinomial. It is the move behind the quadratic formula and the way to find a parabola's vertex.

The core step: to complete x2+bxx^2 + bx, add (b2)2\left(\dfrac{b}{2}\right)^2. That is the number that makes the trinomial factor as a perfect square.

The magic number

Take half of the coefficient of xx and square it. For x2+12xx^2 + 12x, half of 1212 is 66, and 62=366^2 = 36.

Adding 3636 makes x2+12x+36=(x+6)2x^2 + 12x + 36 = (x + 6)^2, a perfect square. That (b2)2\left(\dfrac{b}{2}\right)^2 is the number you always add.

Using it to solve

To solve, add the magic number to both sides so the left becomes a perfect square, then solve by taking the square root.

Keep the equation balanced — whatever you add on the left you add on the right too. Then finish with the square-root method.

The same move converts a quadratic to vertex form: x2+2x3x^2 + 2x - 3 becomes (x+1)24(x + 1)^2 - 4, so its parabola has vertex (1,4)(-1, -4), the lowest point shown below.

-5-4-3-2-1123-4-3-2-11234xy
(1,4)(-1, -4)

Worked examples

Example 1: finding the number

What number completes the square for x2+12xx^2 + 12x?

Half the middle coefficient122=6\dfrac{12}{2} = 6
Square it62=366^2 = 36

Answer: 3636

Example 2: writing the square

Complete the square: x2+12x+36=x^2 + 12x + 36 = ?

It factors as a perfect square(x+6)2(x + 6)^2

Answer: (x+6)2(x + 6)^2

Example 3: using it to solve an equation

Solve x2+8x9=0x^2 + 8x - 9 = 0 by completing the square.

Move the constant to the rightx2+8x=9x^2 + 8x = 9
Add half of 8, squared, to both sidesx2+8x+16=25x^2 + 8x + 16 = 25
The left is now a perfect square(x+4)2=25(x + 4)^2 = 25
Take the square root of both sidesx+4=±5x + 4 = \pm 5

Answer: x=1x = 1 or x=9x = -9

Try one yourself

Common questions

What number do I add?

Half of the x-coefficient, squared: (b2)2\left(\dfrac{b}{2}\right)^2. For x2+12xx^2 + 12x that is 62=366^2 = 36.

What if there's a coefficient on x-squared?

Factor it out of the x-squared and x terms first, complete the square inside, then account for the factor. The magic-number step applies to the bracket.

Why is completing the square useful?

It solves any quadratic, derives the quadratic formula, and converts to vertex form to read a parabola's vertex directly.

Want the video version?

Allday Everyday Math has video lessons, practice, and an AI tutor for every topic, Pre-Algebra through Algebra 2.

Try it for $1