0:00 / 0:00

Completing the Square

Given a quadratic equation in standard form y=x2+bx+cy=x^2+bx+c, we often want to rewrite it in vertex form y=(xh)2+ky=(x-h)^2+k. This process is called completing the square.

Steps for Completing the Square for y=x2+bx+c\bco{y=x^2+bx+c}

  1. Focus on the first 2 terms: y=[x2+bx]+cy=[\colorbox{yellow}{$x^2+bx$}]+c
  2. Add and subtract (b2)2\left(\dfrac{b}{2}\right)^2: y=[x2+bx+(b2)2(b2)2]+cy=\left[x^2+bx\colorbox{yellow}{$+\left(\dfrac{b}{2}\right)^2-\left(\dfrac{b}{2}\right)^2$}\right]+c
  3. Rewrite (factor) the first 3 terms as a perfect square: y=[(x+b2)2(b2)2]+cy=\left[\colorbox{yellow}{$\left(x+\dfrac{b}{2}\right)^2$}-\left(\dfrac{b}{2}\right)^2\right]+c
  4. Simplify the constant terms: y=(x+b2)2(b2)2+cy=\left(x+\dfrac{b}{2}\right)^2\colorbox{yellow}{$-\left(\dfrac{b}{2}\right)^2+c$}

Write it Down
Short-cut Formula for Completing the Square for y=x2+bx+cy=x^2+bx+c:
x2+bx+c=(x+b2)2(b2)2+c\boxed{x^2+bx+c=\left(x+\dfrac{b}{2}\right)^2-\left(\dfrac{b}{2}\right)^2+c}

0:00 / 0:00

Example: Completing the Square

Write y=x212x+7y=x^2-12x+7 in vertex form by completing the square.

1. Focus on the first 2 terms: y=[x2+bx]+c\bco{y=[\colorbox{yellow}{$x^2+bx$}]+c}

y=[x212x]+7y=[x^2-12x]+7


2. Add and subtract (b2)2\bco{\left(\dfrac{b}{2}\right)^2}: y=[x2+bx+(b2)2(b2)2]+c\bco{y=\left[x^2+bx\colorbox{yellow}{$+\left(\dfrac{b}{2}\right)^2-\left(\dfrac{b}{2}\right)^2$}\right]+c}

  • In our equation b=12b=-12
  • b2=122=6\dfrac{b}{2}=\dfrac{-12}{2}=-6
  • (b2)2=(6)2=36\left(\dfrac{b}{2}\right)^2=(-6)^2=36
y=[x212x+3636]+7y=\left[x^2-12x+36-36\right]+7


3. Rewrite (factor) the first 3 terms as a perfect square: y=[(x+b2)2(b2)2]+c\bco{y=\left[\colorbox{yellow}{$\left(x+\dfrac{b}{2}\right)^2$}-\left(\dfrac{b}{2}\right)^2\right]+c}

y=[(x6)236]+7 y=\left[\left(x-6\right)^2-36\right]+7


4. Simplify the constant terms: y=(x+b2)2(b2)2+c\bco{y=\left(x+\dfrac{b}{2}\right)^2 \colorbox{yellow}{$-\left(\dfrac{b}{2}\right)^2+c$}}

y=(x6)236+7y=(x6)229\begin{aligned} y&=\left(x-6\right)^2-36+7\\ y&=(x-6)^2-29 \end{aligned}

So, by completing the square, we get the vertex form equation y=(x6)229y=(x-6)^2-29

Practice: Completing the Square

Write y=x2+10x14y=x^2+10x-14 in vertex form by completing the square. Then determine the vertex of this quadratic relation.

Practice: Completing the Square

Write y=x218x11y=x^2-18x-11 in vertex form by completing the square. Then, graph this quadratic relation.

Practice: Completing the Square

Write y=x211x6y=x^2-11x-6 in vertex form by completing the square. Then, determine the vertex and y-intercept of this quadratic relation.

Practice: Completing the Square

Write the following in vertex form by completing the square.

a) x2+8xx^2+8x

b) x2+16x1x^2+16x-1

c) x26x+17x^2-6x+17

d) x2+9x+7x^2+9x+7

e) x221x3x^2-21x-3
0:00 / 0:00

Completing the Square

Given a quadratic equation in standard form y=ax2+bx+cy=ax^2+bx+c, we often want to rewrite it in vertex form y=a(xh)2+ky=a(x-h)^2+k. This process is called completing the square.

