# Completing the square

Canonical: https://duckyhelper.com/learn/algebra-2/completing-the-square/
Updated: 2026-10-01

Completing the square turns \(x^2 + bx\) into a perfect square by adding \(\left(\frac{b}{2}\right)^2\), half of b, squared. Then \(x^2 + bx + \left(\frac{b}{2}\right)^2 = \left(x + \frac{b}{2}\right)^2\). Use it to solve quadratics that do not factor, to rewrite \(y = ax^2 + bx + c\) in vertex form, and to find the center and radius of a circle from its expanded equation.

## The key idea

A perfect square trinomial always has the same pattern: the last number is half the middle coefficient, squared. Completing the square means adding exactly that number so the pattern appears.

$$
x^2 + bx + \left(\frac{b}{2}\right)^2 = \left(x + \frac{b}{2}\right)^2
$$

For example, half of 10 is 5 and \(5^2 = 25\), so \(x^2 + 10x + 25 = (x + 5)^2\).

### The steps for solving

1. If the \(x^2\) coefficient is not 1, divide every term by it.
2. Move the constant to the right side.
3. Add \(\left(\frac{b}{2}\right)^2\) to **both** sides.
4. Write the left side as a squared binomial.
5. Take the square root of both sides, with \(\pm\), and solve.

## Worked examples

**Example 1: solve by completing the square**

Problem: Solve \(x^2 + 6x - 7 = 0\).

1. Move the constant to the right.

   $$
   x^2 + 6x = 7
   $$
2. Half of 6 is 3, and \(3^2 = 9\). Add 9 to both sides.

   $$
   x^2 + 6x + 9 = 16
   $$
3. The left side is now a perfect square.

   $$
   (x + 3)^2 = 16
   $$
4. Square root of both sides. Remember both signs: \(x + 3 = 4\) or \(x + 3 = -4\).
5. Subtract 3 in each case: \(x = 1\) or \(x = -7\). Check: \(1 + 6 - 7 = 0\) and \(49 - 42 - 7 = 0\).

Answer: \(x = 1\) or \(x = -7\)

**Example 2: when the leading coefficient is not 1**

Problem: Solve \(2x^2 - 8x - 5 = 0\). Give exact answers.

1. Divide every term by 2.

   $$
   x^2 - 4x - \frac{5}{2} = 0
   $$
2. Move the constant.

   $$
   x^2 - 4x = \frac{5}{2}
   $$
3. Half of \(-4\) is \(-2\), and \((-2)^2 = 4\). Add 4 to both sides.

   $$
   x^2 - 4x + 4 = \frac{13}{2}
   $$
4. Factor the left side.

   $$
   (x - 2)^2 = \frac{13}{2}
   $$
5. Take square roots: \(x - 2 = \pm\sqrt{\frac{13}{2}}\). Since \(\sqrt{\frac{13}{2}} = \frac{\sqrt{26}}{2}\), add 2 to get the answer.

Answer: \(x = 2 \pm \frac{\sqrt{26}}{2}\), which is about 4.55 or \(-0.55\)

**Example 3: vertex form**

Problem: Write \(y = 3x^2 + 12x + 5\) in vertex form and give the vertex.

1. Factor the 3 out of the x terms only.

   $$
   3x^2 + 12x + 5 = 3(x^2 + 4x) + 5
   $$
2. Inside the parentheses, half of 4 is 2, and \(2^2 = 4\). Add 4 and subtract 4 inside so nothing changes.

   $$
   3(x^2 + 4x) + 5 = 3(x^2 + 4x + 4 - 4) + 5
   $$
3. Move the \(-4\) out. It gets multiplied by the 3 on its way out.

   $$
   3(x^2 + 4x + 4 - 4) + 5 = 3(x + 2)^2 - 12 + 5
   $$
4. Combine the constants.

   $$
   3(x + 2)^2 - 12 + 5 = 3(x + 2)^2 - 7
   $$

Answer: \(y = 3(x + 2)^2 - 7\), so the vertex is \((-2, -7)\)

**Example 4 (test-hard): center and radius of a circle**

Problem: Find the center and radius of the circle \(x^2 + y^2 + 10x - 4y - 7 = 0\).

1. Group the x terms and the y terms, and move the constant.

   $$
   x^2 + 10x + y^2 - 4y = 7
   $$
2. Complete the square twice: add \(5^2 = 25\) for x and \((-2)^2 = 4\) for y, on both sides.

   $$
   (x^2 + 10x + 25) + (y^2 - 4y + 4) = 7 + 25 + 4
   $$
3. Factor each group.

   $$
   (x + 5)^2 + (y - 2)^2 = 36
   $$
4. Compare with \((x - h)^2 + (y - k)^2 = r^2\). Here \(h = -5\), \(k = 2\), and \(r^2 = 36\).

Answer: Center \((-5, 2)\), radius 6

## Common mistakes

- **Adding the number to one side only.** If you add 9 on the left, add 9 on the right too. Fix: write "+9" on both sides in the same step.
- **Completing the square before dividing by a.** With \(2x^2 - 8x\), half of \(-8\) is not the right number. Fix: make the \(x^2\) coefficient 1 first, or factor it out of the x terms.
- **Forgetting the factor outside the parentheses.** In \(3(x^2 + 4x + 4 - 4)\), the \(-4\) leaves as \(-12\), not \(-4\). Fix: multiply by the outside factor when you move a number out.
- **Taking only the positive square root.** \((x + 3)^2 = 16\) has two answers. Fix: write \(\pm\) as soon as you take the root.
- **Reading the circle radius as \(r^2\).** In \((x + 5)^2 + (y - 2)^2 = 36\), the radius is 6, not 36. Also, the center is \((-5, 2)\): the signs flip.

