Proof of the quadratic formula

true

2022-12-27

Derivation of the quadratic formula and a little more on quadratics

Written by: Ned

algebra

learning in public

quadratic

proof

This was the first prood I ever encountered in a math class, I think it was in grade 10. At the time, I memorized it for the test but didn’t fully appreciate the significance of how central proofs are to mathematics. The formula itself comes readily to mind, and one of my professors in university thought that students should have to recite it before having their math degrees conferred. I always recall the formula, but it’s been long enough since I proved it that I thought it’d be neat to cover it here. My initial thought is that it involves completing the square and that means figuring out the term to add and subtract partway through.

Recall, that a quadratic is a polynomial of degree 2. In it’s most general form it consists of an expression f(x)=ax2+bx+cf(x) = ax^2 + bx + c that defines a parabola. While aa cannot be 00, b or c can take on 0 values. Quadratics have 0, 1, or 2 roots which may be real or complex. But for today, assume our exercise takes place in R\Bbb{R}.

From our generic quadratic, when y=f(x)=0y = f(x) = 0:

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

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

First divide through by a:

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

Complete the square by adding and subtracting b24a2\frac{b^2}{4a^{2}} term which is the trickiest part. I remember what it needs to be, because after taking the square root of both sides, we need the b2a-\frac{b}{2a} term, and squaring it and having it on the other sides provides the term that we need to complete the square.

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

Rearrange:

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

Factor the left side, by noting that bax=2b2ax\frac{b}{a}x = \frac{2b}{2a}x:

(x+b2a)2=ca+b24a2(x + \frac{b}{2a})^2 = - \frac{c}{a} + \frac{b^2}{4a^{2}}

Simplify the right side a little by finding a common denominator:

(x+b2a)2=4a4aca+b24a2(x + \frac{b}{2a})^2 = - \frac{4a}{4a}\cdot \frac{c}{a} + \frac{b^2}{4a^{2}}

(x+b2a)2=4ac4a2+b24a2(x + \frac{b}{2a})^2 = - \frac{4ac}{4a^2} + \frac{b^2}{4a^{2}}

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

Take the square root of both sides to begin solving for x:

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

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

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

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

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

Thus to find the value(s) of xx of the generic degree 2 polynomial ax2+bx+cax^2 + bx + c when yy is 00, we obtain the quadratic formula.

\square

Techniques and observations

This is a fairly straightforward direct proof. Knowing (or figuring out how) to add the b24a2\frac{b^2}{4a^{2}} in order to complete the square is the trickiest part of this proof since it isn’t intuitive, and it always threw me off when I was first learning it. I often find it easier to go from the formula to the generic polynomial by reversing the steps. In fact, when I was solving this on paper before writing up this post, I started from both the top and the bottom and met in the middle to make it a little more obvious exactly what I needed to add to get it to work.

Note that if b24ac>0b^2 - 4ac > 0 the equation yields 2 distinct real roots. If b24ac=0b^2 - 4ac = 0 the equation yields equal real roots. Finally, if b24ac<0b^2 - 4ac < 0 the equation yields complex roots rather than real ones. From our added term, we can also see that the sum of the roots is ba\frac{-b}{a} and the product of the roots will be ca\frac{c}{a}. This information can be useful when solving for coefficients, but given an equation it’s generally faster to factor or plug it into the quadratic formula to obtain the roots.