🟦
Math🎓 Ages 14-18Intermediate 12 min read

Completing the Square

Learn completing the square step by step: rewrite ax² + bx + c as (x + p)² + q, solve quadratics, find the vertex of a parabola, with fully worked examples.

Key takeaways

  • Completing the square rewrites x² + bx + c as (x + b/2)² + (c − (b/2)²)
  • The number you add inside the bracket is half of the x-coefficient, squared
  • It turns any quadratic into vertex form (x + p)² + q, revealing the turning point at (−p, q)
  • It solves quadratics that do not factor and is the method used to derive the quadratic formula

What completing the square means

Completing the square rewrites a quadratic so that it contains a perfect square bracket plus a number. It turns:

x² + bx + c into (x + p)² + q

This new shape is called vertex form (or completed-square form). It does three jobs: it solves quadratics that will not factor, it reveals the turning point of a parabola, and it is the algebra behind the quadratic formula. If you are new to quadratics in general, the overview at quadratic equations is a good starting point.

The key idea: a perfect square

Notice the pattern when you expand a squared bracket:

(x + 3)² = x² + 6x + 9

The constant on the end, 9, is exactly (half of 6)². That is the entire trick:

To complete the square on x² + bx, add (b/2)². Then x² + bx + (b/2)² = (x + b/2)².

So whatever the x-coefficient is, halve it and square it — that is the number that finishes the square.

Completing the square when a = 1

Worked example 1: Write x² + 6x + 5 in completed-square form.

  1. Look at the x-coefficient: it is 6. Half of 6 is 3, and 3² = 9.
  2. So (x + 3)² = x² + 6x + 9. That is 4 more than our original constant (we had +5, not +9).
  3. Correct for it by subtracting 4: x² + 6x + 5 = (x + 3)² − 4.

Check: Expand (x + 3)² − 4 = x² + 6x + 9 − 4 = x² + 6x + 5. Correct.

Worked example 2: Write x² − 10x + 7 in completed-square form.

  1. Half of −10 is −5, and (−5)² = 25.
  2. (x − 5)² = x² − 10x + 25, which is 18 more than the +7 we want.
  3. So x² − 10x + 7 = (x − 5)² − 18.

Solving a quadratic by completing the square

Once one side is a perfect square, you can square root both sides — and that is what lets you solve equations that do not factor.

Worked example 3: Solve x² + 6x + 5 = 0.

  1. From Example 1, rewrite as (x + 3)² − 4 = 0.
  2. Add 4: (x + 3)² = 4.
  3. Square root both sides, keeping ±: x + 3 = ±2.
  4. Solve each: x = −3 + 2 = −1 or x = −3 − 2 = −5.
  5. Solutions: x = −1 or x = −5.

Worked example 4: Solve x² − 4x − 3 = 0 (this one will not factor nicely).

  1. Half of −4 is −2; (−2)² = 4. Rewrite: x² − 4x − 3 = (x − 2)² − 4 − 3 = (x − 2)² − 7.
  2. Set equal to zero: (x − 2)² − 7 = 0, so (x − 2)² = 7.
  3. Square root: x − 2 = ±√7.
  4. Exact solutions: x = 2 + √7 or x = 2 − √7 (about 4.65 and −0.65). See surds for why we leave √7 exact.

When the leading coefficient is not 1

If a ≠ 1, first divide every term by a (or factor a out of the x-terms) so the x² coefficient becomes 1.

Worked example 5: Solve 2x² + 8x + 6 = 0.

  1. Divide every term by 2: x² + 4x + 3 = 0.
  2. Half of 4 is 2; 2² = 4. Rewrite: x² + 4x + 3 = (x + 2)² − 4 + 3 = (x + 2)² − 1.
  3. Set to zero: (x + 2)² = 1.
  4. Square root: x + 2 = ±1, so x = −1 or x = −3.
  5. Solutions: x = −1 or x = −3.

Finding the turning point of a parabola

A huge bonus of vertex form is that it hands you the turning point of the curve. For y = (x − p)² + q, the vertex (lowest or highest point) is at (p, q), because a squared term is never negative, so the smallest value of (x − p)² is 0, reached when x = p.

Worked example 6: Find the minimum point of y = x² − 6x + 10.

  1. Half of −6 is −3; (−3)² = 9. Rewrite: x² − 6x + 10 = (x − 3)² − 9 + 10 = (x − 3)² + 1.
  2. Vertex form is y = (x − 3)² + 1, so the turning point is (3, 1).
  3. Because the squared bracket can only add to the value, the minimum value of y is 1, occurring at x = 3.