## Quick methods

> **Tip: Vertex shortcut**
>
> For \(y = ax^2 + bx + c\), the vertex has x-coordinate \(h = -\frac{b}{2a}\). Plug h in to get k. For \(y = 3x^2 + 12x + 5\): \(h = -\frac{12}{6} = -2\) and \(k = 12 - 24 + 5 = -7\). This gives the same vertex form, \(a(x - h)^2 + k\), with less writing.

> **Note: Odd middle numbers are fine**
>
> For \(x^2 + 5x\), add \(\left(\frac{5}{2}\right)^2 = \frac{25}{4}\), and the square is \(\left(x + \frac{5}{2}\right)^2\). The fractions look worse than they are.

## Practice

**5 practice questions**

1. What number should be added to \(x^2 - 14x\) to make a perfect square trinomial?
   A. \(7\)
   B. \(14\)
   C. \(49\)
   D. \(196\)

   Answer: \(49\). Half of \(-14\) is \(-7\), and \((-7)^2 = 49\). So \(x^2 - 14x + 49 = (x - 7)^2\). 7 is half of b but not squared, and 196 squares b without halving.

2. Which is \(x^2 + 8x + 10\) written in vertex form?
   A. \((x + 4)^2 - 6\)
   B. \((x + 4)^2 + 10\)
   C. \((x - 4)^2 - 6\)
   D. \((x + 8)^2 - 54\)

   Answer: \((x + 4)^2 - 6\). \(x^2 + 8x + 16 - 16 + 10 = (x + 4)^2 - 6\). \((x + 4)^2 + 10\) forgets to subtract the 16 you added. \((x - 4)^2\) has the wrong sign inside.

3. Solve \(x^2 - 2x - 4 = 0\) by completing the square.
   A. \(1 \pm \sqrt{5}\)
   B. \(-1 \pm \sqrt{5}\)
   C. \(1 \pm \sqrt{3}\)
   D. \(2 \pm \sqrt{5}\)

   Answer: \(1 \pm \sqrt{5}\). \(x^2 - 2x = 4\). Add 1: \((x - 1)^2 = 5\), so \(x = 1 \pm \sqrt{5}\). \(1 \pm \sqrt{3}\) subtracts the 1 instead of adding it.

4. What is the vertex of \(y = -2x^2 + 12x - 11\)?
   A. \((3, 7)\)
   B. \((-3, 7)\)
   C. \((3, -11)\)
   D. \((6, -11)\)

   Answer: \((3, 7)\). \(-2(x^2 - 6x) - 11 = -2(x^2 - 6x + 9) + 18 - 11 = -2(x - 3)^2 + 7\). The \(-9\) leaves the parentheses as \(+18\) because it is multiplied by \(-2\).

5. What is the radius of the circle \(x^2 + y^2 - 6x + 8y = 0\)?

   Answer: 5. Add 9 and 16 to both sides: \((x - 3)^2 + (y + 4)^2 = 25\). So \(r^2 = 25\) and the radius is 5. The center is \((3, -4)\).

## Frequently asked questions

### When should I complete the square instead of factoring?

Factor first if the numbers work out quickly. Complete the square when the quadratic does not factor nicely, when a problem asks for vertex form, or when you need a circle's center and radius. When the x coefficient is even, it is often faster than the quadratic formula.

### Where does the quadratic formula come from?

It is completing the square done once on \(ax^2 + bx + c = 0\) with letters instead of numbers. Divide by a, move \(\frac{c}{a}\), add \(\frac{b^2}{4a^2}\) to both sides, take square roots, and you get \(x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}\).

### Why do I add the number to both sides?

An equation stays true only if both sides change the same way. When solving, you add to both sides. When rewriting an expression like \(y = \ldots\), there is no other side, so you add and subtract the same number instead, which adds zero.

### What if the right side becomes negative?

If you reach \((x - h)^2 = \) a negative number, there are no real solutions, because no real square is negative. In Algebra 2 you can still solve it with \(i\): \((x - 1)^2 = -9\) gives \(x = 1 \pm 3i\).

## Related

- [How to solve quadratic equations](https://duckyhelper.com/learn/algebra-1/solving-quadratics/)
- [Complex numbers and the imaginary unit i](https://duckyhelper.com/learn/algebra-2/complex-numbers/)
- [Circles on the SAT](https://duckyhelper.com/learn/sat-math/circles/)
- [Quadratics on the SAT](https://duckyhelper.com/learn/sat-math/quadratics/)
- [Algebra 2 study guides](https://duckyhelper.com/learn/algebra-2/)

## Try asking Ducky

- "Why do I halve b and then square it? Show me with a picture."
- "I got (x + 4)^2 + 10 for vertex form. What did I miss?"
- "Give me a circle equation and walk me through finding the center."

## Get DuckyHelper

Free to start. The web app works in any browser, Chromebooks included; the Mac app can also draw on your real screen. [Try it free in your browser](https://app.duckyhelper.com/?utm_source=duckyhelper.com&utm_medium=learn) or [Get the Mac app](https://duckyhelper.com/download/)
