Completing the Square
A quadratic like x^2 + bx + c rarely factorises into a neat perfect
square on its own. Completing the square rewrites it so that it
does contain a perfect square — a single squared bracket — plus a leftover number:
x^2 + bx + c = \left(x + \tfrac{b}{2}\right)^2 + \left(c - \left(\tfrac{b}{2}\right)^2\right)
The squared bracket uses \tfrac{b}{2} — exactly half of the
x-coefficient. The leftover number repairs the difference, because
expanding
\left(x + \tfrac{b}{2}\right)^2 gives an extra
\left(\tfrac{b}{2}\right)^2 that we must subtract back off.
A worked example
Take x^2 + 6x + 5. Half of 6 is
3, so the square is (x + 3)^2. But
(x + 3)^2 = x^2 + 6x + 9 — that is 4 too
big compared with the +5 we started with, so we subtract
4:
x^2 + 6x + 5 = (x + 3)^2 - 4
Check it: (x + 3)^2 - 4 = x^2 + 6x + 9 - 4 = x^2 + 6x + 5. Both forms
describe the same expression — one just wears its square on the outside.
Why "completing the square"?
The name is literal. Picture x^2 as a square of side
x, and bx as a strip beside it. Cut the
strip in half, lay the two \tfrac{b}{2}-wide halves along two sides of
the square, and you almost have a bigger square of side
x + \tfrac{b}{2} — except for a missing little corner of area
\left(\tfrac{b}{2}\right)^2. Fill that corner in and the square is
complete; since we added \left(\tfrac{b}{2}\right)^2, we must
subtract it again to keep the value unchanged. Step through it.
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. It is the engine behind the quadratic formula
and the key to finding the turning point of a parabola.
See it explained
Khan Academy walks through completing the square step by step: