# How was the quadratic formula created? [duplicate]

I have tested the quadratic formula and I have found that it works, yet I am curious as to how it was created. Can anybody please tell me one of the ways that it was created?

## marked as duplicate by TheSimpliFire, user21820, Glorfindel, Hans Lundmark, YiFanMay 2 at 7:04

• Are you familiar with completing the square? – J. W. Tanner May 1 at 23:38
• @J.W.Tanner I googled completing the square and got this link: mathsisfun.com/algebra/completing-square.html this link only tells me vertex form and how it was made not how the quadratic formula was made – user604253 May 2 at 0:14
• Here is the geometric proof. – ersh May 2 at 0:21
• @datboi: that link you found discusses the steps to solve a quadratic equation; if you carry it through in the general case, you'll essentially derive the quadratic formula – J. W. Tanner May 2 at 0:30

We begin with the equation $$ax^2 + bx + c = 0$$, for which we want to find $$x$$. We divide through by $$a$$ first, and then bring the constant term to the other side:

$$x^2 + \frac b a x = - \frac c a$$

Next, we complete the square on the left-hand side. Remember, to complete the square, you take half of the coefficient of the linear term, square it, and add it both sides. This means we add $$(b/2a)^2 = b^2/4a^2$$ to both sides:

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

The left-hand side factors as a result, and we combine the terms on the right-hand side by getting a common denominator:

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

We now take the square root of both sides:

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

Solve for $$x$$:

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

Recall that $$\sqrt{a/b} = \sqrt a / \sqrt b ^{ \; \text{(note 1)}}$$. Using this property, the denominator of our root becomes $$2a$$, giving a common denominator with $$-b/2a$$. Thus,

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

yielding the quadratic formula we all know and love. $$^{ \; \text{(note 2)}}$$

Footnotes:

Note $$(1)$$ - The usual properties for roots, and exponents in turn (since $$\sqrt[n] a = a^{1/n}$$) that most people are familiar with, do not always hold. In particular, for example

$$\sqrt{\frac a b} = \frac{\sqrt a}{\sqrt b} \;\;\;\;\; \sqrt{ab} = \sqrt{a} \cdot \sqrt{b}$$

do not hold if $$a,b$$ are complex numbers. They hold if $$a,b$$ are nonnegative real numbers (and, in the first property shown, $$b \ne 0$$). A well-known example of why the second does not hold involves $$i$$, the complex number such that $$i^2 = -1$$. If this property held,

$$-1 = i^2 = \sqrt{-1} \sqrt{-1} = \sqrt{(-1)\cdot (-1)} = \sqrt{1} = 1$$

but $$-1 \ne 1$$.

In light of this note, note that we do not necessarily have any problems splitting up the root as we do in the proof. Even if $$a<0$$, $$a^2 > 0$$ as a result (of course, we also assume $$a,b,c$$ are real numbers in this derivation).

Note $$(2)$$ - As a note of interest, you are only guaranteed that $$x$$ is a real solution whenever the discriminant of the quadratic is nonnegative. The discriminant is the expression under the root; thus

$$ax^2+bx+c = 0 \; \text{has real solutions if and only if} \; b^2-4ac \ge 0$$

In particular, if $$b^2 - 4ac = 0$$, then the solutions $$x$$ gives are the same (what is called a "double root" or a "root of multiplicity $$2$$"). For $$b^2 - 4ac >0$$, you are ensured two distinct real values for your solutions.

If $$b^2 - 4ac < 0$$, then your solutions will instead be complex numbers. You will still have two distinct solutions however.

• -1 Please do not say things like $\sqrt{\frac{a}{b}}=\frac{\sqrt{a}}{\sqrt{b}}$ It is not true in general and there are already too many students that can't use $\sqrt{}$ properly. No need to add to the confusion. Pointing out the discriminant needs to be positive for real valued solutions might be worthwhile too. – DRF May 2 at 6:01
• @DRF It is true in the context OP is probably working with, considering when such questions would typically appear. One would argue it is also best to not confuse students by bogging them down with details that aren't relevant to them, until said details are in fact relevant. Nonetheless, I will add some footnotes regarding these. – Eevee Trainer May 2 at 6:59
• I disagree that it holds in the context the OP is working with. There is no reasonable context in which you work with quadratics yet the sqareroot of a fraction is the fraction of squareroots. $\sqrt{\frac{-8}{-2}}$ is not $\frac{\sqrt{-8}}{\sqrt{-2}}$. That's the problem I was looking at not imaginary numbers. Imaginary numbers really fix that problem in that the squareroot stops being an actual function (or becomes a multi-valued function if you want to call it that) so the issue becomes more obvious in my opinion. – DRF May 2 at 8:29
• Thank you for adding the note though and I reversed the down vote. – DRF May 2 at 8:34

We have $$(p+q)^2\equiv p^2+2pq+q^2$$.

If we want to solve $$ax^2+bx+c=0$$, we can rewrite the equation so that the square of some expression involving $$x$$ is equal to a constant. As $$a$$ is not necessarily a perfect square, we can multiply the whole equation by $$a$$ and make it $$a^2x^2+abx+ac=0$$. But we also want the middle term to be $$2$$ times something, we further multiply the equation by $$4$$, which is an even perfect square. So, we have

\begin{align*} 4a^2x^2+4abx+4ac&=0\\ (2ax)^2+2(2ax)(b)+b^2+4ac&=b^2\\ (2ax+b)^2&=b^2-4ac\\ 2ax+b&=\pm\sqrt{b^2-4ac}\\ x&=\frac{-b\pm\sqrt{b^2-4ac}}{2a} \end{align*}

There are a few ways to approach solving a quadratic equation. You might be familiar with some of them from math classes. If you remember that there is one called "completing the square", that's the one you need to know about for this question.

If not, you should look that up separately, even if you get only a vague understanding of it.

What you do to get the quadratic formula is that you put a, b, and c in for the numbers you would normally find in front of x^2, x, and the "constant" (meaning the standalone number not multiplied by any x). Then you do all the steps of completing the square, but using the a, b, and c instead of the numbers. And the solutions you get from that process are the two answers of the "quadratic formula". That's all it is--you use the "complete the square" technique with letters instead of numbers.

The way to get it is actually a beautiful one. The original proof is different since algebra was still in an early stage of development, but here's how I would do it today:

Let's consider the equation $$ax^2+bx+c=0$$ If a=0, we have a first degree equation. Otherwise, our equation can be written as $$x^2+\frac{b}{a}x +\frac{c}{a}=0$$

On the other hand, $$(x+\frac{b}{2a})^2=x^2+\frac{b}{a}x+\frac{b^2}{4a^2}$$. This looks like an idea completely out of the air, but you can get it by trying different ones and checking which one works. As you can see, the first two terms look like those form the equation, so we can say that $$x^2+\frac{b}{a}x = (x+\frac{b}{2a})^2 - \frac{b^2}{4a^2}$$

Now go back to the equation and replace $$x^2+\frac{b}{a}x$$ We get that $$(x+\frac{b}{2a})^2 - \frac{b^2}{4a^2} + \frac{c}{a} = 0$$ From this equation, it's just basic algebra.

$$(x+\frac{b}{2a})^2 = \frac{b^2}{4a^2} - \frac{c}{a}$$ Take the square root on both sides and enjoy your formula (unless I made a mistake, which I probably have)

• "The original proof is different since algebra was still in an early stage of development" -- Do you know where I might find the original proof? The proof you've posted is more or less the only one I've ever been familiar with. Also, you should have added $b^2/4a^2$ to both sides in completing the square (you forgot the $4$) – Eevee Trainer May 1 at 23:46
• I know it was made by Al-Juarismi, but I am not sure where to find his original text. For what I've seen, it's a geometrical version of the "completing the square" thing. Maybe try drawing the equations in terms of the areas of squares and rectangles – David May 1 at 23:48
• You did make a mistake. $(x+\frac{b}{2a})^2=x^2+\frac{b}{a}x+\frac{b^2}{4a^2}$. – Robert Shore May 2 at 0:43
• @RobertShore makes sense, as a $2a$ must appear somehwere after square rooting – David May 2 at 12:50