Derivation of the quadratic equation

Many of us will have seen the general formula for solving quadratic equations during school. One may wonder how someone actually comes up with this equation. In this article I aim to show some simple derivations that build intuition.

The general form

The general form of the quadratic equation is ax2+bx+c=0ax^2 + bx + c = 0. We want to find an arithmetic expression in terms of aa, bb and cc that produces all values of xx for which this equation holds.

Let’s first consider the case where a=b=0a = b = 0:

0x2+0x+c=0c=0\begin{split} 0x^2 + 0x + c &= 0 \\ c &= 0 \\ \end{split}

Next, let’s consider the case where a=0a = 0 and b≠0b \neq 0:

0x2+bx+c=0bx=−cx=−cb\begin{split} 0x^2 + bx + c &= 0 \\ bx &= -c \\ x &= -\frac{c}{b} \\ \end{split}

For the rest of this article we will assume that a≠0a \neq 0.

Completing the square

We can solve the quadratic equation by completing the square.

If we have a quadratic equation in the form A(x−B)2=CA(x - B)^2 = C, it is easy to find a solution.

A(x−B)2=CAx−AB=±Cx=B±CA\begin{split} A\left(x - B\right)^2 &= C \\ \sqrt{A}x - \sqrt{A}B &= \pm \sqrt{C} \\ x &= B \pm \sqrt{\frac{C}{A}} \\ \end{split}

On the other hand, we can write this to be:

A(x−B)2=CA(x−B)2−C=0A(x2−2Bx+B2)−C=0Ax2−2ABx+AB2−C=0\begin{split} A\left(x - B\right)^2 &= C \\ A\left(x - B\right)^2 - C &= 0 \\ A\left(x^2 - 2Bx + B^2\right) - C &= 0 \\ Ax^2 - 2ABx + AB^2 - C &= 0 \\ \end{split}

Let a=Aa = A, b=−2ABb = -2AB and c=AB2−Cc = AB^2 - C to get ax2+bx+c=0ax^2 + bx + c = 0. Rewriting these equations gives:

a=A  ⟹  A=ab=−2AB  ⟹  B=−b2ac=AB2−C  ⟹  C=b24a−c\begin{aligned} a &= A &\implies A &= a \\ b &= -2AB &\implies B &= \frac{-b}{2a} \\ c &= AB^2 - C &\implies C &= \frac{b^2}{4a} - c \end{aligned}

Substituting aa, bb and cc back into the original solution to get:

x=B±CA=−b2a±b24a2−ca=−b2a±b24a2−4ac4a2=−b±b2−4ac2a\begin{split} x &= B \pm \sqrt{\frac{C}{A}} \\ &= \frac{-b}{2a} \pm \sqrt{\frac{b^2}{4a^2} - \frac{c}{a}} \\ &= \frac{-b}{2a} \pm \sqrt{\frac{b^2}{4a^2} - \frac{4ac}{4a^2}} \\ &= \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} \end{split}

Small aside: technically the square root of 4a24a^2 is not 2a2a, but 2∣a∣2\left|a\right|. However, since the formula already contains ±\pm, it is safe to not use the absolute value.

All parabolas are similar

An alternative way to find the simple case is by using the fact that all parabolas are similar.

Start with the simplest quadratic equation, which is: x2x^2

Translate in the y-direction to get: x2+Cx^2 + C

Translate in the x-direction to get: (x−B)2+C\left(x - B\right)^2 + C

Finally, scale by a constant factor to get: A(x−B)2+CA\left(x - B\right)^2 + C

Apart from the sign of CC, this is the same equation that is used when completing the square.