Completing the Square (Rewrite Identity): Quadratic to Vertex Form by Pattern Substitution

By Vegard Gjerde Based on Masterful Learning 10 min read
completing-the-square algebra quadratic math learning-strategies

Completing the Square (Rewrite Identity) converts any quadratic ax2+bx+cax^2 + bx + c into vertex form a(x+b2a)2+(cb24a)a\left(x + \tfrac{b}{2a}\right)^{2} + \left(c - \tfrac{b^2}{4a}\right) through one identity-based substitution, producing an equivalent expression for every xx when a0a \neq 0. Recognizing when this rewrite is legal and verifying the constant-correction term are fluency skills trained in the Unisium Study System.

This guide sits inside the Algebra study map, where you can see the neighboring moves, models, and next-step guides that connect this principle to the rest of algebra.

Unisium hero image titled Completing the Square (Rewrite Identity) showing the principle equation and a conditions card.
Pattern check: a genuine quadratic (a0a \neq 0) can be rewritten directly into vertex form using the completing-the-square identity.

On this page: The Principle | Conditions | Failure Modes | EE Questions | Retrieval Practice | Practice Ground | Solve a Problem | FAQ


The Principle

The move: Substitute the coefficients aa, bb, cc of any quadratic ax2+bx+cax^2 + bx + c into the identity below to produce the equivalent vertex form in one macro move.

The invariant: This produces an equivalent expression — the two forms yield the same value for every xx, provided a0a \neq 0.

Pattern: ax2+bx+c    a ⁣(x+b2a) ⁣2+(cb24a)ax^2 + bx + c \;\longrightarrow\; a\!\left(x + \frac{b}{2a}\right)^{\!2} + \left(c - \frac{b^2}{4a}\right)

Legal ✓Illegal ✗
x2+6x+5    (x+3)24x^2 + 6x + 5 \;\to\; (x+3)^2 - 4x2+6x+5    (x+3)2+5x^2 + 6x + 5 \;\to\; (x+3)^2 + 5

The illegal rewrite keeps c=5c = 5 unchanged instead of computing cb24a=59=4c - \tfrac{b^2}{4a} = 5 - 9 = -4. Expanding (x+3)2+5(x+3)^2 + 5 gives x2+6x+14x2+6x+5x^2 + 6x + 14 \neq x^2 + 6x + 5.


Conditions of Applicability

Condition: a0a \neq 0

Before applying, check: Read the coefficient of x2x^2. If it is zero, the expression is linear — the fractions b2a\frac{b}{2a} and b24a\frac{b^2}{4a} are undefined and the move is illegal.

  • If a=0a = 0: this is not a quadratic, so the identity does not apply.
  • If b=0b = 0: the identity still holds (giving ax2+c=a(x+0)2+cax^2 + c = a(x + 0)^2 + c), but the rewrite adds no new structural information.

Want the complete framework behind this guide? Read Masterful Learning.

This method becomes easier once Perfect Square Trinomial patterns are familiar. Compare it with Quadratic Formula when deciding whether to build the square manually or use the general closed-form method, and use it next in Quadratic Model work where vertex form makes the structure visible.


Common Failure Modes

Failure mode: slot the original cc directly into the constant position — write a ⁣(x+b2a) ⁣2+ca\!\left(x + \frac{b}{2a}\right)^{\!2} + c instead of a ⁣(x+b2a) ⁣2+(cb24a)a\!\left(x + \frac{b}{2a}\right)^{\!2} + \left(c - \frac{b^2}{4a}\right) → the rewrite is not equivalent; expanding gives an extra b24a\frac{b^2}{4a} in the constant.

Debug: expand your completed-square result and compare every term to the original; the constant terms must match exactly.


Elaborative Encoding

Use these questions to build deep understanding. (See Elaborative Encoding for the full method.)

Within the Principle

  • Why does the shift term appear as +b2a+\frac{b}{2a} inside the parentheses even though the vertex xx-coordinate is b2a-\frac{b}{2a}? Trace the algebra of completing the square to explain the sign.
  • If you substitute any specific value of xx into both ax2+bx+cax^2 + bx + c and a ⁣(x+b2a)2+(cb24a)a\!\left(x + \frac{b}{2a}\right)^2 + \left(c - \frac{b^2}{4a}\right), what must be true about the two outputs?

For the Principle

  • How can you verify a completed-square result without applying the identity a second time?
  • Under what circumstances does the correction term cb24ac - \frac{b^2}{4a} equal zero, and what does that imply about the original quadratic?

Between Principles

  • The traditional step-by-step completing-the-square technique and this identity produce the same result through different paths. Which sequence of moves does the technique perform that the identity skips, and at what point do both paths converge?

Generate an Example

  • Choose a quadratic with a1a \neq 1 and an odd value of bb (to force a fractional b2a\frac{b}{2a}), apply the identity, then verify by expanding.

Retrieval Practice

Answer from memory, then click to reveal and check. (See Retrieval Practice for the full method.)

Describe the Completing the Square (Rewrite Identity) move in one sentence: _____Rewrite ax^2 + bx + c as a(x + b/2a)^2 + (c - b^2/4a) — an equivalent expression for every x, provided a != 0.
Write the canonical equation pattern: _____ax2+bx+c=a(x+b2a)2+(cb24a)ax^2 + bx + c = a\left(x + \frac{b}{2a}\right)^2 + \left(c - \frac{b^2}{4a}\right)
State the canonical condition: _____a0a \neq 0

Practice Ground

Use these exercises to build move-selection fluency. (See Self-Explanation for how to use worked examples effectively.)

Procedure Walkthrough

Starting from 2x2+8x+32x^2 + 8x + 3, produce the vertex form.

Read a=2a = 2, b=8b = 8, c=3c = 3. Confirm a0a \neq 0. ✓

StepExpressionOperation
02x2+8x+32x^2 + 8x + 3
12 ⁣(x+822) ⁣2+ ⁣(38242)2\!\left(x + \dfrac{8}{2 \cdot 2}\right)^{\!2} + \!\left(3 - \dfrac{8^2}{4 \cdot 2}\right)Slot a=2,b=8,c=3a=2,\,b=8,\,c=3 into identity
22(x+2)2+(38)2(x + 2)^2 + (3 - 8)Evaluate b2a=84=2\tfrac{b}{2a} = \tfrac{8}{4} = 2 and b24a=648=8\tfrac{b^2}{4a} = \tfrac{64}{8} = 8
32(x+2)252(x+2)^2 - 5Simplify constant term

Drills

Format A — Forward Step

Apply the principle once.

x2+4x+1x^2 + 4x + 1

Reveal

Read a=1,b=4,c=1a=1,\,b=4,\,c=1. Condition: a=10a = 1 \neq 0. ✓

(x+42) ⁣2+(1164)=(x+2)23\left(x + \frac{4}{2}\right)^{\!2} + \left(1 - \frac{16}{4}\right) = (x+2)^2 - 3

Verify: (x+2)23=x2+4x+43=x2+4x+1(x+2)^2 - 3 = x^2 + 4x + 4 - 3 = x^2 + 4x + 1


Apply the principle once.

x210x+20x^2 - 10x + 20

Reveal

Read a=1,b=10,c=20a=1,\,b=-10,\,c=20. Condition: a=10a = 1 \neq 0. ✓

(x+102) ⁣2+(201004)=(x5)25\left(x + \frac{-10}{2}\right)^{\!2} + \left(20 - \frac{100}{4}\right) = (x-5)^2 - 5

Verify: (x5)25=x210x+255=x210x+20(x-5)^2 - 5 = x^2 - 10x + 25 - 5 = x^2 - 10x + 20


Eligibility check. Is the Completing the Square rewrite applicable to 7x+127x + 12? If not, identify the violation.

Reveal

Not applicable. There is no x2x^2 term, so the leading coefficient a=0a = 0. The identity requires a0a \neq 0; with a=0a = 0 both b2a\frac{b}{2a} and b24a\frac{b^2}{4a} are undefined. The expression is linear — use a different strategy.


Apply the principle once.

3x2+6x+43x^2 + 6x + 4

Reveal

Read a=3,b=6,c=4a=3,\,b=6,\,c=4. Condition: a=30a = 3 \neq 0. ✓

3 ⁣(x+66) ⁣2+(43612)=3(x+1)2+13\!\left(x + \frac{6}{6}\right)^{\!2} + \left(4 - \frac{36}{12}\right) = 3(x+1)^2 + 1

Verify: 3(x+1)2+1=3(x2+2x+1)+1=3x2+6x+3+1=3x2+6x+43(x+1)^2 + 1 = 3(x^2+2x+1) + 1 = 3x^2 + 6x + 3 + 1 = 3x^2 + 6x + 4


Near-miss: reject or confirm. A student applies CTS to x2+8x+3x^2 + 8x + 3 and writes (x+4)2+3(x+4)^2 + 3. Is this correct? If not, find the error and state the correct result.

Reveal

Incorrect. The student slotted the original c=3c = 3 directly into the constant position — skipping the correction term b24a-\frac{b^2}{4a}.

Correct result with a=1,b=8,c=3a=1,\,b=8,\,c=3: cb24a=3644=316=13(x+4)213c - \frac{b^2}{4a} = 3 - \frac{64}{4} = 3 - 16 = -13 \quad\Rightarrow\quad (x+4)^2 - 13

Verify: (x+4)213=x2+8x+1613=x2+8x+3(x+4)^2 - 13 = x^2 + 8x + 16 - 13 = x^2 + 8x + 3

Expanding the wrong result: (x+4)2+3=x2+8x+16+3=x2+8x+19x2+8x+3(x+4)^2 + 3 = x^2 + 8x + 16 + 3 = x^2 + 8x + 19 \neq x^2 + 8x + 3.


Format E — Canonicalization

Rewrite in vertex form a(xh)2+ka(x-h)^2 + k.

x2+6x+5x^2 + 6x + 5

Reveal

a=1,b=6,c=5a=1,\,b=6,\,c=5:

(x+3)2+(59)=(x+3)24(x+3)^2 + (5 - 9) = (x+3)^2 - 4


Rewrite in vertex form.

2x24x+52x^2 - 4x + 5

Reveal

a=2,b=4,c=5a=2,\,b=-4,\,c=5:

2 ⁣(x+44) ⁣2+(5168)=2(x1)2+32\!\left(x + \frac{-4}{4}\right)^{\!2} + \left(5 - \frac{16}{8}\right) = 2(x-1)^2 + 3


Rewrite in vertex form (note: a<0a < 0).

x2+2x3-x^2 + 2x - 3

Reveal

a=1,b=2,c=3a=-1,\,b=2,\,c=-3. The leading coefficient is negative, but a=10a = -1 \neq 0, so the move is legal:

1 ⁣(x+22) ⁣2+(344)=(x1)2+(3+1)=(x1)22-1\cdot\!\left(x + \frac{2}{-2}\right)^{\!2} + \left(-3 - \frac{4}{-4}\right) = -(x-1)^2 + (-3+1) = -(x-1)^2 - 2

Verify: (x1)22=(x22x+1)2=x2+2x12=x2+2x3-(x-1)^2 - 2 = -(x^2 - 2x + 1) - 2 = -x^2 + 2x - 1 - 2 = -x^2 + 2x - 3


Rewrite in vertex form (non-integer b2a\frac{b}{2a}).

x2+x+1x^2 + x + 1

Reveal

a=1,b=1,c=1a=1,\,b=1,\,c=1:

(x+12) ⁣2+(114)=(x+12)2+34\left(x + \frac{1}{2}\right)^{\!2} + \left(1 - \frac{1}{4}\right) = \left(x + \frac{1}{2}\right)^2 + \frac{3}{4}


Rewrite in vertex form (c=0c = 0 edge case).

x2+4xx^2 + 4x

Reveal

a=1,b=4,c=0a=1,\,b=4,\,c=0:

(x+2)2+(04)=(x+2)24(x + 2)^2 + (0 - 4) = (x+2)^2 - 4

Verify: (x+2)24=x2+4x+44=x2+4x(x+2)^2 - 4 = x^2 + 4x + 4 - 4 = x^2 + 4x


Format C — Transition Identification

Identify the correct rewrite. Both chains start from 2x2+4x+12x^2 + 4x + 1. Which one applies CTS correctly, and what is the error in the other?

  • Chain A: 2x2+4x+1    2(x+1)212x^2 + 4x + 1 \;\to\; 2(x+1)^2 - 1
  • Chain B: 2x2+4x+1    2(x+1)2+12x^2 + 4x + 1 \;\to\; 2(x+1)^2 + 1
Reveal

Chain A is correct. With a=2,b=4,c=1a=2,\,b=4,\,c=1: cb24a=1168=12=12(x+1)21c - \frac{b^2}{4a} = 1 - \frac{16}{8} = 1 - 2 = -1 \quad\Rightarrow\quad 2(x+1)^2 - 1

Chain B repeats the near-miss error: it keeps c=1c = 1 unchanged in the constant position instead of applying the correction.

Verify Chain A: 2(x+1)21=2(x2+2x+1)1=2x2+4x+21=2x2+4x+12(x+1)^2 - 1 = 2(x^2+2x+1) - 1 = 2x^2 + 4x + 2 - 1 = 2x^2 + 4x + 1


Identify the transition. In the following chain, which step applied the Completing the Square identity?

  1. f(x)=x2+10x+24f(x) = x^2 + 10x + 24
  2. f(x)=(x+5)21f(x) = (x+5)^2 - 1
Reveal

Step 1 → 2 applied CTS with a=1,b=10,c=24a=1,\,b=10,\,c=24:

(x+5)2+(2425)=(x+5)21(x+5)^2 + (24 - 25) = (x+5)^2 - 1

Verify: (x+5)21=x2+10x+251=x2+10x+24(x+5)^2 - 1 = x^2 + 10x + 25 - 1 = x^2 + 10x + 24


Diagnose the chain. Each version applies CTS to x26x+7x^2 - 6x + 7. One is correct, one has a constant-correction error, and one used the wrong sign on the shift. Identify which is which.

  • Chain P: x26x+7    (x3)22x^2 - 6x + 7 \;\to\; (x-3)^2 - 2
  • Chain Q: x26x+7    (x+3)22x^2 - 6x + 7 \;\to\; (x+3)^2 - 2
  • Chain R: x26x+7    (x3)2+7x^2 - 6x + 7 \;\to\; (x-3)^2 + 7
Reveal

With a=1,b=6,c=7a=1,\,b=-6,\,c=7: shift =b2a=62=3= \frac{b}{2a} = \frac{-6}{2} = -3, so the factor is (x3)(x-3). Correction =7364=79=2= 7 - \frac{36}{4} = 7 - 9 = -2.

Chain P: correct. Verify: (x3)22=x26x+92=x26x+7(x-3)^2 - 2 = x^2 - 6x + 9 - 2 = x^2 - 6x + 7

Chain Q: wrong sign on shift. (x+3)2(x+3)^2 expands to x2+6x+9x^2 + 6x + 9, not x26x+9x^2 - 6x + 9. The shift was negated by accident.

Chain R: constant-correction error. The correction term was skipped; the original c=7c = 7 was kept unchanged, giving a result off by b24a=9\frac{b^2}{4a} = 9.


Solve a Problem

Apply what you’ve learned with Problem Solving.

Problem: Rewrite 4x28x+34x^2 - 8x + 3 in vertex form using the Completing the Square identity.

Full solution
StepExpressionMove
04x28x+34x^2 - 8x + 3Read a=4,b=8,c=3a=4,\,b=-8,\,c=3; confirm a0a \neq 0
14 ⁣(x+88) ⁣2+ ⁣(36416)4\!\left(x + \dfrac{-8}{8}\right)^{\!2} + \!\left(3 - \dfrac{64}{16}\right)Slot into identity
24(x1)2+(34)4(x - 1)^2 + (3 - 4)Evaluate b2a=88=1\tfrac{b}{2a} = \tfrac{-8}{8} = -1 and b24a=6416=4\tfrac{b^2}{4a} = \tfrac{64}{16} = 4
34(x1)214(x-1)^2 - 1Simplify constant

Verify: 4(x1)21=4(x22x+1)1=4x28x+41=4x28x+34(x-1)^2 - 1 = 4(x^2 - 2x + 1) - 1 = 4x^2 - 8x + 4 - 1 = 4x^2 - 8x + 3


FAQ

What is the Completing the Square Rewrite Identity?

The Completing the Square Rewrite Identity is an algebraic equivalence that rewrites any quadratic ax2+bx+cax^2 + bx + c (with a0a \neq 0) directly into vertex form a ⁣(x+b2a)2+(cb24a)a\!\left(x + \frac{b}{2a}\right)^2 + \left(c - \frac{b^2}{4a}\right) through a single pattern substitution. Unlike the step-by-step technique (adding and subtracting b24a\frac{b^2}{4a} inside the expression), the identity treats the conversion as one macro substitution into a verified pattern.

When is Completing the Square valid?

The identity is valid whenever a0a \neq 0. The leading coefficient may be negative, fractional, or irrational — the only requirement is that the expression has a genuine x2x^2 term.

What goes wrong if I forget the b24a-\frac{b^2}{4a} correction term?

Omitting the correction leaves the constant as cc instead of cb24ac - \frac{b^2}{4a}. The “completed” form then expands to ax2+bx+c+b24aax^2 + bx + c + \frac{b^2}{4a} — off by exactly b24a\frac{b^2}{4a}. Always expand your result and check that the constant matches.

How does the Completing the Square Identity differ from the step-by-step technique?

The step-by-step technique adds and subtracts b24a\frac{b^2}{4a} inside the expression, then factors the perfect-square trinomial — a sequence of several small moves. The Rewrite Identity is the shortcut: one substitution that compresses all those steps into a pre-verified formula. Both are correct; the identity is faster once you trust the formula.

Does Completing the Square apply to all quadratics?

Yes, for any real a0a \neq 0 and any real bb, cc. It works when bb is odd (producing a fractional vertex), when c=0c = 0 (producing a negative constant), or when a<0a < 0 (producing a downward-opening vertex form).

How does this identity connect to the Quadratic Formula?

Applying this identity to ax2+bx+c=0ax^2 + bx + c = 0 and isolating xx recovers the Quadratic Formula directly. After the identity is applied and the equation is solved for xx, the term cb24ac - \frac{b^2}{4a}, when cleared and rearranged, produces the discriminant b24acb^2 - 4ac under the radical. For a shorter path to roots, use the Quadratic Formula directly; for vertex form, use this identity.


How This Fits in Unisium

Completing the square is a gateway move: it unlocks vertex form for any quadratic, reveals the axis of symmetry and vertex directly, and powers the derivation of the quadratic formula. In Unisium, this identity is practiced as an identity-based pattern-substitution skill — you read aa, bb, cc; slot them in; and verify by expanding. The drill block above targets the most common failure mode (forgetting the constant-correction term) and the eligibility check (a0a \neq 0) that is easiest to skip on autopilot. Explore the learning framework in Masterful Learning.

Explore further:

  • Elaborative Encoding — Build deep understanding of why the constant-correction term exists and cannot be skipped
  • Retrieval Practice — Make the identity pattern and condition instantly accessible
  • Self-Explanation — Use the worked examples above to narrate each coefficient substitution

Ready to master Completing the Square? Start practicing with Unisium or explore the full learning framework in Masterful Learning.

Masterful Learning book cover

Masterful Learning

The study system for physics, math, & programming that works: retrieval, connection, explanation, problem solving, and more.

Read the book (opens in new tab) ISBN 979-8-2652-9642-9

Ready to apply this strategy?

Join Unisium and start implementing these evidence-based learning techniques.

Start Learning with Unisium Read More Guides

Want the complete framework? This guide is from Masterful Learning.

Learn about the book →