B3PureCore

Completing the Square

Completing the square rewrites a quadratic as a perfect square plus a constant, a(x+p)2+qa(x + p)^{2} + q. That single rearrangement hands you the turning point, the minimum value, exact surd solutions and a way to prove a quadratic is always positive.

30 min Video by TLMaths Algebra and Functions

The big picture

Factorising and the formula both find the roots — but completing the square tells you the shape\textbf{shape}: where the parabola turns, how low it dips, and whether it ever touches the axis at all. It is the most information-rich thing you can do to a quadratic, which is why it powers so much else: the quadratic formula is literally completing the square done in general; circle equations are completed squares in xx and yy; and the “prove it is always positive” arguments from the Proof chapter are completing the square in disguise. Learn to do it fluently and a whole web of later topics becomes routine.

A-Level Maths B3-08: Introducing Completing the SquareCurated by Kepler, not produced by us. Watch it, then work through the notes below.
Open on YouTube

What you'll be able to do

  • Complete the square for x2+bx+cx^{2} + bx + c and for ax2+bx+cax^{2} + bx + c
  • Read the turning point and minimum/maximum straight from the completed form
  • Solve a quadratic in exact surd form by completing the square
  • Use the completed square to prove a quadratic is always positive
1

The idea: a quadratic is almost a perfect square

Notice that (x+p)2=x2+2px+p2(x + p)^{2} = x^{2} + 2px + p^{2}. So a perfect square always has a constant term equal to the square of half the coefficient of xx. A general quadratic x2+bx+cx^2 + bx + c usually has the “wrong” constant — so we build the perfect square we want, then add a correction to fix the constant.

Concretely, take half of bb, square it, and adjust: x2+bx=(x+b2)2−(b2)2x^{2} + bx = (x + \tfrac{b}{2})^{2} - (\tfrac{b}{2})^{2}. The subtracted term undoes the extra constant the square introduced.

x2+bx+c=(x+b2)2−(b2)2+cx^{2} + bx + c = \left(x + \tfrac{b}{2}\right)^{2} - \left(\tfrac{b}{2}\right)^{2} + c
Halve bb, square it, subtract it back.
Why this works

Everything hinges on “half the coefficient of xx”. The square (x+b2)2(x + \tfrac b2)^2 is engineered so its middle term is bxbx; the −(b2)2-(\tfrac b2)^2 simply cancels the constant that the square smuggled in.

2

The method in action

Work in three moves: write the square using half of bb, subtract the square of that half, then tidy the constants.

Example 1Complete the square for x2+6x+1x^{2} + 6x + 1.
1Half of 6 is 3, so start with (x+3)2(x + 3)^2.
2That expands to x2+6x+9x^2 + 6x + 9 — an extra 9 — so subtract it: (x+3)2−9(x+3)^2 - 9.
3Add the original constant: (x+3)2−9+1=(x+3)2−8(x + 3)^2 - 9 + 1 = (x + 3)^2 - 8.
Answer
(x+3)2−8(x + 3)^{2} - 8
Example 2Complete the square for x2−5x+2x^{2} - 5x + 2.
1Half of −5-5 is −52-\tfrac52: start with (x−52)2\left(x - \tfrac52\right)^2.
2Subtract its square: −(52)2=−254-\left(\tfrac52\right)^2 = -\tfrac{25}{4}.
3Add the 2: (x−52)2−254+2=(x−52)2−174\left(x - \tfrac52\right)^2 - \tfrac{25}{4} + 2 = \left(x - \tfrac52\right)^2 - \tfrac{17}{4}.
Answer
(x−52)2−174\left(x - \tfrac{5}{2}\right)^{2} - \tfrac{17}{4}

Tip — The sign inside the bracket copies the sign of bb: x2−5xx^2 - 5x gives (x−52)2\left(x - \tfrac52\right)^2, not (x+52)2\left(x + \tfrac52\right)^2.

3

When the $x^{2}$ coefficient isn’t 1

If a≠1a \neq 1, factor aa out of the x2x^2 and xx terms first, complete the square inside the bracket, then multiply back out. Keep the constant outside the bracket until the end.

Example 1Complete the square for 2x2+8x+32x^{2} + 8x + 3.
1Factor 2 from the first two terms: 2(x2+4x)+32\left(x^2 + 4x\right) + 3.
2Inside: half of 4 is 2, so x2+4x=(x+2)2−4x^2 + 4x = (x+2)^2 - 4.
3So 2[(x+2)2−4]+3=2(x+2)2−8+32\left[(x+2)^2 - 4\right] + 3 = 2(x+2)^2 - 8 + 3.
4Tidy: 2(x+2)2−52(x+2)^2 - 5.
Answer
2(x+2)2−52(x + 2)^{2} - 5

Tip — Only factor aa from the x2x^2 and xx terms — leave the lone constant alone until the very end.

4

What the completed form tells you

