In basic algebra, the quadratic formula is the solution of the quadratic equation. There are other ways to solve the quadratic equation instead of using the quadratic formula, such as factoring, completing the square, or graphing. Using the quadratic formula is often the most convenient way.

${\displaystyle ax^{2}+bx+c=0.}$

Here x represents an unknown, while a, b, and c are constants with a not equal to 0. One can verify that the quadratic formula satisfies the quadratic equation, by inserting the former into the latter. Each of the solutions given by the quadratic formula is called a root of the quadratic equation.

## Derivation of the formula

Once a student understands how to complete the square, they can then derive the quadratic formula.[1][2] For that reason, the derivation is sometimes left as an exercise for the student, who can thereby experience rediscovery of this important formula.[3][4] The explicit derivation will now be carried out.

Divide the quadratic equation by a, which is allowed because a is non-zero:

${\displaystyle x^{2}+{\frac {b}{a}}x+{\frac {c}{a}}=0.}$

Subtract c/a from both sides of the equation, transforming it into the form

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

The quadratic equation is now in a form to which the method of completing the square can be applied. Thus, add a constant to both sides of the equation such that the left hand side becomes a complete square:

${\displaystyle x^{2}+{\frac {b}{a}}x+\left({\frac {b}{2a}}\right)^{2}=-{\frac {c}{a}}+\left({\frac {b}{2a}}\right)^{2},}$

which produces

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

Accordingly, after rearranging the terms on the right hand side to have a common denominator, we obtain this:

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

The square has thus been completed. Taking the square root of both sides yields the following equation:

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

Isolating x gives the quadratic formula:

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

The plus-minus symbol "±" indicates that both

${\displaystyle x={\frac {-b+{\sqrt {b^{2}-4ac}}}{2a}}\quad {\text{and}}\quad x={\frac {-b-{\sqrt {b^{2}-4ac}}}{2a}}}$

are solutions of the quadratic equation.[5] There are many alternatives of this derivation with minor differences, mostly concerning the manipulation of ${\displaystyle a}$.

Some sources, particularly older ones, use alternative parameterizations of the quadratic equation such as ${\displaystyle ax^{2}-2bx+c=0}$ [6] or ${\displaystyle ax^{2}+2bx+c=0}$,[7] where b has a magnitude one half of the more common one. These result in slightly different forms for the solution, but are otherwise equivalent.

## Historical development

The earliest methods for solving quadratic equations were geometric. Babylonian cuneiform tablets contain problems reducible to solving quadratic equations.[8] The Egyptian Berlin Papyrus, dating back to the Middle Kingdom (2050 BC to 1650 BC), contains the solution to a two-term quadratic equation.[9]

The Greek mathematician Euclid (circa 300 BC) used geometric methods to solve quadratic equations in Book 2 of his Elements, an influential mathematical treatise.[10] Rules for quadratic equations appear in the Chinese The Nine Chapters on the Mathematical Art circa 200 BC.[11][12] In his work Arithmetica, the Greek mathematician Diophantus (circa 250 BC) solved quadratic equations with a method more recognizably algebraic than the geometric algebra of Euclid.[10] His solution gives only one root, even when both roots are positive.[13]

The Indian mathematician Brahmagupta (597–668 AD) explicitly described the quadratic formula in his treatise Brāhmasphuṭasiddhānta published in 628 AD,[14] but written in words instead of symbols.[15] His solution of the quadratic equation ${\displaystyle ax^{2}+bx=c}$ was as follows: "To the absolute number multiplied by four times the [coefficient of the] square, add the square of the [coefficient of the] middle term; the square root of the same, less the [coefficient of the] middle term, being divided by twice the [coefficient of the] square is the value."[16] This is equivalent to:

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

The 9th century Persian mathematician al-Khwārizmī, influenced by earlier Greek and Indian mathematicians, solved quadratic equations algebraically.[17] The quadratic formula covering all cases was first obtained by Simon Stevin in 1594.[18] In 1637 René Descartes published La Géométrie containing the quadratic formula in the form we know today. The first appearance of the general solution in the modern mathematical literature appeared in an 1896 paper by Henry Heaton.[19]

## Importance of this solution

Among the many equations that one encounters while studying algebra, the quadratic formula is one of the most important, and is considered the most useful method of solving quadratic equations.[20][21] Unlike some other solution methods such as factoring, the quadratic formula can be used to solve any quadratic equation.[22][23] Many equations that do not initially appear to be quadratic can be put into quadratic form, and solved using the quadratic formula.[24] For these reasons, it is often memorized.[25][26]

Completing the square also allows for the solution of all quadratics, as it is mathematically equivalent, but the quadratic formula gives a result without the need for so much algebraic manipulation. As such, it is generally considered more practical to use the formula.[23][27][28][29] Completing the square is very useful for other purposes, such as putting the equations for conic sections into standard form.[30]

## Other derivations

A number of alternative derivations of the quadratic formula can be found in the literature. These derivations either (a) are simpler than the standard completing the square method, (b) represent interesting applications of other frequently used techniques in algebra, or (c) offer insight into other areas of mathematics.

### Alternate method of completing the square

The great majority of algebra texts published over the last several decades teach completing the square using the sequence presented earlier: (1) divide each side by a, (2) rearrange, (3) then add the square of one-half of b/a.

As pointed out by Larry Hoehn in 1975, completing the square can be accomplished by a different sequence that leads to a simpler sequence of intermediate terms: (1) multiply each side by 4a, (2) rearrange, (3) then add ${\displaystyle b^{2}}$.[31]

In other words, the quadratic formula can be derived as follows:

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

This actually represents an ancient derivation of the quadratic formula, and was known to the Hindus at least as far back as 1025 AD.[32] Compared with the derivation in standard usage, this alternate derivation is shorter, involves fewer computations with literal coefficients, avoids fractions until the last step, has simpler expressions, and uses simpler math. As Hoehn states, "it is easier 'to add the square of b' than it is 'to add the square of half the coefficient of the x term'".[31]

### By substitution

Another technique is solution by substitution. In this technique, we substitute ${\displaystyle x=y+m}$ into the quadratic to get:

${\displaystyle a(y+m)^{2}+b(y+m)+c=0}$

Expanding the result and then collecting the powers of ${\displaystyle y}$ produces:

${\displaystyle ay^{2}+y(2am+b)+(am^{2}+bm+c)=0}$

We have not yet imposed a second condition on ${\displaystyle y}$ and ${\displaystyle m}$, so we now choose m so that the middle term vanishes. That is, ${\displaystyle 2am+b=0}$ or ${\displaystyle m={\frac {-b}{2a}}}$. Subtracting the constant term from both sides of the equation (to move it to the right hand side) and then dividing by a gives:

${\displaystyle y^{2}={\frac {-(am^{2}+bm+c)}{a}}}$

Substituting for ${\displaystyle m}$ gives:

${\displaystyle y^{2}={\frac {-({\frac {b^{2}}{4a}}+{\frac {-b^{2}}{2a}}+c)}{a}}={\frac {b^{2}-4ac}{4a^{2}}}}$

Therefore ${\displaystyle y=\pm {\frac {\sqrt {b^{2}-4ac}}{2a}}}$; substituting ${\displaystyle x=y+m=y-{\frac {b}{2a}}}$ provides the quadratic formula.

### By using algebraic identities

Let the roots of the standard quadratic equation be ${\displaystyle r_{1}}$ and ${\displaystyle r_{2}}$. At this point, we recall the identity:

${\displaystyle (r_{1}-r_{2})^{2}=(r_{1}+r_{2})^{2}-4r_{1}r_{2}}$

Taking square root on both sides, we get

${\displaystyle r_{1}-r_{2}=\pm {\sqrt {(r_{1}+r_{2})^{2}-4r_{1}r_{2}}}}$

Since the coefficient a ≠ 0, we can divide the standard equation by a to obtain a quadratic polynomial having the same roots. Namely,

${\displaystyle x^{2}+{\frac {b}{a}}x+{\frac {c}{a}}=(x-r_{1})(x-r_{2})=x^{2}-(r_{1}+r_{2})x+r_{1}r_{2}.}$

From this we can see that the sum of the roots of the standard quadratic equation is given by ${\displaystyle -{\frac {b}{a}}}$, and the product of those roots is given by ${\displaystyle {\frac {c}{a}}.}$

Hence the identity can be rewritten as:

${\displaystyle r_{1}-r_{2}=\pm {\sqrt {(-{\frac {b}{a}})^{2}-4{\frac {c}{a}}}}=\pm {\sqrt {{\frac {b^{2}}{a^{2}}}-{\frac {4ac}{a^{2}}}}}=\pm {\frac {\sqrt {b^{2}-4ac}}{a}}}$

Now,

${\displaystyle r_{1}={\frac {(r_{1}+r_{2})+(r_{1}-r_{2})}{2}}={\frac {-{\frac {b}{a}}\pm {\frac {\sqrt {b^{2}-4ac}}{a}}}{2}}={\frac {-b\pm {\sqrt {b^{2}-4ac}}}{2a}}.}$

Since, ${\displaystyle r_{2}=-r_{1}-{\frac {b}{a}}}$, if we take ${\displaystyle r_{1}={\frac {-b+{\sqrt {b^{2}-4ac}}}{2a}}}$ then we obtain ${\displaystyle r_{2}={\frac {-b-{\sqrt {b^{2}-4ac}}}{2a}}}$ and if we instead take ${\displaystyle r_{1}={\frac {-b-{\sqrt {b^{2}-4ac}}}{2a}}}$ then we calculate that ${\displaystyle r_{2}={\frac {-b+{\sqrt {b^{2}-4ac}}}{2a}}.}$ Combining these results by using the standard shorthand, we have that the solutions of the quadratic equation are given by:

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

### By Lagrange resolvents

Template:Rellink An alternative way of deriving the quadratic formula is via the method of Lagrange resolvents, which is an early part of Galois theory.[33] This method can be generalized to give the roots of cubic polynomials and quartic polynomials, and leads to Galois theory, which allows one to understand the solution of algebraic equations of any degree in terms of the symmetry group of their roots, the Galois group.

This approach focuses on the roots more than on rearranging the original equation. Given a monic quadratic polynomial

${\displaystyle x^{2}+px+q,}$

assume that it factors as

${\displaystyle x^{2}+px+q=(x-\alpha )(x-\beta ),}$

Expanding yields

${\displaystyle x^{2}+px+q=x^{2}-(\alpha +\beta )x+\alpha \beta ,}$

Since the order of multiplication does not matter, one can switch ${\displaystyle \alpha }$ and ${\displaystyle \beta }$ and the values of p and q will not change: one says that p and q are symmetric polynomials in ${\displaystyle \alpha }$ and ${\displaystyle \beta }$. In fact, they are the elementary symmetric polynomials – any symmetric polynomial in ${\displaystyle \alpha }$ and ${\displaystyle \beta }$ can be expressed in terms of ${\displaystyle \alpha +\beta }$ and ${\displaystyle \alpha \beta .}$ The Galois theory approach to analyzing and solving polynomials is: given the coefficients of a polynomial, which are symmetric functions in the roots, can one "break the symmetry" and recover the roots? Thus solving a polynomial of degree n is related to the ways of rearranging ("permuting") n terms, which is called the symmetric group on n letters, and denoted ${\displaystyle S_{n}.}$ For the quadratic polynomial, the only way to rearrange two terms is to swap them ("transpose" them), and thus solving a quadratic polynomial is simple.

To find the roots ${\displaystyle \alpha }$ and ${\displaystyle \beta ,}$ consider their sum and difference:

{\displaystyle {\begin{aligned}r_{1}&=\alpha +\beta \\r_{2}&=\alpha -\beta .\end{aligned}}}

These are called the Lagrange resolvents of the polynomial; notice that one of these depends on the order of the roots, which is the key point. One can recover the roots from the resolvents by inverting the above equations:

{\displaystyle {\begin{aligned}\alpha &=\textstyle {\frac {1}{2}}\left(r_{1}+r_{2}\right)\\\beta &=\textstyle {\frac {1}{2}}\left(r_{1}-r_{2}\right).\end{aligned}}}

Thus, solving for the resolvents gives the original roots.

Formally, the resolvents are called the discrete Fourier transform (DFT) of order 2, and the transform can be expressed by the matrix ${\displaystyle \left({\begin{smallmatrix}1&1\\1&-1\end{smallmatrix}}\right),}$ with inverse matrix ${\displaystyle \left({\begin{smallmatrix}1/2&1/2\\1/2&-1/2\end{smallmatrix}}\right).}$ The transform matrix is also called the DFT matrix or Vandermonde matrix.

Now ${\displaystyle r_{1}=\alpha +\beta }$ is a symmetric function in ${\displaystyle \alpha }$ and ${\displaystyle \beta ,}$ so it can be expressed in terms of p and q, and in fact ${\displaystyle r_{1}=-p,}$ as noted above. But ${\displaystyle r_{2}=\alpha -\beta }$ is not symmetric, since switching ${\displaystyle \alpha }$ and ${\displaystyle \beta }$ yields ${\displaystyle -r_{2}=\beta -\alpha }$ (formally, this is termed a group action of the symmetric group of the roots). Since ${\displaystyle r_{2}}$ is not symmetric, it cannot be expressed in terms of the polynomials p and q, as these are symmetric in the roots and thus so is any polynomial expression involving them. Changing the order of the roots only changes ${\displaystyle r_{2}}$ by a factor of ${\displaystyle -1,}$ and thus the square ${\displaystyle \scriptstyle r_{2}^{2}=(\alpha -\beta )^{2}}$ is symmetric in the roots, and thus expressible in terms of p and q. Using the equation

${\displaystyle (\alpha -\beta )^{2}=(\alpha +\beta )^{2}-4\alpha \beta \!}$

yields

${\displaystyle r_{2}^{2}=p^{2}-4q\!}$

and thus

${\displaystyle r_{2}=\pm {\sqrt {p^{2}-4q}}.\!}$

If one takes the positive root, breaking symmetry, one obtains:

{\displaystyle {\begin{aligned}r_{1}&=-p\\r_{2}&={\sqrt {p^{2}-4q}}\end{aligned}}}

and thus

{\displaystyle {\begin{aligned}\alpha &=\textstyle {\frac {1}{2}}\left(-p+{\sqrt {p^{2}-4q}}\right)\\\beta &=\textstyle {\frac {1}{2}}\left(-p-{\sqrt {p^{2}-4q}}\right)\end{aligned}}}

Thus the roots are

${\displaystyle \textstyle {\frac {1}{2}}\left(-p\pm {\sqrt {p^{2}-4q}}\right)}$

which is the quadratic formula. Substituting ${\displaystyle \scriptstyle p={\tfrac {b}{a}},q={\tfrac {c}{a}}\!}$ yields the usual form for when a quadratic is not monic. The resolvents can be recognized as ${\displaystyle \scriptstyle {\frac {r_{1}}{2}}={\frac {-p}{2}}={\frac {-b}{2a}}\!}$ being the vertex, and ${\displaystyle \scriptstyle r_{2}^{2}=p^{2}-4q\!}$ is the discriminant (of a monic polynomial).

A similar but more complicated method works for cubic equations, where one has three resolvents and a quadratic equation (the "resolving polynomial") relating ${\displaystyle r_{2}}$ and ${\displaystyle r_{3},}$ which one can solve by the quadratic equation, and similarly for a quartic (degree 4) equation, whose resolving polynomial is a cubic, which can in turn be solved. The same method for a quintic equation yields a polynomial of degree 24, which does not simplify the problem, and in fact solutions to quintic equations in general cannot be expressed using only roots.

## References

