Skip to main content

How to Complete the Square

Written by Awn · Published · 7 min read

Quick Answer

To learn how to complete the square, start with x squared plus bx on one side and the number on the other. Take half of b, square it, and add it to both sides. Write the left side as a squared bracket. Then take square roots of both sides and solve for x.

What Does Completing the Square Mean?

It means turning x2+bxx^2+bx into a perfect square, such as (x+4)2(x+4)^2. Perfect squares are useful because a square root undoes them.

Picture x2+8xx^2+8x as a square with two strips along its sides. The strips are 4 wide. They leave a 4 by 4 gap in the corner. Adding 16 fills the gap, and you have a full square with sides x+4x+4.

How to complete the square as a picture: fill the missing corner of x squared plus 8x with 16

How to Complete the Square in 5 Steps

  1. Divide every term by aa, if the number in front of x2x^2 is not 1.
  2. Move the plain number to the right side.
  3. Take half of the number in front of xx, square it, and add it to both sides.
  4. Write the left side as (x+b2)2\left(x+\frac{b}{2}\right)^2.
  5. Take square roots, with ±\pm, and solve for xx.

How to complete the square steps for x squared minus 8x plus 7 equals 0

Why half of bb? Because (x+p)2=x2+2px+p2(x+p)^2=x^2+2px+p^2. The middle number is double pp, so pp is half of it.

You can watch the same five steps on your own problem with the complete the square calculator.

Completing the Square to Find Vertex Form

An expression has no second side, so you can't add to both sides. Add and subtract the same number instead.

Write x2−6x+11x^2-6x+11 in vertex form:

  1. Half of −6-6 is −3-3, and (−3)2=9(-3)^2=9.
  2. Add and subtract 9: x2−6x+9−9+11x^2-6x+9-9+11.
  3. Group the square: (x−3)2+2(x-3)^2+2.

The vertex is (3,2)(3,2). Since the square is never negative, the smallest value is 2.

How It Leads to the Quadratic Formula

If you complete the square with letters instead of numbers, you get the quadratic formula. Start with ax2+bx+c=0ax^2+bx+c=0.

  1. Divide by aa: x2+bax+ca=0x^2+\frac{b}{a}x+\frac{c}{a}=0.
  2. Move the number: x2+bax=−cax^2+\frac{b}{a}x=-\frac{c}{a}.
  3. Half of ba\frac{b}{a} is b2a\frac{b}{2a}. Square it and add it to both sides.
  4. The left side becomes (x+b2a)2\left(x+\frac{b}{2a}\right)^2. The right side becomes b2−4ac4a2\frac{b^2-4ac}{4a^2}.
  5. Take square roots and subtract b2a\frac{b}{2a}.

The result is x=−b±b2−4ac2ax=\frac{-b\pm\sqrt{b^2-4ac}}{2a}. So the formula is not a separate method. It is this method, done once for every quadratic. If you ever forget the formula, you can rebuild it this way.

When Should You Complete the Square?

GoalBest method
Find roots, easy numbersFactor
Find roots, any numbersQuadratic formula
Find the vertex or rewrite a circleComplete the square
bb is even and aa is 1Complete the square is quick

The other methods are compared in how to solve quadratic equations.

Completing the Square Examples

Example 1: An Even Middle Number

Solve x2−8x+7=0x^2-8x+7=0.

  1. Move the 7: x2−8x=−7x^2-8x=-7.
  2. Half of −8-8 is −4-4. Square it and add 16: x2−8x+16=9x^2-8x+16=9.
  3. Write the square: (x−4)2=9(x-4)^2=9.
  4. Square roots: x−4=±3x-4=\pm 3, so x=7x=7 or x=1x=1.

Example 2: A Number in Front

Solve 2x2−12x+10=02x^2-12x+10=0.

  1. Divide by 2: x2−6x+5=0x^2-6x+5=0.
  2. Move the 5: x2−6x=−5x^2-6x=-5.
  3. Add 9: (x−3)2=4(x-3)^2=4.
  4. Square roots: x−3=±2x-3=\pm 2, so x=5x=5 or x=1x=1.

Example 3: An Odd Middle Number

Solve x2+5x+3=0x^2+5x+3=0.

  1. Move the 3: x2+5x=−3x^2+5x=-3.
  2. Half of 5 is 52\frac{5}{2}, and its square is 254\frac{25}{4}. Add it to both sides: (x+52)2=134\left(x+\frac{5}{2}\right)^2=\frac{13}{4}.
  3. Square roots: x+52=±132x+\frac{5}{2}=\pm\frac{\sqrt{13}}{2}.
  4. So x=−52+132x=-\frac{5}{2}+\frac{\sqrt{13}}{2} or x=−52−132x=-\frac{5}{2}-\frac{\sqrt{13}}{2}.

Example 4: No Real Roots

Solve x2−4x+8=0x^2-4x+8=0.

  1. Move the 8 and add 4: (x−2)2=−4(x-2)^2=-4.
  2. Square roots of a negative give ii: x−2=±2ix-2=\pm 2i.
  3. So x=2+2ix=2+2i or x=2−2ix=2-2i.

Example 5: Vertex Form With a Number in Front

Write 2x2+12x+72x^2+12x+7 in vertex form.

  1. Take 2 out of the first two terms only: 2(x2+6x)+72(x^2+6x)+7.
  2. Half of 6 is 3, and 32=93^2=9. Add and subtract 9 inside: 2(x2+6x+9−9)+72(x^2+6x+9-9)+7.
  3. Move the −9-9 out. It is multiplied by 2, so it becomes −18-18: 2(x+3)2−18+72(x+3)^2-18+7.
  4. Combine: 2(x+3)2−112(x+3)^2-11.

The vertex is (−3,−11)(-3,-11). Since the number in front is positive, the graph opens up and −11-11 is the smallest value.

Example 6: A Word Problem

A rectangular garden is 6 feet longer than it is wide. Its area is 91 square feet. How wide is it?

  1. Let xx be the width. Then x(x+6)=91x(x+6)=91, or x2+6x=91x^2+6x=91.
  2. Half of 6 is 3. Add 9 to both sides: (x+3)2=100(x+3)^2=100.
  3. Square roots: x+3=±10x+3=\pm 10, so x=7x=7 or x=−13x=-13.

A width can't be negative, so the garden is 7 feet wide and 13 feet long. Check: 7⋅13=917\cdot 13=91.

Example 7: A Circle

Find the center and radius of x2+y2−6x+4y−12=0x^2+y^2-6x+4y-12=0.

  1. Group by letter and move the number: (x2−6x)+(y2+4y)=12(x^2-6x)+(y^2+4y)=12.
  2. Complete each square. Half of −6-6 is −3-3, so add 9. Half of 4 is 2, so add 4.
  3. Add both numbers on the right too: (x−3)2+(y+2)2=12+9+4=25(x-3)^2+(y+2)^2=12+9+4=25.

The center is (3,−2)(3,-2), and the radius is 25=5\sqrt{25}=5. This is how you complete the square with two letters: you just do it twice.

Example 8: A Fraction in Front

Solve 12x2+3x−8=0\frac{1}{2}x^2+3x-8=0.

  1. Multiply every term by 2, so the number in front becomes 1: x2+6x−16=0x^2+6x-16=0.
  2. Move the 16: x2+6x=16x^2+6x=16.
  3. Add 9 to both sides: (x+3)2=25(x+3)^2=25.
  4. Square roots: x+3=±5x+3=\pm 5, so x=2x=2 or x=−8x=-8.

How to Check a Completed Square

Expand it. For Example 5, 2(x+3)2−11=2(x2+6x+9)−11=2x2+12x+72(x+3)^2-11=2(x^2+6x+9)-11=2x^2+12x+7. That is the expression we started with.

