Completing the square
Completing the square means rewriting a quadratic like x² + 6x + 5 in the form (x + 3)² − 4: a squared bracket plus a number. To complete the square, halve the number in front of x, put it in a bracket with x and square it, then subtract the square of that half so the value doesn't change. The completed form shows the turning point straight away and lets you solve any quadratic, even ones that won't factorise.
How to complete the square
For a quadratic that starts with x², with no number in front, there are four steps.
- Halve the coefficient of x. The coefficient is the number in front of x. For x² + 6x + 5 it is 6, so half is 3.
- Write a squared bracket with x and that half: (x + 3)².
- Subtract the half squared. (x + 3)² expands to x² + 6x + 9, which has an extra 9, so take 9 away: (x + 3)² − 9.
- Bring in the constant from the original and simplify: (x + 3)² − 9 + 5 = (x + 3)² − 4.
In general, with b as the coefficient of x and c as the constant:
Always check by expanding. (x + 3)² − 4 = x² + 6x + 9 − 4 = x² + 6x + 5, which matches. If b is negative, the sign in the bracket is negative too: x² − 8x starts (x − 4)².
Why is it called completing the square?
Because you really are finishing a square. Picture x² as a square with sides x, and 6x as two strips of 3 by x laid along two of its sides. The shape is almost a square of side x + 3, but a 3 by 3 corner is missing.
x 3
+--------+-----+
x | x² | 3x |
+--------+-----+
3 | 3x | 9 | <- the missing corner
+--------+-----+Adding the 9 corner completes a square of side x + 3. So x² + 6x is the full square, (x + 3)², take away the corner, 9. That is where the "subtract the half squared" step comes from.
Completing the square examples
These rise in difficulty. Try each one before reading the working.
Example 1: a negative coefficient of x
Write x² − 8x + 3 in the form (x + p)² + q.
Half of −8 is −4. Then (x − 4)² = x² − 8x + 16, which has an extra 16.
So p = −4 and q = −13. Watch the signs: the form is (x + p)², so (x − 4)² means p is −4, not 4.
Example 2: an odd coefficient of x
Complete the square for x² + 5x + 1. Half of 5 is 5/2, and (5/2)² = 25/4. Keep fractions rather than decimals, so nothing gets rounded.
Here 1 = 4/4, so −25/4 + 4/4 = −21/4.
Example 3: when a is not 1
Write 2x² + 12x + 7 in the form a(x + p)² + q. Take the 2 out of the x² and x terms first, leaving the constant outside.
Complete the square inside the bracket: x² + 6x = (x + 3)² − 9. Then multiply back out, remembering the 2 multiplies the −9 as well.
Check: 2(x² + 6x + 9) − 11 = 2x² + 12x + 18 − 11 = 2x² + 12x + 7.
Example 4: a negative x² term
Complete the square for −x² + 6x − 2. Take out −1, which flips the sign of the x term.
The minus in front of the bracket turns −9 into +9, and 9 − 2 = 7.
Solving quadratic equations by completing the square
Once a quadratic is in completed square form, solving it is a matter of undoing each step: move the number across, square root both sides (with ±), then subtract.
Solve x² + 6x + 5 = 0.
So x = −1 or x = −5, taking the + and the − in turn. This one factorises as (x + 1)(x + 5) too, which is a good check.
Solve x² − 8x + 3 = 0, giving exact answers. This won't factorise, which is where completing the square earns its keep. From example 1:
"Exact" means leave the surd: x = 4 + √13 or x = 4 − √13. As decimals, x = 7.61 or x = 0.39 to 2 decimal places.
Solve 2x² + 12x + 7 = 0. From example 3, 2(x + 3)² = 11, so (x + 3)² = 5.5 and x = −3 ± √5.5. That gives x = −0.65 or x = −5.35 to 2 decimal places. Divide by a before you square root.
Now try one. Solve this quadratic any way you like: completing the square, factorising or the formula all give the same answers. Then press Mark to check it in our Algebra course.
Use the quadratic formula to find both roots.
Press Mark to have your answer marked in the Algebra course.
Finding the turning point by completing the square
This is the other big use. A squared bracket can never be negative, so the smallest (x + 3)² can be is 0, when x = −3. Then (x + 3)² − 4 is at its smallest: −4. So the graph of y = x² + 6x + 5 has its lowest point at (−3, −4).
Here x is the input and y is the value of x² + 6x + 5. The curve is symmetrical about the line x = −3, which passes through the turning point, and the roots −5 and −1 sit 2 either side of it. That 2 is the √4 from solving above. Change the numbers in the Quadratic Graph calculator and watch the turning point move.
| Quadratic | Completed square form | Turning point | Type |
|---|---|---|---|
| x² + 6x + 5 | (x + 3)² − 4 | (−3, −4) | Minimum |
| x² − 8x + 3 | (x − 4)² − 13 | (4, −13) | Minimum |
| x² + 5x + 1 | (x + 5/2)² − 21/4 | (−5/2, −21/4) | Minimum |
| 2x² + 12x + 7 | 2(x + 3)² − 11 | (−3, −11) | Minimum |
| −x² + 6x − 2 | −(x − 3)² + 7 | (3, 7) | Maximum |
The x-coordinate flips sign from the bracket, and the y-coordinate doesn't. In the US this completed square form, written a(x − h)² + k with turning point (h, k), is called vertex form, and the turning point is called the vertex.
Showing a quadratic is always positive
A common exam task: show that x² + 10x + 28 is positive for every value of x. Complete the square: half of 10 is 5, and 5² = 25, so x² + 10x + 28 = (x + 5)² + 3. A square is never negative, so (x + 5)² ≥ 0, which means (x + 5)² + 3 ≥ 3. It is always at least 3, so always positive. It also tells you the equation x² + 10x + 28 = 0 has no real solutions: the graph never reaches the x-axis.
So the number q tells you how many roots there are, when a is positive. If q is negative there are two roots, if q is 0 there is one repeated root, and if q is positive there are none.
Deriving the quadratic formula by completing the square
The quadratic formula is just completing the square done once, with letters, for every quadratic ax² + bx + c = 0. Divide by a, then complete the square on x² + (b/a)x:
In the third line, c/a is written as 4ac/4a² so the fractions share a denominator. The part under the square root, b² − 4ac, is the discriminant. It plays the same role as q above: positive means two roots, zero means one, negative means none.
Completing the square in GCSE and A-level
In GCSE Maths, completing the square is Higher tier content. The AQA specification lists it in two places: solving quadratic equations (A18) and deducing turning points (A11). Questions usually come in steps. The first part asks for the completed square form, and the next asks for the turning point or the solutions, often starting with the word "hence". That means use the answer you just found.
The quadratic formula is printed on the Higher formula sheet, but completing the square isn't a formula, so you need the method in your head. At A-level it comes back constantly: finding the centre and radius of a circle from its equation, finding the range of a quadratic function, and in calculus. Daily papers for GCSE Maths Higher and A-level Maths: Algebra and Functions give you short timed practice on questions like these.
When to complete the square instead of factorising
- Factorise when the quadratic factorises easily, like x² + 6x + 5. It is quickest.
- Complete the square when a question asks for the form (x + p)² + q, the turning point or the minimum value, or when you need exact answers and the numbers are friendly.
- Use the formula when the numbers are awkward or a calculator answer to 2 decimal places is enough.
Common mistakes
- Forgetting to subtract the square. x² + 6x + 5 is not (x + 3)² + 5. You must take away the 9 that the bracket adds.
- Getting the turning point sign wrong. (x − 4)² − 13 has its turning point at (4, −13), not (−4, −13).
- Halving the wrong thing when a isn't 1. For 2x² + 12x, take out the 2 first, then halve the 6, not the 12.
- Not multiplying the subtracted square by a. In 2[(x + 3)² − 9] + 7, the 9 becomes 18.
- Dropping the ± when square rooting. (x + 3)² = 4 gives x + 3 = 2 or x + 3 = −2. Missing one loses a solution.
- Rounding too early. Keep 5/2 and 25/4 as fractions, and leave surds until the last step.
Common questions
What is completing the square?
How do you complete the square when a is not 1?
How do you find the turning point from completed square form?
Is completing the square on GCSE Foundation?
Is completing the square the same as vertex form?
Can every quadratic be solved by completing the square?
Revision cards
Say the answer first, then flip the card to check it.
Where to go next
- Solve it
Quadratic Graph
Plot and analyse quadratic functions
Open the tool - Learn it
Algebra
Master equations, inequalities and the language of abstract mathematics
Start the course - Test it
GCSE Maths Higher
A new exam-style paper every day, with instant marking and a mark scheme
Start today's paper