1. {{#invoke:citation/CS1|citation |CitationClass=citation }}, Chapter 13 §4.4, p. 291
2. Li, Xuhui. An Investigation of Secondary School Algebra Teachers' Mathematical Knowledge for Teaching Algebraic Equation Solving, p. 56 (ProQuest, 2007): "The quadratic formula is the most general method for solving quadratic equations and is derived from another general method: completing the square."
3. Rockswold, Gary. College algebra and trigonometry and precalculus, p. 178 (Addison Wesley, 2002).
4. Beckenbach, Edwin et al. Modern college algebra and trigonometry, p. 81 (Wadsworth Pub. Co., 1986).
5. {{#invoke:citation/CS1|citation |CitationClass=citation }}
6. {{#invoke:citation/CS1|citation |CitationClass=citation }}
7. {{#invoke:citation/CS1|citation |CitationClass=citation }}
8. {{#invoke:citation/CS1|citation |CitationClass=book }}
9. {{#invoke:citation/CS1|citation |CitationClass=book }}
10. {{#invoke:citation/CS1|citation |CitationClass=book }}
11. Template:Cite web
12. {{#invoke:citation/CS1|citation |CitationClass=book }}
13. David Eugene Smith (1958). "History of mathematics". Courier Dover Publications. p.134. ISBN 0-486-20429-4
14. Bradley, Michael. The Birth of Mathematics: Ancient Times to 1300, p. 86 (Infobase Publishing 2006).
15. Mackenzie, Dana. The Universe in Zero Words: The Story of Mathematics as Told through Equations, p. 61 (Princeton University Press, 2012).
16. {{#invoke:citation/CS1|citation |CitationClass=book }}
17. {{#invoke:citation/CS1|citation |CitationClass=book }}
18. {{#invoke:citation/CS1|citation |CitationClass=citation }}
19. Heaton, H. (1896) A Method of Solving Quadratic Equations, American Mathematical Monthly 3(10), 236–237.
20. Jahr, Cathy. Barron's How to Prepare for the Tennessee Gateway High School Exit Exam in Algebra, p. 137 (Barron's Educational Series, 2005): "The Quadratic Formula is one of the most important formulas in mathematics because it is a method for solving all quadratic equations."
21. Heywood, Arthur. Intermediate algebra: lecture-lab, p. 235 (Dickenson Pub. Co., 1975): "The quadratic formula is one of the most important formulas in mathematics, and we will now spend some time studying many different ways of using it."
22. Blanton, Floyd. Modern College Algebra, p. 162 (McGraw–Hill, 1967): "The quadratic formula is the most powerful method for solving quadratics since it can be used to solve any quadratic."
23. Smith, R. and Peterson, J. Introductory Technical Mathematics, pp. 408–409 (Cengage Learning 2006): "The factoring method has limited application. Only certain quadratic equations can be solved by factoring. Completing the square…can be a rather long and complicated procedure and is seldom used in practical applications. [The] quadratic formula…is the most useful method for solving complete quadratic equations."
24. Banks, John. Elements of Algebra, p. 97 (Allyn and Bacon, 1962): "The quadratic formula is one of the most useful formulas in elementary mathematics. You should be certain you know what it is and how to use it. Many other equations can be solved by first reducing them to quadratic form."
25. Larson, R. and Hodgkins A. College Algebra with Applications for Business and Life Sciences, p. 104 (Cengage Learning 2009): "The Quadratic Formula is one of the most important formulas in algebra, and you should memorize it."
26. McConnell, John. Algebra, p. 603 (Scott Foresman 1993): "The Quadratic Formula is one of the most famous formulas in all of mathematics. You should memorize it today."
27. Payne, M. Intermediate Algebra, p. 289 (West Publishing 1985): "While the method of completing the square may be used to solve quadratic equations, it is more involved than the quadratic formula, and is seldom used in practical work."
28. Davis, L. Technical Mathematics, p. 174. (Merrill Publishing 1990): "You can use the quadratic formula, as well as completing the square, to solve any quadratic equation. However, you will find that the quadratic formula is easier to use."
29. Dugopolski, Mark. Algebra for College Students, p. 541 (McGraw Hill 2006): "Any quadratic equation can be solved by completing the square or using the quadratic formula. Because the quadratic formula is usually faster, it is used more often than completing the square."
30. Sterling, Mary. CliffsStudySolver: Algebra II, p. 60 (Houghton Mifflin Harcourt 2012).
31. {{#invoke:Citation/CS1|citation |CitationClass=journal }}
32. {{#invoke:citation/CS1|citation |CitationClass=book }}
33. {{#invoke:citation/CS1|citation |CitationClass=citation }}, §6.2, p. 134