Completing the square turns x² + bx + c into a perfect square plus a constant. Here is the method, with examples you can check line by line.
What is completing the square?
Completing the square means rewriting a quadratic like x² + 6x + 5 as a squared binomial plus a number, such as (x + 3)² − 4. You add the exact constant that makes the first part a perfect square trinomial, then subtract it again so the value doesn't change.
Once you know how to complete the square, you can solve any quadratic equation, find the vertex of a parabola, and see where the quadratic formula comes from. It takes a few more lines than factoring, but it works every time, even when the answers are irrational.
What is the completing the square formula?
The pattern is x² + bx = (x + b/2)² − (b/2)². In words: take half of b, square it, add it to make a perfect square, and subtract the same amount to keep things balanced.
It works because (x + b/2)² expands to x² + bx + (b/2)². So the only thing missing from x² + bx is the (b/2)² term. For a quick check, x² + 8x becomes (x + 4)² − 16, because half of 8 is 4 and 4² is 16.
How do you complete the square when a = 1?
When the x² term has no coefficient, halve the x coefficient, square it, add and subtract that number, then group. Take x² + 6x + 5 as the example.
- Half of 6 is 3, and 3² = 9.
- Add and subtract 9: x² + 6x + 9 − 9 + 5.
- Group the perfect square: (x² + 6x + 9) − 9 + 5.
- Factor and combine: (x + 3)² − 4.
How do you complete the square when a ≠ 1?
Factor a out of the x² and x terms only, complete the square inside the parentheses, then multiply the subtracted constant by a as you bring it out. Here is 2x² + 8x + 3.
- Factor 2 out of the first two terms: 2(x² + 4x) + 3.
- Inside, half of 4 is 2, and 2² = 4. Add and subtract it: 2(x² + 4x + 4 − 4) + 3.
- Move the −4 out. It gets multiplied by 2: 2(x² + 4x + 4) − 8 + 3.
- Write the square and combine: 2(x + 2)² − 5.
How do you solve a quadratic equation by completing the square?
Move the constant to the right side, complete the square on the left, add the same number to the right, then take the square root of both sides with ±. Try x² − 4x − 1 = 0, which doesn't factor over whole numbers.
How does completing the square give you vertex form?
The result of completing the square, a(x − h)² + k, is vertex form, and the vertex of the parabola is (h, k). Because a squared term is never negative, the smallest (or largest) value happens when x − h = 0.
From the first example, x² + 6x + 5 = (x + 3)² − 4. Read it as (x − (−3))² + (−4), so the vertex is (−3, −4). For 2x² + 8x + 3 = 2(x + 2)² − 5, the vertex is (−2, −5). The guide to vertex form of a quadratic covers graphing from this form in more detail.
How does completing the square prove the quadratic formula?
If you complete the square on the general equation ax² + bx + c = 0, the quadratic formula falls out at the end. You don't need to memorize the derivation, but seeing it once makes the formula feel less random.
How do you complete the square when a is negative?
Factor out the negative a from the x terms, so the x² term inside the parentheses is positive. Then complete the square as usual, and remember that the constant you bring out gets multiplied by a negative number.
Take −x² + 6x − 5. Factoring −1 out of the first two terms gives −(x² − 6x) − 5. Half of −6 is −3, and (−3)² = 9. Adding 9 inside the parentheses takes 9 away from from the whole expression, so you add 9 outside to make up for it.
What mistakes do people make when completing the square?
Most errors come from bookkeeping. These are the ones to watch for.
- Adding (b/2)² to only one side of an equation. Both sides need it.
- Forgetting to subtract the added number when you're rewriting an expression.
- Not factoring out a first, or forgetting to multiply the subtracted constant by a.
- Dropping the ± when taking the square root, which loses one of the two solutions.
- Reading the vertex sign wrong. In (x + 3)² − 4, h is −3, not 3.
When should you complete the square instead of factoring?
Use it when you need vertex form, or when an equation doesn't factor nicely and the x coefficient is even. If b is even and a is 1, the numbers stay whole and the method is often quicker than the quadratic formula.
If the trinomial factors easily, like x² + 6x + 5 = (x + 1)(x + 5), factoring is faster for solving. If the coefficients are messy fractions, the quadratic formula usually takes fewer steps. Completing the square sits between the two and handles every case.
Frequently asked questions
What number do you add to complete the square?
You add (b/2)², the square of half the x coefficient, after making the x² coefficient 1. For x² + 10x, half of 10 is 5, so you add 25. In an expression you also subtract 25 to keep it equal.
Can you complete the square when b is odd?
Yes. Half of b is then a fraction. For x² + 5x, half of 5 is 5/2, so you add 25/4 and get (x + 5/2)² − 25/4. The method is the same, there are just fractions to carry.
Does completing the square always work?
Yes, for any quadratic with real coefficients. If the number on the right side is negative after you complete the square, the equation has no real solutions, and the square root gives complex answers instead.
Is completing the square the same as vertex form?
Completing the square is the method, and vertex form is the result. When you complete the square on ax² + bx + c, you get a(x − h)² + k, which is vertex form with vertex (h, k).
Why is it called completing the square?
Picture x² + bx as a square with side x plus a rectangle of area bx. Cut the rectangle in half and attach one half to each of two sides of the square. A small corner is left empty, with area (b/2)², and filling it in completes the square.
How do I check my answer?
Expand your result and compare it with the original. For equations, substitute each solution back in. For x = 2 + √5 in x² − 4x − 1, you get (9 + 4√5) − (8 + 4√5) − 1 = 0.