Once a quadratic is a(x+p)2+qa(x + p)^{2} + q, its secrets are on display. Because a square is never negative, (x+p)2≥0(x+p)^2 \geq 0, so the whole expression is smallest when the bracket is zero — at x=−px = -p. That point (−p, q)(-p,\, q) is the turning point\textbf{turning point} (vertex), and qq is the minimum value (or maximum if a<0a < 0).

This is also how you solve in exact form (rearrange for the bracket, square-root both sides — remembering ±\pm) and how you prove positivity: if q>0q > 0 and a>0a > 0, the quadratic can never reach zero, so it is always positive — exactly the argument used in Proof by Deduction.

a(x+p)2+q  ⇒  turning point (−p, q)a(x + p)^{2} + q \;\Rightarrow\; \text{turning point } (-p,\, q)
Read the vertex straight off — no calculus needed.
Example 1Solve x2+6x+1=0x^{2} + 6x + 1 = 0 in exact form using the completed square.
1From before, x2+6x+1=(x+3)2−8x^2 + 6x + 1 = (x+3)^2 - 8, so (x+3)2−8=0(x+3)^2 - 8 = 0.
2Rearrange: (x+3)2=8(x+3)^2 = 8.
3Square-root both sides (with ±\pm): x+3=±8=±22x + 3 = \pm\sqrt{8} = \pm2\sqrt2.
4So x=−3±22x = -3 \pm 2\sqrt2.
Answer
x=−3±22x = -3 \pm 2\sqrt{2}
Why this works

The completed square finds the turning point without differentiating. Later, calculus gives the same vertex by setting the derivative to zero — it is reassuring, and no accident, that two very different methods agree.

Think like an examiner

  • A completed-square answer a(x+p)2+qa(x+p)^2 + q is often followed by “hence write down the turning point” or “the minimum value” — you should be able to read them off with no extra work.
  • “Prove …>0\ldots > 0 for all xx” is a completing-the-square question in disguise: show it equals a square plus a positive constant.
  • When a≠1a \neq 1, marks are lost by not factoring aa out first, or by mishandling the constant. Keep it outside the bracket.
  • For exact solutions, do not forget the ±\pm when you square-root, and simplify the surd (e.g. 8=22\sqrt8 = 2\sqrt2).

Common misconceptions

Forgetting to subtract (b2)2\left(\tfrac b2\right)^2 after forming the square.
The square adds an extra (b2)2\left(\tfrac b2\right)^2; you must subtract it to keep the expression equal.
Completing the square on 2x2+8x+32x^2 + 8x + 3 without factoring the 2 first.
Factor: 2(x2+4x)+32(x^2+4x)+3, complete inside, then expand back — otherwise the x2x^2 coefficient is wrong.
Writing (x−4)2(x - 4)^2 for x2+4xx^2 + 4x (copying the sign of bb wrongly).
Half of +4+4 is +2+2, so it is (x+2)2−4(x + 2)^2 - 4.
Solving (x+3)2=8(x+3)^2 = 8 as x+3=8x + 3 = \sqrt8 only.
Square-rooting gives ±\pm: x+3=±22x + 3 = \pm2\sqrt2, so there are two solutions.

Completing the square

x2+bx+c=(x+b2)2−(b2)2+cx^{2}+bx+c = \left(x+\tfrac{b}{2}\right)^{2} - \left(\tfrac{b}{2}\right)^{2} + c
The core rearrangement.
a(x+p)2+qa(x+p)^{2}+q
Vertex form: turning point (−p,q)(-p, q).
(x+p)2≥0(x+p)^{2} \geq 0
Why qq is the minimum.

Stretch yourself

Complete the square on the general quadratic ax2+bx+c=0ax^{2} + bx + c = 0 to derive the quadratic formula.

Hint — Divide through by aa, complete the square on x2+baxx^2 + \tfrac{b}{a}x, then rearrange and square-root (with ±\pm).

Reveal solution
SolutionDivide by aa: x2+bax+ca=0x^2 + \tfrac{b}{a}x + \tfrac{c}{a} = 0. Complete the square: (x+b2a)2−b24a2+ca=0\left(x + \tfrac{b}{2a}\right)^2 - \tfrac{b^2}{4a^2} + \tfrac{c}{a} = 0. Rearrange: (x+b2a)2=b24a2−ca=b2−4ac4a2\left(x + \tfrac{b}{2a}\right)^2 = \tfrac{b^2}{4a^2} - \tfrac{c}{a} = \tfrac{b^2 - 4ac}{4a^2}. Square-root both sides: x+b2a=±b2−4ac2ax + \tfrac{b}{2a} = \pm\tfrac{\sqrt{b^2 - 4ac}}{2a}. Hence x=−b±b2−4ac2ax = \tfrac{-b \pm \sqrt{b^2 - 4ac}}{2a} — the quadratic formula is just completing the square with letters. ■\blacksquare

Questions students ask

