4Physics logo Quadratic Equation Roots

The solution to a general quadratic equation is frequently committed to memory. Where that solution comes from is less often understood.

This page shows a basic derivation of the two quadratic roots.

The quadratic equation is given by

y = ax^2 + bx + c.


where a, b, and c are constants.

The roots of this equation are the points at which y=0. That is, the roots are where the graph of Eq.(1) crosses the x-axis.

In the case that a is zero, Eq.(1) is that of the straight line y = bx + c. Then there is only a single root, or point where the line crosses the x-axis. That point is at (x, y) is (-c/b, 0).

We are interested in the non-trivial case where a is non-zero. The roots of our quadratic are the solutions to

ax^2 + bx + c = 0 where a is not 0.


Our goal is to solve Eq.(2) for x. We begin by dividing both sides of the equation by a.

x^2 + bx/a + c/a = 0.


Move c/a to the right side of the equation by subtracting c/a.

x^2 + bx/a + c/a = 0.


We leave our equation temporarily to consider the following squared term.

((x + b/(2a))^2 = x^2 + bx/a + (b/2a)^2.


The details of the multiplication exercise are left as an aside.

Solving for the first two terms on the right hand side of our equation we have

x^2 + bx/a = (( x + b/(2a))^2 - (b/2a)^2.


Note that the left hand side of Eq.(6) is the same as the left hand side of Eq.(4). Setting the right hand sides of these two expressions equal, we write

(x + b/(2a))^2 - (b/2a)^2 = -c/a.


We move the last term on the left hand side of the equation to the right by addition.

(x + b/(2a))^2 = (b/2a)^2 -c/a.


Carrying through the square on the right hand side leaves us with

(x + b/(2a))^2 = b^2/(4a^2) -c/a.


It is convenient to express the right hand side using a common denomination. When this is done, our equation reduces to

(x + b/(2a))^2 = (b^2 - 4ac)/(4a^2).


The square on the left side of Eq.(10) must be dealt with to solve for x.

Before we take the square root, recall that

x + b/(2a) = +/- sqrt[(b^2 - 4ac)/(4a^2)].


We take the square root of Eq.(10), including both the positive and negative roots, to obtain

x + b/(2a) = +/- sqrt[(b^2 - 4ac)/(4a^2)].


This result can be simplified by carrying the square root through the numerator and denominator of the right hand side.

x + b/(2a) = +/- sqrt[(b^2 - 4ac)] / sqrt[(4a^2)].


The denominator is easily taken care of, leaving us with

x + b/(2a) = +/- sqrt[(b^2 - 4ac)]/(2a).


Moving the second term on the left hand side to the right is accomplished by subtraction.

x = -b/(2a) +/- sqrt[(b^2 - 4ac)]/(2a).


Finally, the right hand side can be expressed as a single term with 2a as the common denominator.

x = {-b +/- sqrt[(b^2 - 4ac)] }/ (2a).


©2004-2008, 4Physics

4Physics logo  

Shop for math and science toys!

ICRA Logo.   Valid HTML 4.01!