Completing the square, explained with examples
Completing the square rewrites a quadratic in the form (x + p)² + q. It solves equations, finds the turning point of a graph in one step, and is the idea behind the quadratic formula.
On this page
The idea
A perfect square such as (x + 3)² expands to x² + 6x + 9. Notice the pattern: the number inside the bracket is half the coefficient of x, and the constant is that number squared. Completing the square uses this pattern in reverse. Given x² + 6x + 5, we write it as (x + 3)² − 9 + 5 = (x + 3)² − 4. We “complete” a perfect square, then adjust the constant so the expression is unchanged.
The method when a = 1
- Halve the coefficient of x. Call it p.
- Write (x + p)².
- Subtract p², because (x + p)² added an extra p².
- Add the original constant and simplify.
In short: x² + bx + c = (x + b/2)² − (b/2)² + c.
Worked examples
Example 1: a positive coefficient
Write x² + 8x + 3 in the form (x + p)² + q.
- Half of 8 is 4: (x + 4)² − 16 + 3.
- = (x + 4)² − 13.
Example 2: a negative coefficient
Write x² − 10x + 7 in completed square form.
- Half of −10 is −5: (x − 5)² − 25 + 7.
- = (x − 5)² − 18. The subtracted square is always positive: (−5)² = 25.
Example 3: an odd coefficient
Write x² + 3x − 1 in completed square form.
- Half of 3 is 3/2: (x + 3/2)² − 9/4 − 1.
- = (x + 3/2)² − 13/4. Keep fractions exact rather than using decimals.
When a is not 1
If the x² term has a coefficient other than 1, factor it out of the first two terms first, complete the square inside the bracket, then multiply back out.
Example 4: a = 2
Write 2x² + 12x + 5 in the form a(x + p)² + q.
- Factor 2 from the first two terms: 2(x² + 6x) + 5.
- Complete the square inside: 2[(x + 3)² − 9] + 5.
- Expand the outer bracket: 2(x + 3)² − 18 + 5 = 2(x + 3)² − 13.
Example 5: a negative a
Write −x² + 4x + 1 in completed square form.
- Factor −1: −(x² − 4x) + 1.
- −[(x − 2)² − 4] + 1 = −(x − 2)² + 5.
Solving equations by completing the square
Once a quadratic is in completed square form, you can solve it by isolating the bracket and taking square roots. Remember the ±: a square root has a positive and a negative value.
Example 6: solving an equation
Solve x² + 6x − 2 = 0, leaving your answer in surd form.
- Complete the square: (x + 3)² − 9 − 2 = 0, so (x + 3)² = 11.
- x + 3 = ±√11, so x = −3 ± √11.
Finding the turning point
The completed square form shows the turning point of the graph immediately. For y = (x + p)² + q, the turning point is at (−p, q). The squared bracket is never negative, so its smallest value is 0, which happens when x = −p. At that point y = q, the minimum value. If the x² coefficient is negative, the turning point is a maximum instead.
Example 7: a turning point
Find the turning point of y = x² − 4x + 7 and state whether it is a maximum or minimum.
- Complete the square: (x − 2)² − 4 + 7 = (x − 2)² + 3.
- The turning point is (2, 3), a minimum because the x² coefficient is positive.
- Since the minimum value is 3, which is above 0, the graph never crosses the x-axis: the equation x² − 4x + 7 = 0 has no real solutions.
Example 8: sketching a graph
Sketch y = x² + 2x − 3.
- Completed square: (x + 1)² − 4, so the minimum point is (−1, −4).
- y-intercept: set x = 0, giving y = −3. Roots: (x + 1)² = 4, so x = 1 or x = −3.
- Draw a U-shaped curve through (−3, 0), (−1, −4), (0, −3) and (1, 0), symmetric about the line x = −1.
Proving an expression is always positive
A favourite exam question asks you to show that an expression such as x² − 6x + 11 is always positive. Complete the square: (x − 3)² + 2. Since (x − 3)² ≥ 0 for every x, the whole expression is at least 2, so it is always positive. Write that final sentence in words; it is where the reasoning mark comes from.
The link to the quadratic formula
If you complete the square on the general quadratic ax² + bx + c = 0, you get x = (−b ± √(b² − 4ac))/2a. In other words, the quadratic formula is just completing the square done once, in general. That is why the two methods always give the same answers.
Common mistakes
- Forgetting to subtract p² after writing (x + p)².
- Writing the turning point as (p, q) instead of (−p, q).
- Forgetting ± when taking a square root to solve an equation.
- When a ≠ 1, forgetting to multiply the subtracted square by a.
Practice questions
Try each one before opening the answer.
Q1. Write x² + 12x + 30 in completed square form.
Show answer
Q2. Write x² − 2x − 8 in completed square form and find the turning point.
Show answer
Q3. Solve x² − 8x + 9 = 0 by completing the square.
Show answer
Q4. Write 3x² − 6x + 1 in the form a(x + p)² + q.
Show answer
Q5. Show that x² + 4x + 9 > 0 for all x.
Show answer
Frequently asked questions
Is completing the square on GCSE Maths?
Yes, on the Higher tier. It is used to solve quadratics, find turning points and sometimes in proof questions.
Is completing the square in A level Maths?
Yes. It is in the first year and is used heavily, for example to find the centre and radius of a circle from its equation.
Why not always use the quadratic formula?
The formula only solves equations. Completing the square also gives the turning point and the minimum or maximum value, which the formula does not.
Key takeaways
- x² + bx + c = (x + b/2)² − (b/2)² + c.
- If a ≠ 1, factor it out of the x terms first.
- The turning point of (x + p)² + q is (−p, q).
- Use ± when solving by square roots.
- A square is never negative, which is the key to proof questions.