Steps for Completing the Square for y=ax2+bx+c\bco{y=ax^2+bx+c}

  1. Factor aa out of the first 2 terms: y=a[x2+bax]+cy=\colorbox{yellow}{$a$}\left[x^2+\dfrac{b}{a}x\right]+c
  2. Add and subtract (b2a)2\left(\dfrac{b}{2a}\right)^2: y=a[x2+bax+(b2a)2(b2a)2]+cy=a\left[x^2+\dfrac{b}{a}x\colorbox{yellow}{$+\left(\dfrac{b}{2a}\right)^2-\left(\dfrac{b}{2a}\right)^2$}\right]+c
  3. Rewrite (factor) the first 3 terms as a perfect square: y=a[(x+b2a)2(b2a)2]+cy=a\left[\colorbox{yellow}{$\left(x+\dfrac{b}{2a}\right)^2$}-\left(\dfrac{b}{2a}\right)^2\right]+c
  4. Multiply aa into the brackets: y=a(x+b2a)2a(b2a)2+cy=\colorbox{yellow}{$a$}\left(x+\dfrac{b}{2a}\right)^2-\colorbox{yellow}{$a$}\left(\dfrac{b}{2a}\right)^2+c
  5. Simplify the constant terms: y=a(x+b2a)2a(b2a)2+cy=a\left(x+\dfrac{b}{2a}\right)^2\colorbox{yellow}{$-a\left(\dfrac{b}{2a}\right)^2+c$}

Write it Down
Short-cut Formula for Completing the Square for ax2+bx+cax^2+bx+c:
ax2+bx+c=a(x+b2a)2a(b2a)2+c\boxed{ax^2+bx+c=a\left(x+\dfrac{b}{2a}\right)^2-a\left(\dfrac{b}{2a}\right)^2+c}


0:00 / 0:00

Example: Completing the Square

Write y=2x212x+11y=2x^2-12x+11 in vertex form by completing the square.

1. Factor a\bco{a} out of the first 2 terms: y=a[x2+bax]+c\bco{y=\colorbox{yellow}{$a$}\left[x^2+\dfrac{b}{a}x\right]+c}


y=2[x26x]+11y=2[x^2-6x]+11

2. Add and subtract (b2a)2\bco{\left(\dfrac{b}{2a}\right)^2}: y=a[x2+bax+(b2a)2(b2a)2]+c\bco{y=a\left[x^2+\dfrac{b}{a}x\colorbox{yellow}{$+\left(\dfrac{b}{2a}\right)^2-\left(\dfrac{b}{2a}\right)^2$}\right]+c}

  • ba=6\dfrac{b}{a}=-6
  • b2a=62=3\dfrac{b}{2a}=\dfrac{-6}{2}=-3
  • (b2a)2=(3)2=9\left(\dfrac{b}{2a}\right)^2=(-3)^2=9
y=2[x26x+99]+11y=2\left[x^2-6x+9-9\right]+11

3. Rewrite (factor) the first 3 terms as a perfect square: y=a[(x+b2a)2(b2a)2]+c\bco{y=a\left[\colorbox{yellow}{$\left(x+\dfrac{b}{2a}\right)^2$}-\left(\dfrac{b}{2a}\right)^2\right]+c}


y=2[(x3)29]+11y=2[(x-3)^2-9]+11

4. Multiply a\bco{a} into the brackets: y=a(x+b2a)2a(b2a)2+c\bco{y=\colorbox{yellow}{$a$}\left(x+\dfrac{b}{2a}\right)^2-\colorbox{yellow}{$a$}\left(\dfrac{b}{2a}\right)^2+c}


y=2(x3)2+2(9)+11y=2(x-3)^2+2(-9)+11


5. Simplify the constant terms: y=a(x+b2a)2a(b2a)2+c\bco{y=a\left(x+\dfrac{b}{2a}\right)^2\colorbox{yellow}{$-a\left(\dfrac{b}{2a}\right)^2+c$}}


y=2(x3)218+11y=2(x3)27\begin{array}{rcl} y&=&2(x-3)^2-18+11\\ y&=&2(x-3)^2-7 \end{array}

Practice: Completing the Square

Write y=3x2+18x1y=3x^2+18x-1 in vertex form by completing the square.

Practice: Completing the Square

Write y=4x2+8x5y=-4x^2+8x-5 in vertex form by completing the square. Then, determine the vertex of this quadratic relation.

Practice: Completing the Square

Write y=2x2+5x+11y=2x^2+5x+11 in vertex form by completing the square. Then state the vertex and graph this quadratic relation.

Practice: Completing the Square

Write the following in vertex form by completing the square.

a) 2x2+8x2x^2+8x

b) 4x2+16x14x^2+16x-1

c) 3x26x+173x^2-6x+17

d) 3x2+9x+73x^2+9x+7

e) 5x221x35x^2-21x-3