Why does completing the square give the turning point?
In the form a(x+p)2+qa(x+p)^2 + q, the squared bracket is smallest (zero) when x=−px = -p, so the curve turns there, at height qq. That makes (−p,q)(-p, q) the vertex and qq the minimum (or maximum if a<0a<0).
How do I handle a number in front of x2x^2?
Factor it out of the x2x^2 and xx terms first: 2x2+8x+3=2(x2+4x)+32x^2 + 8x + 3 = 2(x^2+4x)+3. Complete the square inside the bracket, expand back, and combine constants. Leave the lone constant outside until the end.
When should I complete the square instead of using the formula?
When you need the turning point, the minimum/maximum, an exact surd solution, or to prove a quadratic is always positive. For roots alone, factorising or the formula is usually quicker.
How does this prove a quadratic is always positive?
If the completed form is a(x+p)2+qa(x+p)^2 + q with a>0a>0 and q>0q>0, then since (x+p)2≥0(x+p)^2 \ge 0 the whole thing is at least q>0q>0, so it can never be zero or negative — exactly the deduction-proof technique.

Key takeaways

  • Complete the square by halving bb, squaring it and subtracting it back.
  • If a≠1a \neq 1, factor aa from the x2x^2 and xx terms first.
  • The form a(x+p)2+qa(x+p)^2 + q gives the turning point (−p,q)(-p, q) and the min/max value qq.
  • Solve in exact form by rearranging and square-rooting (keep the ±\pm).
  • A completed square with a>0a>0, q>0q>0 proves the quadratic is always positive.

How this fits the course

Test yourself

Answer a few questions, then review anything you missed.

Prefer paper? Open the written self-check

Answer each question before opening its answer. This self-check does not record a quiz score.

  1. Complete the square: x2+4x+1x^{2} + 4x + 1.

    • (x+2)2−3(x+2)^{2} - 3
    • (x+2)2+1(x+2)^{2} + 1
    • (x+4)2−15(x+4)^{2} - 15
    • (x+2)2−5(x+2)^{2} - 5
    Show answer and explanation

    Answer: (x+2)2−3(x+2)^{2} - 3

    Half of 4 is 2: (x+2)2−4+1=(x+2)2−3(x+2)^2 - 4 + 1 = (x+2)^2 - 3.

  2. The turning point of y=(x−3)2+5y = (x - 3)^{2} + 5 is:

    • (3,5)(3, 5)
    • (−3,5)(-3, 5)
    • (3,−5)(3, -5)
    • (5,3)(5, 3)
    Show answer and explanation

    Answer: (3,5)(3, 5)

    For (x−p)2+q(x-p)^2 + q the vertex is (p,q)=(3,5)(p, q) = (3, 5).

  3. Complete the square: x2−8x+20x^{2} - 8x + 20.

    • (x−4)2+4(x-4)^{2} + 4
    • (x−4)2−4(x-4)^{2} - 4
    • (x−8)2+20(x-8)^{2} + 20
    • (x+4)2+4(x+4)^{2} + 4
    Show answer and explanation

    Answer: (x−4)2+4(x-4)^{2} + 4

    (x−4)2−16+20=(x−4)2+4(x-4)^2 - 16 + 20 = (x-4)^2 + 4.

  4. The minimum value of x2−8x+20x^{2} - 8x + 20 is:

    • 44
    • −4-4
    • 2020
    • 00
    Show answer and explanation

    Answer: 44

    From (x−4)2+4(x-4)^2 + 4, the least value is 4 (when x=4x = 4).

  5. Complete the square: 2x2+12x+52x^{2} + 12x + 5.

    • 2(x+3)2−132(x+3)^{2} - 13
    • 2(x+3)2+52(x+3)^{2} + 5
    • 2(x+6)2−132(x+6)^{2} - 13
    • (x+3)2−13(x+3)^{2} - 13
    Show answer and explanation

    Answer: 2(x+3)2−132(x+3)^{2} - 13

    2(x2+6x)+5=2[(x+3)2−9]+5=2(x+3)2−18+5=2(x+3)2−132(x^2+6x)+5 = 2[(x+3)^2 - 9] + 5 = 2(x+3)^2 - 18 + 5 = 2(x+3)^2 - 13.

  6. Solving (x−2)2=5(x - 2)^{2} = 5 gives:

    • x=2±5x = 2 \pm \sqrt{5}
    • x=2+5x = 2 + \sqrt{5}
    • x=±5x = \pm\sqrt{5}
    • x=7x = 7
    Show answer and explanation

    Answer: x=2±5x = 2 \pm \sqrt{5}

    Square-root both sides: x−2=±5x - 2 = \pm\sqrt5, so x=2±5x = 2 \pm \sqrt5.

Next step

Keep practising

Start with the quiz above to check the key ideas. You can also choose another topic from the practice library.

Browse practice topics

Related lessons

All 15 lessons

Put the methods into practice: see how A-Level maths duels work. An account is required to play; the overview and sample are public.