Completing the Square
How high does a thrown ball climb before it drops back? What ticket price earns a concert the
most money? Both answers sit at the very top (or bottom) of a quadratic curve, and completing
the square is the move that pins that turning point down exactly — no guessing, no graph
needed.
A jigsaw with a missing corner
Take the expression x^2 + 6x and — strange as it sounds —
draw it. The x^2 is a square, x
units on each side. The 6x is a strip, x
tall and 6 wide. Snip the strip in half and lay one
3-wide piece along the right of the square and the other along the
bottom. Look at what you've made: it is almost a bigger square of side
x + 3 … except for a small square hole in the corner,
3 \times 3 = 9 in area.
Drop a 9 into that hole and the jigsaw is finished — the picture
becomes a perfect square:
x^2 + 6x + 9 = (x + 3)^2
That is the whole trick, and the name is completely literal: we complete the
square. It is probably the most geometric move in all of school algebra — a
thousand-year-old scissors-and-paper idea that still powers the
quadratic formula
today. Of course, algebra doesn't let us just add a 9 that wasn't there — we'll have
to pay it back. That bookkeeping is the rest of this page.
The picture, in general
The same construction works for any x^2 + bx, not just
b = 6. Step through the figure below and watch each move. Notice
why the halving is forced on us: the strip must be shared equally between two sides of
the square — right and bottom — or the shape won't be square at all. Two equal shares of
b means each share is \tfrac{b}{2}, and
that is exactly why "half the x-coefficient" appears in every
completed square you will ever write.
The final frame is the key identity. The corner we filled in has area
\left(\tfrac{b}{2}\right)^2, and since we invented that area out of
nothing, honesty demands we subtract it straight back off:
x^2 + bx = \left(x + \tfrac{b}{2}\right)^2 - \left(\tfrac{b}{2}\right)^2
Every quadratic can be rewritten with a single squared bracket:
-
x^2 + bx + c = \left(x + \tfrac{b}{2}\right)^2 + c - \left(\tfrac{b}{2}\right)^2
- The number inside the bracket is half the x-coefficient.
- The correction term -\left(\tfrac{b}{2}\right)^2 cancels the extra area the square sneaks in.
- If a \neq 1, factor a out of the x-terms first, then complete inside the bracket.
Worked example: x^2 + 6x + 2
Here is the whole routine, one honest step at a time.
-
Set the constant aside. Focus on x^2 + 6x; the
+2 will wait patiently at the end.
-
Halve the x-coefficient. Half of
6 is 3, so the bracket is
(x + 3)^2.
-
Subtract the square you smuggled in. Expanding gives
(x + 3)^2 = x^2 + 6x + 9 — a 9 we never
had. So x^2 + 6x = (x + 3)^2 - 9.
-
Bring the constant back.
x^2 + 6x + 2 = (x + 3)^2 - 9 + 2 = (x + 3)^2 - 7
Always check by expanding:
(x + 3)^2 - 7 = x^2 + 6x + 9 - 7 = x^2 + 6x + 2. ✓ Same expression,
new outfit — one form wears its square on the outside.
A negative b changes nothing except the sign inside the bracket:
for x^2 - 10x + 3, half of -10 is
-5, so
x^2 - 10x + 3 = (x - 5)^2 - 25 + 3 = (x - 5)^2 - 22.
The payoff: read the turning point straight off
Why bother? Because the completed form tells you where the parabola turns. Take our
answer, (x + 3)^2 - 7, and think about what a square can do. A
squared number is never negative — the smallest it can be is
0, and that happens at exactly one moment: when
x + 3 = 0, i.e. x = -3. At that instant
the whole expression bottoms out at 0 - 7 = -7. Move
x anywhere else and the square turns positive, lifting the value
back up.
So the parabola
y = x^2 + 6x + 2 has its minimum point at
(-3, -7), with a line of symmetry at
x = -3 — no calculus, no table of values, just reading the two
numbers off (x + 3)^2 - 7. In general
(x + p)^2 + q turns at (-p, q): the
bracket slides the curve sideways (mind the minus!), the tail number slides it
up and down. Play with both below and watch the vertex obey.
The sliders start at p = 3,\; q = -7 — our worked example. Notice
the bowl's lowest point sitting at (-3, -7), exactly where the
completed square said it would.
Solving equations from the completed form
Completed-square form also solves the quadratic — even one that refuses to factorise.
Solve x^2 + 6x + 2 = 0:
(x + 3)^2 - 7 = 0
(x + 3)^2 = 7
Now take the square root of both sides — remembering that 7 has
two square roots, one positive and one negative:
x + 3 = \pm\sqrt{7} \qquad\Longrightarrow\qquad x = -3 \pm \sqrt{7}
Those are exact answers, written as
surds —
roughly -0.35 and -5.65, but the surd
form is perfectly precise where the decimals are rounded. Exam questions that say "give your
answer in exact form" are asking for exactly this. Forgetting the
\pm throws away one of the two solutions — a parabola crossing the
axis crosses it twice.
When a \neq 1: factor first
A leading coefficient spoils the picture — 2x^2 isn't a square of
side x. The fix: factor the coefficient out of the
x-terms first (leave the constant alone), then complete
inside the bracket. Take 2x^2 + 8x + 5:
2x^2 + 8x + 5 = 2\left(x^2 + 4x\right) + 5
Inside the bracket, half of 4 is 2, so
x^2 + 4x = (x + 2)^2 - 4. Substitute that in — and here is the
step that catches people: the -4 is still inside the
2(\;\cdot\;), so it gets doubled on the way out:
2\left[(x + 2)^2 - 4\right] + 5 = 2(x + 2)^2 - 8 + 5 = 2(x + 2)^2 - 3
Check: 2(x+2)^2 - 3 = 2(x^2 + 4x + 4) - 3 = 2x^2 + 8x + 8 - 3 = 2x^2 + 8x + 5. ✓
And the payoff still works: the minimum of 2(x + 2)^2 - 3 is at
(-2, -3) — the squared bracket is smallest (zero) at
x = -2, leaving -3.
-
The square sneaks in extra. x^2 + 6x is
not (x + 3)^2 — expanding the bracket smuggles in a
+9 that was never there. Halve b,
then subtract the square of that half, every single time:
x^2 + 6x = (x + 3)^2 - 9.
-
The vertex sign flips. (x + 3)^2 - 7 has its
minimum at x = -3, not +3 — the
bracket is zero when x + 3 = 0. Plus inside the bracket means
the graph slides to the left. If in doubt, ask "what makes the bracket zero?"
-
With a \neq 1, factor a out
of the x-terms only — not the constant — and remember
that the subtracted square is still inside the a(\;\cdot\;), so
it gets multiplied by a when the brackets come off. Writing
2(x+2)^2 - 4 + 5 instead of
2(x+2)^2 - 8 + 5 is the single most common error on this topic.
Around 820 CE, in the House of Wisdom in Baghdad, the mathematician
al-Khwarizmi solved the equation x^2 + 10x = 39 —
and he did it with pictures, almost exactly the figure on this page. He drew the
x^2 square, split the 10x into strips
laid along its sides, and filled in the missing 5 \times 5 corner:
adding 25 to both sides gives
(x + 5)^2 = 64, so x + 5 = 8 and
x = 3. For him this wasn't a metaphor — the square genuinely got
completed, area by area. (Negative solutions had to wait a few more centuries;
lengths can't be negative.)
His book's title, al-Kitāb al-mukhtaṣar fī ḥisāb al-jabr
wa'l-muqābala — "the compendium on calculation by restoring and balancing" — gave us the
very word algebra. And the trick never stopped paying: complete the square on
the fully general ax^2 + bx + c = 0, once, with letters instead of
numbers, and out pops the
quadratic formula —
it isn't a separate fact to memorise, it's this page's move done once and for all.
Where this fits
The move builds straight on
factorising harder quadratics:
when a quadratic refuses to factorise into whole-number brackets, completing the square
always works — it never needs the constant to cooperate, because the leftover number
simply absorbs whatever is left. That reliability is why it earns its keep three ways at
once: it is the engine behind the quadratic formula, the fastest route to a parabola's
turning point and line of symmetry, and the standard way to write exact
(surd) solutions.
Expanding
undoes it, which is also your built-in answer check.
See it explained
Prefer to watch the whole routine performed live? Khan Academy walks through solving a
quadratic by completing the square, step by step — a good second pass once you've worked the
examples above yourself: