Completing the Square: Definition, Method and Examples

MathPublished

Completing the Square: Method, Formula, and Examples

Completing the square rewrites a standard quadratic expression into a squared binomial plus or minus a constant. This technique is essential for solving quadratic equations, deriving the quadratic formula, and graphing parabolas.


When an equation cannot be solved easily by factoring, the quadratic square method provides a reliable algebraic path to find exact solutions.

What does completing the square mean?

Completing the square means converting a quadratic expression of the form ax2+bx+cax^2 + bx + c into the vertex form a(x−h)2+ka(x - h)^2 + k.


The goal is to create a perfect square trinomial. A perfect square trinomial is a quadratic expression that factors exactly into a binomial multiplied by itself, such as (x+3)2(x + 3)^2.


While factoring quadratics works well for expressions with simple integer roots, completing the square works for any quadratic expression. It forces the expression into a format where the variable xx appears only once inside parentheses, making it much easier to isolate.


Completing the square forces a quadratic into a perfect square format, allowing you to solve for the variable using square roots.

Build a perfect-square trinomial

To build a perfect square algebraically, you must determine the exact constant value required to complete the pattern.


For an expression in the form x2+bxx^2 + bx, you find this missing constant by taking half of the linear coefficient bb, and then squaring the result. The formula for the missing constant is (b2)2\left(\dfrac{b}{2}\right)^2.


Geometrically, you can visualize the expression x2+bxx^2 + bx as an area model. The x2x^2 term is a large square, and the bxbx term is split into two equal rectangles of area b2x\dfrac{b}{2}x. To complete the visual square, a small corner piece of area (b2)2\left(\dfrac{b}{2}\right)^2 must be added.

An area model showing a large square x squared, two rectangles each labeled half b times x, and a dashed missing corner square labeled question mark.

Adding this specific constant creates the perfect square trinomial x2+bx+(b2)2x^2 + bx + \left(\dfrac{b}{2}\right)^2, which can always be factored directly into (x+b2)2\left(x + \dfrac{b}{2}\right)^2.

Solve a quadratic by completing the square

Solving a quadratic equation requires maintaining balance. When you add the constant (b2)2\left(\dfrac{b}{2}\right)^2 to create a perfect square, you must add the exact same value to the other side of the equation.


Follow these steps to solve an equation of the form ax2+bx+c=0ax^2 + bx + c = 0:

  1. Move the constant term cc to the right side of the equation.
  2. If the leading coefficient aa is not 11, divide every term on both sides by aa.
  3. Identify the new linear coefficient bb, calculate (b2)2\left(\dfrac{b}{2}\right)^2, and add it to both sides of the equation.
  4. Factor the left side into a squared binomial.
  5. Take the square roots of both sides, remembering to include the positive and negative (±\pm) solutions.
  6. Solve for the variable xx.


Example 1: Solving with the leading coefficient equal to one


Question: Solve x2−10x+16=0x^2 - 10x + 16 = 0 by completing the square.


Method:

  1. Move the constant 1616 to the right side.

x2−10x=−16x^2 - 10x = -16

  1. The leading coefficient is already 11. The linear coefficient bb is −10-10.
  2. Calculate the missing value: (−102)2=(−5)2=25\left(\dfrac{-10}{2}\right)^2 = (-5)^2 = 25. Add 2525 to both sides.

x2−10x+25=−16+25x^2 - 10x + 25 = -16 + 25

x2−10x+25=9x^2 - 10x + 25 = 9

  1. Factor the left side as a perfect square.

(x−5)2=9(x - 5)^2 = 9

  1. Take the square root of both sides.

x−5=±9x - 5 = \pm \sqrt{9}

x−5=±3x - 5 = \pm 3

  1. Solve for xx.

x=5+3x = 5 + 3 or x=5−3x = 5 - 3

Answer: x=8x = 8 or x=2x = 2.


Check: Substitute x=8x = 8 into the original equation: (8)2−10(8)+16=64−80+16=0(8)^2 - 10(8) + 16 = 64 - 80 + 16 = 0. The root is correct.

Convert to vertex form

Completing the square is the standard method for converting a quadratic equation into vertex form, y=a(x−h)2+ky = a(x - h)^2 + k. This format immediately reveals the vertex (h,k)(h, k) of the parabola, making it incredibly useful for analyzing quadratic graphs.


When converting to vertex form, you work entirely on one side of the equation. Because you cannot add a value to both sides as you would when solving, you must add and subtract the constant on the same side to maintain equality.


Example 2: Converting an equation to vertex form


Question: Convert y=2x2+12x+13y = 2x^2 + 12x + 13 into vertex form and state the coordinates of the vertex.


Method:

  1. Group the xx terms and factor out the leading coefficient a=2a = 2.

y=2(x2+6x)+13y = 2(x^2 + 6x) + 13

  1. Identify the coefficient bb inside the parentheses. Here, b=6b = 6. Calculate the square completion value: (62)2=(3)2=9\left(\dfrac{6}{2}\right)^2 = (3)^2 = 9.
  2. Add 99 inside the parentheses. Because the 99 is multiplied by the factored 22, you have actually added 1818 to the equation. To balance this, subtract 1818 outside the parentheses.

y=2(x2+6x+9)+13−18y = 2(x^2 + 6x + 9) + 13 - 18

  1. Factor the perfect square trinomial and simplify the constants.

y=2(x+3)2−5y = 2(x + 3)^2 - 5

Answer: The vertex form is y=2(x+3)2−5y = 2(x + 3)^2 - 5. The vertex is located at (−3,−5)(-3, -5).


Check: Expand the vertex form: 2(x2+6x+9)−5=2x2+12x+18−5=2x2+12x+132(x^2 + 6x + 9) - 5 = 2x^2 + 12x + 18 - 5 = 2x^2 + 12x + 13. The expanded form matches the original equation.


A coordinate plane showing a parabola opening upward with its lowest point, the vertex, plotted at the coordinates negative 3 comma negative 5.

Check the roots

Whenever you solve a quadratic equation by completing the square, you generate numerical roots. It is essential to verify these solutions to catch arithmetic mistakes.


To verify your roots, substitute each calculated value of xx back into the original unedited equation. If both roots produce a true statement, such as 0=00 = 0, the perfect square trinomial method was applied correctly. If you encounter fractions or square roots in your answers, carefully follow the order of operations during substitution.

Worked examples

When the linear coefficient is an odd number, calculating (b2)2\left(\dfrac{b}{2}\right)^2 results in a fraction. Do not round this value to a decimal; keep it as an exact fraction to ensure the perfect square factors correctly.


Example 3: Completing the square with odd coefficients


Question: Solve x2−3x−4=0x^2 - 3x - 4 = 0 by completing the square.


Method:

  1. Move the constant to the right side.

x2−3x=4x^2 - 3x = 4

  1. The coefficient bb is −3-3. Calculate (−32)2=94\left(\dfrac{-3}{2}\right)^2 = \dfrac{9}{4}.
  2. Add 94\dfrac{9}{4} to both sides of the equation.

x2−3x+94=4+94x^2 - 3x + \dfrac{9}{4} = 4 + \dfrac{9}{4}

  1. Rewrite the right side with a common denominator. 4=1644 = \dfrac{16}{4}.

x2−3x+94=254x^2 - 3x + \dfrac{9}{4} = \dfrac{25}{4}

  1. Factor the left side as a perfect square.

(x−32)2=254\left(x - \dfrac{3}{2}\right)^2 = \dfrac{25}{4}

  1. Take the square root of both sides.

x−32=±52x - \dfrac{3}{2} = \pm \dfrac{5}{2}

  1. Solve for xx.

x=32+52=82=4x = \dfrac{3}{2} + \dfrac{5}{2} = \dfrac{8}{2} = 4

x=32−52=−22=−1x = \dfrac{3}{2} - \dfrac{5}{2} = -\dfrac{2}{2} = -1

Answer: x=4x = 4 or x=−1x = -1.


