# What is the quadratic formula?

Mar 2, 2017

$x = \frac{- b \pm \sqrt{{b}^{2} - 4 a c}}{2 a}$

#### Explanation:

Given a quadratic equation in the standard form:

$a {x}^{2} + b x + c = 0$

the roots are given by the quadratic formula:

$x = \frac{- b \pm \sqrt{{b}^{2} - 4 a c}}{2 a}$

This is a very useful formula to memorise, but where does it come from?

Given:

$a {x}^{2} + b x + c = 0$

Note that:

$a {\left(x + \frac{b}{2 a}\right)}^{2} = a \left({x}^{2} + \frac{b}{a} x + {b}^{2} / \left(4 {a}^{2}\right)\right)$

$\textcolor{w h i t e}{a {\left(x + \frac{b}{2 a}\right)}^{2}} = a {x}^{2} + b x + {b}^{2} / \left(4 a\right)$

So:

$0 = a {x}^{2} + b x + c = a {\left(x + \frac{b}{2 a}\right)}^{2} + \left(c - {b}^{2} / \left(4 a\right)\right)$

Add $\left({b}^{2} / \left(4 a\right) - c\right)$ to both ends and transpose to get:

$a {\left(x + \frac{b}{2 a}\right)}^{2} = {b}^{2} / \left(4 a\right) - c$

$\textcolor{w h i t e}{a {\left(x + \frac{b}{2 a}\right)}^{2}} = \frac{{b}^{2} - 4 a c}{4 a}$

Divide both sides by $a$ to get:

${\left(x + \frac{b}{2 a}\right)}^{2} = \frac{{b}^{2} - 4 a c}{4 {a}^{2}}$

$\textcolor{w h i t e}{{\left(x + \frac{b}{2 a}\right)}^{2}} = \frac{{b}^{2} - 4 a c}{2 a} ^ 2$

Take the square root of both sides, allowing for both positive and negative square roots:

$x + \frac{b}{2 a} = \pm \frac{\sqrt{{b}^{2} - 4 a c}}{2 a}$

Subtract $\frac{b}{2 a}$ from both sides to get:

$x = \frac{- b \pm \sqrt{{b}^{2} - 4 a c}}{2 a}$

Note that the quadratic formula will always work, but it will only give real values if ${b}^{2} - 4 a c \ge 0$, resulting in real square roots.