$$x = {{-B \pm \sqrt{B^2 - 4AC}} \over 2A}$$

Few, however, remember how it was derived. How do you get from a general quadratic equation, $$Ax^2 + Bx + C = 0$$, to the general solution shown above?

First, let's recall that the square of a sum can be expressed as the square of the first plus twice the product plus the square of the second, $$(a + b)^2 = a^2 + 2ab + b^2$$. We want to manipulate the quadratic equation to get a similar expression where $$a = x$$. Let's start by getting rid of the coefficient of $$x^2$$.

$$x^2 + {B \over A}x + {C \over A} = 0, A \ne 0$$

Now we move the last term to the other side of the equal sign in preparation for adding another term that will make the expression a perfect square.

$$x^2 + {B \over A}x = -{C \over A}$$

But what term can we add to make the left expression a perfect square? Our second term needs to be twice the product of something and $$x$$.

$$x^2 + 2\left({B \over 2A}\right)x = -{C \over A}$$

It should now be apparent that we have to add the square of $${B \over 2A}$$ make the left expression a perfect square.

$$x^2 + 2\left({B \over 2A}\right)x + {B^2 \over 4A^2} = {B^2 \over 4A^2} - {C \over A}$$

Expressing the left as a square and combining the fractions on the right gives:

$$\left(x + {B \over 2A}\right)^2 = {{B^2 - 4AC} \over 4A^2}$$

Now we can take the square root of both sides to get:

$$x + {B \over 2A} = \pm \sqrt{{B^2 - 4AC} \over 4A^2}$$ which simplifies to $$x + {B \over 2A} = {\pm \sqrt{B^2 - 4AC} \over 2A}$$

Now we're nearly done. Solving for $$x$$ gives:

$$x = {{-B \pm \sqrt{B^2 - 4AC}} \over 2A}$$