You can also look at the two middle numbers. In (x+p)2(x+p)^2, the middle term must be 2px2px. If you wrote (x+3)2(x+3)^2 for x2+6xx^2+6x, then 2⋅3=62\cdot 3=6, which fits.

For an equation, put both roots back in. There is a faster check as well. When the number in front of x2x^2 is 1, the two roots add to the opposite of bb and multiply to cc. In Example 1, 7+1=87+1=8 and 7⋅1=77\cdot 1=7, which match x2−8x+7x^2-8x+7.

What the Finished Square Tells You

Form you reachWhat it means
(x−4)2=9(x-4)^2=9A positive number: two real roots
(x−4)2=0(x-4)^2=0Zero: one repeated root
(x−4)2=−9(x-4)^2=-9A negative number: two complex roots
y=(x−3)2+2y=(x-3)^2+2A graph with its vertex at (3,2)(3,2)

So before you take square roots, look at the number on the right. Its sign tells you what kind of answer to expect.

Common Mistakes

Squaring Before Halving

Half of 8 is 4, and 42=164^2=16. Squaring first and then halving gives 32, which is wrong.

Forgetting the Plus or Minus

(x−4)2=9(x-4)^2=9 has two answers, because both 3 and −3-3 square to 9.

Adding the Wrong Amount in Vertex Form

In 2(x2+4x)2(x^2+4x), adding 4 inside the bracket really adds 8. Subtract 8 outside to balance it.

Leaving a Number in Front of the Square Term

The half-and-square step works only when the number in front of x2x^2 is 1. For 2x2−12x+10=02x^2-12x+10=0, divide everything by 2 first. If you skip that, half of −12-12 leads nowhere.

Adding to One Side Only

The number you add changes the left side. Add it to the right side too, or the equation is no longer true.

Practice Problems

  1. Solve x2+2x−8=0x^2+2x-8=0.
  2. Solve x2−10x+16=0x^2-10x+16=0.
  3. Solve x2+3x+1=0x^2+3x+1=0.
  4. Solve 3x2+6x−9=03x^2+6x-9=0.
  5. Write x2+4x+9x^2+4x+9 in vertex form.
Show the answers
  1. x=2x=2 or x=−4x=-4
  2. x=8x=8 or x=2x=2
  3. x=−32+52x=-\frac{3}{2}+\frac{\sqrt{5}}{2} or x=−32−52x=-\frac{3}{2}-\frac{\sqrt{5}}{2}
  4. x=1x=1 or x=−3x=-3
  5. (x+2)2+5(x+2)^2+5

Check Your Answer With the Calculator

Put each root back into the first equation. Then compare your steps in the calculator for completing the square. For a class-style explanation, see Quadratic Equations, Part II in Paul's Online Notes.

FAQ

What Are the Completing the Square Steps?

Divide by aa, move the constant, add the square of half of bb to both sides, write the square, then take square roots.

Can You Always Complete the Square?

Yes. It works on every quadratic. The numbers may be fractions, and the roots may be complex.

How Do You Complete the Square With Fractions?

Halve the fraction by doubling its bottom number, then square it. Half of 23\frac{2}{3} is 13\frac{1}{3}, and its square is 19\frac{1}{9}.

Why Is It Called Completing the Square?

Because x2+bxx^2+bx can be drawn as a square with a corner missing. The number you add is the area of that corner.

Is Completing the Square Used After Algebra?

Yes. It gives the center and radius of a circle, and it helps with some integrals in calculus.

What Number Do You Add to Complete the Square?

Add the square of half the number in front of xx. For x2+10xx^2+10x, half of 10 is 5, so add 25. The sign of the middle number does not matter here, because a square is never negative.

Is Completing the Square Better Than the Quadratic Formula?

For solving, the formula is often faster when the middle number is odd. For finding a vertex or the center of a circle, completing the square gives the answer directly, and the formula does not.


Next step: pick a quadratic with an even middle number and say each move out loud. Knowing how to complete the square by heart also means you can rebuild the quadratic formula if you forget it.

Try the Calculator

Related Pages