Worked example · Algebra

Completing the square, from scratch

Turn x² + 6x + 2 into (x + 3)² − 7—with every move shown and every rule explained.

Estimated time10–15 minutes Starting levelMiddle-grade maths
Step 1 of 7

Start with the pattern

What number belongs inside the square?

x² + 6x + 2

Why: In (x + h)², the middle term is 2hx. So the coefficient 6 tells us what h must be.

01

See why the pattern works

A square with side length x + h naturally splits into four pieces. Change h and watch every term change with it.

h = 3

The identity

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

The middle number forces the last number

The two rectangles contribute hx + hx = 2hx. The corner contributes . That is why halving the x-coefficient and then squaring it is not a trick—it rebuilds the missing corner.

x coefficient6
halve it3
square it9
02

Complete any square

Change the coefficients. The page completes the square, identifies the vertex, and plots the same expression in its more useful form.

Vertex form

(x + 3)² − 7
1
Half the effective x-coefficient: 6 ÷ 2 = 3
2
Square that half: 3² = 9
3
Add and subtract the needed amount: +9 − 9 = 0
Vertex: (−3, −7)

y = x² + 6x + 2

same curve, new form
03

Climb the practice ladder

Say the half, the square, and the useful zero aloud before revealing each answer.

01 · Warm-up

x² + 10x + 7

(x + 5)² − 18Half 10 → 5. Square 5 → 25. Then 7 − 25 = −18.
02 · Negative b

x² − 8x + 5

(x − 4)² − 11Half −8 → −4. Square −4 → 16. Then 5 − 16 = −11.
03 · Fraction

x² + 5x + 1

(x + 5/2)² − 21/4Half 5 → 5/2. Square it → 25/4. Then 1 − 25/4 = −21/4.
04 · Leading coefficient

2x² + 8x + 6

2(x + 2)² − 2Factor 2 from the x-terms first: 2(x² + 4x) + 6. Then complete the square inside.
04

Catch the common slips

Open each warning and use it as a ten-second self-check.

“I added the square number, but forgot to subtract it.”

You changed the expression. The useful move is always +h² − h², because that totals zero.

“I halved b even though the x² coefficient was not 1.”

Normalize first. Factor the leading coefficient from the x² and x terms, or use h = b/(2a).

“I read the vertex of (x + 3)² − 7 as (3, −7).”

The inside sign flips. The bracket reaches zero when x = −3, so the vertex is (−3, −7).

“My answer looks right, so I skipped the check.”

Expand back. It takes seconds and proves the new form equals the original for every x.

Feynman finish

Teach it back

If you can explain these five ideas without looking, you can operate the method—not just imitate it.