How to complete the square is a rewrite of a quadratic into a perfect-square form. The standard algebraic target is a vertex form \(a \cdot (x + h)^2 + k\), which is equivalent to \(a \cdot x^2 + b \cdot x + c\) and reveals the parabola’s vertex and many solution methods immediately.
Perfect-square identity
The central pattern is the expansion of a binomial square:
A quadratic expression contains a perfect-square trinomial whenever the constant term matches the square of half the coefficient on the linear term (after normalization).
Monic quadratic \(x^2 + b \cdot x + c\)
For a leading coefficient \(1\), the linear coefficient \(b\) fixes the shift \(p\) by matching \(2 \cdot p = b\), so \(p = \frac{b}{2}\). The rewrite introduces \(\left(\frac{b}{2}\right)^2\) and compensates with subtraction to preserve equality:
The constant adjustment is \(c - \left(\frac{b}{2}\right)^2\). No numerical value is “added” without also being “subtracted”; the expression is reorganized into a square plus a remainder.
General quadratic \(a \cdot x^2 + b \cdot x + c\)
When \(a \neq 1\), normalization places a monic quadratic inside parentheses. Factoring \(a\) from the quadratic terms yields:
The perfect square is formed inside the parentheses using \(\frac{b}{a}\) as the linear coefficient:
Substituting back gives the completed-square (vertex) form:
| Standard form | Completed-square form | Vertex parameters |
|---|---|---|
| \(x^2 + b \cdot x + c\) | \(\left(x + \frac{b}{2}\right)^2 + \left(c - \left(\frac{b}{2}\right)^2\right)\) | \(h = \frac{b}{2}\), \(k = c - \left(\frac{b}{2}\right)^2\) |
| \(a \cdot x^2 + b \cdot x + c\) | \(a \cdot \left(x + \frac{b}{2 \cdot a}\right)^2 + \left(c - \frac{b^2}{4 \cdot a}\right)\) | \(h = \frac{b}{2 \cdot a}\), \(k = c - \frac{b^2}{4 \cdot a}\) |
Worked example
Consider \(x^2 + 6 \cdot x + 5\). The half-linear coefficient is \(\frac{6}{2} = 3\), so the square term is \(3^2 = 9\):
Solving a quadratic after square completion
The completed-square form reduces many equations to a single square-root operation. For example, the equation \(x^2 + 6 \cdot x + 5 = 0\) becomes:
Common pitfalls
- Half-coefficient mismatch: the linear term in \((x + p)^2\) is \(2 \cdot p \cdot x\), so \(p\) equals one-half of the linear coefficient after normalization.
- Leading coefficient handling: for \(a \cdot x^2 + b \cdot x + c\), the square must be formed inside the factor \(a \cdot (\cdot)\); the adjustment outside becomes \(c - \frac{b^2}{4 \cdot a}\).
- Sign control: the shift in \((x - h)^2\) corresponds to \(-2 \cdot h \cdot x\); a positive linear term corresponds to \((x + h)^2\) in the monic case.
Summary form
The canonical algebraic result used for how to complete the square is: