Completing the square rewrites x² + bx as a perfect square minus a number. It is a way to solve any quadratic, it is where the quadratic formula comes from, and it is the standard way to find the vertex of a parabola or the center of a circle.
The idea
A perfect square trinomial looks like this:
(x + k)² = x² + 2kx + k²
The middle coefficient is 2k and the last term is k². So if you have x² + bx, the number that makes it a perfect square is (b/2)².
| Start | b/2 | Add (b/2)² | Factors as |
|---|---|---|---|
| x² + 6x | 3 | 9 | (x + 3)² |
| x² − 10x | −5 | 25 | (x − 5)² |
| x² + 5x | 5/2 | 25/4 | (x + 5/2)² |
| x² − x | −1/2 | 1/4 | (x − 1/2)² |
Solving an equation
Example Solve x² + 6x − 7 = 0
- Move the constant: x² + 6x = 7.
- Half of 6 is 3, and 3² = 9. Add 9 to both sides: x² + 6x + 9 = 16.
- Factor: (x + 3)² = 16.
- Square root both sides: x + 3 = ±4.
- Solve: x = 1 or x = −7.
Adding to only one side
Adding 9 to the left without adding it to the right changes the equation. Whatever you add to complete the square, add to the other side too.
Forgetting ±
(x + 3)² = 16 has two solutions because both 4² and (−4)² are 16. Dropping the ± loses x = −7.
When the leading coefficient isn’t 1
Divide everything by the leading coefficient first, then complete the square.
Example Solve 2x² − 8x + 3 = 0
- Divide by 2: x² − 4x + 3/2 = 0.
- Move the constant: x² − 4x = −3/2.
- Half of −4 is −2, squared is 4. Add 4: x² − 4x + 4 = 5/2.
- Factor: (x − 2)² = 5/2.
- x − 2 = ±√(5/2) = ±√10/2.
- x = 2 ± √10/2.
Radicals like √(5/2) come up constantly here. The radicals guide covers rationalizing them.
Finding the vertex of a parabola
Vertex form is y = a(x − h)² + k, with vertex (h, k). Completing the square turns standard form into vertex form.
Example Find the vertex of y = x² − 8x + 13
- Group the x terms: y = (x² − 8x) + 13.
- Half of −8 is −4, squared is 16. Add and subtract 16: y = (x² − 8x + 16) − 16 + 13.
- Factor: y = (x − 4)² − 3.
- The vertex is (4, −3). The parabola opens up, so the minimum value is −3.
Example Find the vertex of y = −3x² + 12x + 1
- Factor −3 out of the x terms: y = −3(x² − 4x) + 1.
- Inside, add 4. That actually adds −3 × 4 = −12 to the right side, so add 12 back: y = −3(x² − 4x + 4) + 12 + 1.
- Factor: y = −3(x − 2)² + 13.
- Vertex (2, 13). It opens down, so 13 is the maximum.
The step that goes wrong most often is the second one. When a coefficient sits outside the parentheses, the number you add inside gets multiplied by it. The transformations guide shows what a, h and k do to the graph.
Writing a circle in standard form
Circles follow (x − h)² + (y − k)² = r². When an equation shows up expanded, complete the square twice, once for x and once for y.
Example Find the center and radius of x² + y² + 4x − 6y − 12 = 0
- Group: (x² + 4x) + (y² − 6y) = 12.
- Complete both: add 4 for x and 9 for y, on both sides. (x² + 4x + 4) + (y² − 6y + 9) = 12 + 4 + 9.
- Factor: (x + 2)² + (y − 3)² = 25.
- Center (−2, 3), radius 5.
Where the quadratic formula comes from
Complete the square on ax² + bx + c = 0 with letters instead of numbers:
- Divide by a: x² + (b/a)x = −c/a.
- Add (b/2a)²: (x + b/2a)² = b²/4a² − c/a = (b² − 4ac)/4a².
- Square root: x + b/2a = ±√(b² − 4ac)/2a.
- Subtract: x = (−b ± √(b² − 4ac))/2a.
So the quadratic formula is completing the square done once, in general.
When to use it
- The problem asks for vertex form, a maximum or minimum, or a circle’s center and radius.
- The x coefficient is even and the leading coefficient is 1, so the numbers stay clean.
- Otherwise, for just solving, factoring or the formula is usually quicker.
Try these
Solve x² + 4x − 5 = 0 by completing the square.
Show answer
x = 1 or x = −5. (x + 2)² = 9.
Solve x² − 2x − 4 = 0.
Show answer
x = 1 ± √5. (x − 1)² = 5.
Write y = x² + 10x + 18 in vertex form.
Show answer
y = (x + 5)² − 7. Vertex (−5, −7).
Find the vertex of y = 2x² − 12x + 7.
Show answer
(3, −11). y = 2(x − 3)² − 11.
Find the center and radius of x² + y² − 10x + 2y + 17 = 0.
Show answer
Center (5, −1), radius 3. (x − 5)² + (y + 1)² = 9.
What number completes the square for x² + 7x?
Show answer
49/4, since (7/2)² = 49/4.