Check: Test x=4x = 4: (4)2−3(4)−4=16−12−4=0(4)^2 - 3(4) - 4 = 16 - 12 - 4 = 0. Test x=−1x = -1: (−1)2−3(−1)−4=1+3−4=0(-1)^2 - 3(-1) - 4 = 1 + 3 - 4 = 0. Both roots are correct.

Common mistakes

When analyzing algebraic errors in the complete square method, check these frequent mistakes:

  • Forgetting to balance the equation: Adding the calculated constant to one side of an equation without adding it to the opposite side destroys the equality.
  • Failing to distribute the leading coefficient: When converting to vertex form, if you factor out an aa value at the start, you must remember to multiply the internal constant by aa before compensating for it on the outside.
  • Dropping the± \pm symbol: Taking the square root of a squared binomial always produces a positive and a negative case. Dropping the ±\pm results in missing one valid root.
  • Dividing without adjusting constants: If a≠1a \neq 1 and you divide the equation by aa, you must divide the initial constant term cc by aa as well before moving it.

Frequently asked questions

Is it always possible to complete the square?

Yes. The perfect square trinomial method is universally applicable to any quadratic expression, even those that cannot be factored using integer values. If the equation has no real solutions, completing the square will result in taking the square root of a negative number, which yields complex roots.


Why do we divide by the leading coefficient?

The geometric and algebraic rules for finding the missing constant, (b2)2\left(\dfrac{b}{2}\right)^2, are based on a leading coefficient of exactly 11. By dividing out any other leading coefficient, you reset the expression to a form where the standard formula works correctly.


What is the relationship with the quadratic formula?

Completing the square is the exact algebraic process used to derive the quadratic formula. By starting with the standard form ax2+bx+c=0ax^2 + bx + c = 0 and completing the square for xx using general variables, the isolated result is exactly the quadratic formula.

Practice questions

Question

An area model showing a large square labeled x squared, two rectangles each labeled 6x, and a missing dashed square in the bottom right corner.

Based on the area model shown, what is the value of the missing corner area needed to complete the perfect square trinomial?

  • 3636

  • 1212

  • 66

  • 144144

Answer:

3636

Question

What constant must be added to both sides of the equation x2−14x=5x^2 - 14x = 5 to complete the square?

  • −7-7

  • 4949

  • −49-49

  • 196196

Answer:

4949

Question

A parabola graphed on a coordinate plane, opening upward, with its vertex marked clearly at the coordinates positive 4 comma negative 2.

A quadratic equation was converted into vertex form by completing the square, resulting in the graph shown. Which equation matches the graph?

  • y=(x+4)2−2y = (x + 4)^2 - 2

  • y=(x−4)2−2y = (x - 4)^2 - 2

  • y=(x−4)2+2y = (x - 4)^2 + 2

  • y=(x−2)2−4y = (x - 2)^2 - 4

Answer:

y=(x−4)2−2y = (x - 4)^2 - 2

Question

A student is solving x2+8x=2x^2 + 8x = 2 by completing the square. The student correctly adds 1616 to both sides to get x2+8x+16=18x^2 + 8x + 16 = 18.

What is the correct next step to solve the equation?

  • Factor the left side as (x+16)2=18(x + 16)^2 = 18.

  • Factor the left side as (x+4)2=18(x + 4)^2 = 18.

  • Take the square root of both sides immediately to get x+8x+4=±18x + \sqrt{8x} + 4 = \pm \sqrt{18}.

  • Factor the left side as (x+8)2=18(x + 8)^2 = 18.

Answer:

Factor the left side as (x+4)2=18(x + 4)^2 = 18.

Question

Convert the quadratic equation y=3x2−12x+7y = 3x^2 - 12x + 7 into vertex form.

  • y=3(x−2)2−5y = 3(x - 2)^2 - 5

  • y=3(x−2)2+3y = 3(x - 2)^2 + 3

  • y=3(x−2)2−5y = 3(x - 2)^2 - 5

  • y=3(x−4)2−9y = 3(x - 4)^2 - 9

Answer:

y=3(x−2)2−5y = 3(x - 2)^2 - 5