Completing the square rewrites a quadratic using a squared binomial. It is both a solving method and a way to reveal the vertex and extreme value of a quadratic function.
The key pattern is . Adding creates the square .
On this page (8 sections)
The perfect-square pattern
Expanding gives . To match a middle term , choose . Adding and subtracting the same quantity keeps the expression unchanged.
The identity holds for real and . It is not permission to add a new constant without compensation: an expression must keep the same value, and an equation must receive the same addition on both sides.
Rewriting an expression
Rewrite
Half of 6 is 3, and its square is 9. Add and subtract 9.
Group the perfect square and combine the constants.
Completing a square with a 3-by-3 corner
Diagram explained
For positive x, start with an x-by-x square and two strips each of width 3. The unfilled corner is 3 by 3. In an expression, compensate for this added area by subtracting 9; in an equation, add 9 to both sides.
In the area model, is a positive length. Adding a corner completes a square of side . The algebraic identity remains valid for negative as well, even though those values are not side lengths in the model.
Solving by completing the square
Solve
Add 7 to both sides.
Add 9 to both sides, not just the left.
Recognize the perfect square.
Use both signs.
Subtract 3.
Therefore or . Substituting into the original quadratic gives zero in both cases.
When the leading coefficient is not 1
When the leading coefficient is not 1, factor it from the quadratic and linear terms before completing the square.
The compensation is inside the factor , so it contributes to the entire expression. Subtracting only outside would be incorrect.
Expanding checks the result: .
Finding a quadratic’s vertex and minimum
For , the non-negative square shows that the minimum output is , attained at . The vertex is . Completing the square can therefore answer a minimum-value question as well as solve an equation.
Applying the same method to a general quadratic produces the quadratic formula. It also gives the vertex form used when describing transformations of a parabola.
Practice questions
Rewrite by completing the square.
Solve .
What number completes to a perfect square?
Check your answers
Add and subtract 9: .
, so and or .
, because and .
Related topics
Apply the general result in The Quadratic Formula; connect vertex form to Transformations of Functions.
Sources and further reading
- OpenStax: Vertex form and completing the square. Definitions, conventions and related examples.
- OpenStax Elementary Algebra 2e. Language of algebra, equations, inequalities and factoring.
- OpenStax Intermediate Algebra 2e. Quadratic equations, factoring and algebraic techniques.
- Wolfram Language: Algebraic Transformations. Symbolic simplification, expansion and factoring reference.
