Completing the square Created 2026-09-28 Updated 2026-10-18
Completing the square rewrites a quadratic polynomial so that its minimum or maximum and its roots of a polynomial become easy to read. The linear term is absorbed into a shift of the variable; the resulting polynomial identity changes the description, rather than the values of the polynomial.
For coefficients in the real numbers, with ,
First factor out the leading coefficient from , then add and subtract inside the bracket. The cross term in is , exactly the term needed. Multiplication by restores . Thus the half-coefficient is , rather than unless the quadratic polynomial is a monic polynomial. Expanding the right-hand side verifies the polynomial identity directly.[ref]
For an original example,
For every in the real numbers, , with equality only at . The minimum is therefore , reached at ; no calculus is needed, and there are no roots of a polynomial in the real numbers. The expanded coefficients conceal these conclusions more effectively than the completed square does.