This is exactly how you find the lowest cost, the maximum height, or the best price without plotting the curve. To connect this to graphing, see functions and graphs.

A picture of why it is called "completing" the square

Think of x² + 6x as building a square. The is a square of side x. The 6x can be drawn as two rectangles of width 3 attached to two sides of that square. Together they almost form a bigger square of side (x + 3) — but one small corner is missing. That missing corner is a 3-by-3 square, with area 3² = 9. Adding 9 completes the square, turning the L-shape into the full square (x + 3)². This geometric picture is exactly where the algebra "add (b/2)²" comes from.

Solving with a negative leading coefficient

Worked example 7: Find the maximum point of y = −x² + 4x + 1.

  1. The negative in front of x² means the parabola opens downward, so it has a maximum.
  2. Factor −1 out of the x-terms: y = −(x² − 4x) + 1.
  3. Complete the square inside the bracket: half of −4 is −2, (−2)² = 4, so x² − 4x = (x − 2)² − 4.
  4. Substitute back: y = −[(x − 2)² − 4] + 1 = −(x − 2)² + 4 + 1 = −(x − 2)² + 5.
  5. The squared term is subtracted, so y is largest when (x − 2)² = 0, i.e. x = 2.
  6. Maximum point: (2, 5) — the highest value of y is 5.

Quick-reference table

ExpressionHalf of b(b/2)²Completed square form
x² + 4x + 124(x + 2)² − 3
x² + 10x + 9525(x + 5)² − 16
x² − 2x + 5−11(x − 1)² + 4
x² − 8x + 20−416(x − 4)² + 4

Why completing the square matters

This method is the engine behind the quadratic formula: completing the square on the general ax² + bx + c = 0 produces x = (−b ± √(b² − 4ac)) / (2a). Beyond that, it is used in physics to find the peak height of a projectile, in economics to find maximum profit, and in higher maths to integrate functions and to put the equation of a circle into standard form. Any time you need the exact best value of a quadratic, completing the square gives it directly.

Practice activity

Complete the square, then solve where an equation is given.

  1. Write x² + 2x + 5 in completed-square form.
  2. Write x² − 12x + 30 in completed-square form.
  3. Solve x² + 4x − 1 = 0.
  4. Solve x² − 6x + 8 = 0.
  5. Find the minimum point of y = x² + 8x + 20.

Answers:

  1. Half of 2 is 1; 1² = 1. (x + 1)² − 1 + 5 = (x + 1)² + 4.
  2. Half of −12 is −6; 36. (x − 6)² − 36 + 30 = (x − 6)² − 6.
  3. (x + 2)² − 4 − 1 = 0 → (x + 2)² = 5 → x + 2 = ±√5, so x = −2 ± √5.
  4. (x − 3)² − 9 + 8 = 0 → (x − 3)² = 1 → x − 3 = ±1, so x = 4 or x = 2.
  5. (x + 4)² − 16 + 20 = (x + 4)² + 4, vertex (−4, 4), minimum value 4.

Summary

Completing the square rewrites x² + bx + c as (x + b/2)² + (c − (b/2)²): halve the x-coefficient, square it, and adjust the constant. The completed (vertex) form (x + p)² + q lets you solve any quadratic by square-rooting both sides, reveals the turning point at (−p, q), and is the derivation behind the quadratic formula. When a ≠ 1, divide through by a first. It is the go-to method whenever you need exact solutions or the maximum or minimum of a curve.

Quick quiz

Test yourself and earn XP

To complete the square on x² + 8x, what number do you add?

Write x² + 6x + 5 in completed-square form.

The minimum point of y = (x − 2)² + 3 is at:

Solve (x + 1)² = 9.

What is the first step when a ≠ 1, e.g. 2x² + 8x + 6 = 0?

FAQ

You are adding the exact number needed to turn x² + bx into a perfect square — a square you could literally build out of tiles. The added piece completes the missing corner of that square.

Use it when a quadratic does not factor neatly, when you need exact surd solutions, or when you need the vertex (maximum or minimum) of a parabola. Factoring is faster when factors are obvious.

Vertex form (x − p)² + q instantly gives the turning point (p, q) of the parabola. That tells you the lowest or highest value of the function without drawing a graph.