Quadratic Formula

The Formula

For any quadratic ax2+bx+c=0ax^2 + bx + c = 0:

x=b±b24ac2ax = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}

Plug in aa, bb, cc. Get the answers.


Where Does It Come From?

It’s completing the square on the general form, done once for all quadratics.

Start with the general quadratic:

ax2+bx+c=0ax^2 + bx + c = 0

Divide everything by aa:

x2+bax+ca=0x^2 + \frac{b}{a}x + \frac{c}{a} = 0

Move the constant to the right:

x2+bax=cax^2 + \frac{b}{a}x = -\frac{c}{a}

Add (b2a)2\left(\dfrac{b}{2a}\right)^2 to both sides to complete the square:

x2+bax+b24a2=ca+b24a2x^2 + \frac{b}{a}x + \frac{b^2}{4a^2} = -\frac{c}{a} + \frac{b^2}{4a^2}

Left side is now a perfect square:

(x+b2a)2=b24ac4a2\left(x + \frac{b}{2a}\right)^2 = \frac{b^2 - 4ac}{4a^2}

Take the square root:

x+b2a=±b24ac2ax + \frac{b}{2a} = \pm\frac{\sqrt{b^2 - 4ac}}{2a}

Solve for xx:

x=b±b24ac2ax = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}


Example 1

Solve: x2+5x+6=0x^2 + 5x + 6 = 0

Here a=1a = 1, b=5b = 5, c=6c = 6.

x=5±25242=5±12\begin{aligned} x &= \frac{-5 \pm \sqrt{25 - 24}}{2} \\[0.5em] &= \frac{-5 \pm 1}{2} \end{aligned}

So x=5+12=2x = \dfrac{-5 + 1}{2} = -2 or x=512=3x = \dfrac{-5 - 1}{2} = -3.


Example 2

Solve: 2x24x6=02x^2 - 4x - 6 = 0

Here a=2a = 2, b=4b = -4, c=6c = -6.

x=4±16+484=4±644=4±84\begin{aligned} x &= \frac{4 \pm \sqrt{16 + 48}}{4} \\[0.5em] &= \frac{4 \pm \sqrt{64}}{4} \\[0.5em] &= \frac{4 \pm 8}{4} \end{aligned}

So x=124=3x = \dfrac{12}{4} = 3 or x=44=1x = \dfrac{-4}{4} = -1.


Example 3: Irrational Roots

Solve: x22x1=0x^2 - 2x - 1 = 0

Here a=1a = 1, b=2b = -2, c=1c = -1.

x=2±4+42=2±82=2±222=1±2\begin{aligned} x &= \frac{2 \pm \sqrt{4 + 4}}{2} \\[0.5em] &= \frac{2 \pm \sqrt{8}}{2} \\[0.5em] &= \frac{2 \pm 2\sqrt{2}}{2} \\[0.5em] &= 1 \pm \sqrt{2} \end{aligned}

When to Use It

The quadratic formula always works.

SituationBest method
Simple, obvious factorsFactoring
Need exact irrational answersQuadratic formula
Coefficients are messyQuadratic formula
Just want a quick answerQuadratic formula