Completing the Square
Turn any quadratic into a perfect square to solve it, convert standard form to vertex form, and handle equations where a is not 1.
Welcome back!
Step 1 of 13Learn
Building a square
Picture x2 + 6x as a set of tiles: one big x-by-x square, plus six thin x-by-1 strips. Split the strips into two groups of three and lay them along two sides of the big square. You now have an almost-complete larger square, x + 3 on each side, with a 3-by-3 corner missing.
Add those 9 small tiles and the square is complete:
x2 + 6x + 9 = (x + 3)2
That's completing the square. For any expression x2 + bx, the number that completes it is
(b/2)2
Take half of b, then square it.
- x2 + 10x: half of 10 is 5, and 52 = 25. So x2 + 10x + 25 = (x + 5)2.
- x2 − 8x: half of −8 is −4, and (−4)2 = 16. So x2 − 8x + 16 = (x − 4)2.
- x2 + 3x: half of 3 is 3/2, and (3/2)2 = 9/4. So x2 + 3x + 9/4 = (x + 3/2)2.
The number inside the parentheses is always half of b, with the same sign. The added constant is always positive, because it's a square.
Why bother? Because once you have a perfect square, you can solve with the square root method from the previous module, and this works for every quadratic, factorable or not.
Step 2 of 13Practice · Diagram
The tiles of x² + 6x + 9
Which piece is missing from x² + 6x and must be added?
Tap the shape that answers the question, then press Check.
- (x + 3)²
- x²: the big square
An x-by-x tile.
- 3x: strips on top
Three x-by-1 strips along one side.
- 3x: strips on the side
The other three strips along the second side.
- 9: the corner
A 3-by-3 block of unit tiles: (b/2)2 = 32.
Step 3 of 13Practice · Fill in the blanks
Fill in the blanks
To complete the square for x2 + 12x, add . Then x2 + 12x + 36 = (x + )2.
Step 4 of 13Explore
Completing the square for x² + bx
The curve is y = x2 + bx + (b/2)2. For every b it is a perfect square, so it touches the x-axis exactly once, at x = −b/2.
- Number to add, (b/2)²
- 9
- Touches the axis at x =
- -3
Step 5 of 13Learn
Solving by completing the square
Here's the full method for x2 + bx + c = 0 when a = 1. Example: x2 + 6x − 7 = 0.
- Move the constant to the right: x2 + 6x = 7.
- Add (b/2)2 to both sides: (6/2)2 = 9, so x2 + 6x + 9 = 7 + 9 = 16.
- Write the left side as a square: (x + 3)2 = 16.
- Take square roots with ±: x + 3 = ±4.
- Solve: x = −3 ± 4, so x = 1 or x = −7.
This equation also factors, (x + 7)(x − 1) = 0, giving the same answers. The power of completing the square shows up with something like x2 − 8x + 3 = 0, which doesn't factor:
- x2 − 8x = −3
- Add 16: x2 − 8x + 16 = 13
- (x − 4)2 = 13
- x − 4 = ±√13
- x = 4 ± √13, about 7.61 and 0.39
The step people miss is adding (b/2)2 to both sides. The equation is a balance; adding 9 on the left without adding 9 on the right changes the problem.
Step 6 of 13Practice · Put in order
Put the steps for solving x2 − 10x + 21 = 0 by completing the square in order.
Drag the items, or use the arrow buttons, to put them in order.
- Take square roots: x − 5 = ±2
- Solve: x = 7 or x = 3
- Write the square: (x − 5)2 = 4
- Move the constant: x2 − 10x = −21
- Add 25 to both sides: x2 − 10x + 25 = 4
Step 7 of 13Practice · Work it out
Solve x2 − 4x − 12 = 0 by completing the square. What is the positive solution?
Step 8 of 13Learn
When a is not 1, and vertex form
Completing the square needs the x2 coefficient to be 1. If it isn't, divide every term by a first.
Solve 2x2 + 12x + 10 = 0.
- Divide by 2: x2 + 6x + 5 = 0
- Move the constant: x2 + 6x = −5
- Add 9: (x + 3)2 = 4
- x + 3 = ±2, so x = −1 or x = −5
Converting to vertex form uses the same idea without an equals-zero equation. For y = x2 + 6x + 2, add and subtract 9 on the same side, which changes nothing overall:
y = (x2 + 6x + 9) − 9 + 2 = (x + 3)2 − 7
The vertex is (−3, −7). This is where the formula x = −b/(2a) comes from: completing the square always puts the vertex at x = −b/(2a).
When a ≠ 1 in vertex-form conversion, factor a out of the x-terms instead of dividing: y = 2x2 − 12x + 5 = 2(x2 − 6x) + 5 = 2(x2 − 6x + 9) − 18 + 5 = 2(x − 3)2 − 13. The −18 appears because the 9 you added inside is multiplied by 2.
Step 9 of 13Compare
Equation or function?
| Aspect | Equation (= 0) | Function (y = …) |
|---|---|---|
| Example | x² + 6x − 7 = 0 | y = x² + 6x + 2 |
| What you do with 9 | Add it to both sides | Add and subtract it on one side |
| Result | (x + 3)² = 16, so x = 1 or −7 | y = (x + 3)² − 7, vertex (−3, −7) |
| Goal | Solve for x | Read the vertex |
Step 10 of 13Note
Step 11 of 13Practice · Choose one
What number completes the square for x2 − 14x?
Step 12 of 13Practice · Spot the mistake
Ella solved x2 + 6x + 1 = 0. Tap the first line with an error.
Step 13 of 13Practice · Work it out
Write y = x2 − 10x + 30 in vertex form. What is the minimum value of y?
Lesson complete!