Quadratic formula

From Wikipedia, the free encyclopedia
A graph of a parabola-shaped function, which intersects the x-axis at x = 1 and x = 4.
The quadratic function y = 1/2x25/2x + 2, with roots x = 1 and x = 4.

In elementary algebra, the quadratic formula is a formula that provides the solutions to a quadratic equation. Other ways of solving a quadratic equation, such as completing the square, yield the same solutions.

Given a general quadratic equation of the form with representing an unknown, and coefficients and representing known real or complex numbers with the values of satisfying the equation, called the roots or zeros, can be found using the quadratic formula,

where the plus–minus symbol "" indicates that the equation has two roots.[1] Written separately, these are:

The quantity is known as the discriminant of the quadratic equation.[2] If the coefficients and are real numbers then

  • when the equation has two distinct real roots;
  • when the equation has one repeated real root; and
  • when the equation has two distinct complex roots, which are complex conjugates of each other.

Geometrically, the roots represent the values at which the graph of the function a parabola, crosses the -axis.[3] The quadratic formula can also be used to identify the parabola's axis of symmetry.[4]

Equivalent formulations[edit]

The quadratic formula can equivalently be written using various alternative expressions, for instance

which can be derived by first dividing a quadratic equation by resulting in then substituting the new coefficients into the standard quadratic formula. Because this variant allows re-use of the intermediately calculated quantity it can slightly reduce the arithmetic involved.

Square root in the denominator[edit]

A lesser known quadratic formula describes the same roots via an equation with the square root in the denominator (assuming ):[5]

Here the minus–plus symbol "" indicates that the two roots of the quadratic equation, in the same order as the standard quadratic formula, are

When has the opposite sign as either or subtraction can cause catastrophic cancellation, resulting in poor accuracy in numerical calculations; choosing between the version of the quadratic formula with the square root in the numerator or denominator depending on the sign of can avoid this problem. See § Numerical calculation below.

This version of the quadratic formula is used in Muller's method for finding the roots of general functions. It can be derived from the standard formula from the identity one of Vieta's formulas.

Derivations of the formula[edit]

Many different methods to derive the quadratic formula are available in the literature. The standard one is a simple application of the completing the square technique.[6][7][8][9] Alternative methods are sometimes simpler than completing the square, and may offer interesting insight into other areas of mathematics.

By completing the square[edit]

We start by dividing the quadratic equation by the quadratic coefficient , which is allowed because is non-zero, and then we subtract the constant term to isolate it on the right-hand side:

The left-hand side is now ready for the method of completing the square, i.e. adding a constant to a quadratic polynomial of the form to obtain a squared binomial In this example we add to both sides so that the left-hand side can be factored:

Because the left-hand side is now a perfect square, we can easily take the square root of both sides:

Finally, subtracting from both sides to isolate produces the quadratic formula:

Shorter method[edit]

Instead of dividing by to isolate it can be slightly simpler to multiply by instead to produce which allows us to complete the square without need for fractions. Then the steps of the derivation are:[10]

  1. Multiply each side by
  2. Add to both sides to complete the square.
  3. Take the square root of both sides.
  4. Isolate

Thus, the quadratic formula is derived as follows:

This derivation of the quadratic formula is ancient and was known to the 8th century Indian mathematician Śrīdhara.[11] Compared with the derivation in standard usage, this alternate derivation avoids fractions and squared fractions until the last step and hence does not require a rearrangement after step 3 to obtain a common denominator in the right side.[10]

By substitution[edit]

Another derivation uses a change of variables to put the equation into the form in terms of a new variable and some constant expression whose roots are then

By substituting into expanding the products and combining like terms, and then solving for we have:

Finally, after taking a square root of both sides and substituting the resulting expression for back into the familiar quadratic formula emerges:

By using algebraic identities[edit]

The following method was used by many historical mathematicians:[12]

Let the roots of the quadratic equation be and The derivation starts from an identity for the square of a difference (valid for any two complex numbers), of which we can take the square root on both sides:

Since the coefficient we can divide the quadratic equation by to obtain a monic polynomial with the same roots. Namely,

This implies that the sum and the product Thus the identity can be rewritten:


The two possibilities for each of and are the same two roots in opposite order, so we can combine them into the standard quadratic equation:

By Lagrange resolvents[edit]

An alternative way of deriving the quadratic formula is via the method of Lagrange resolvents,[13] which is an early part of Galois theory.[14] 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 themselves rather than algebraically rearranging the original equation. Given a monic quadratic polynomial assume that and are the two roots. So the polynomial factors as

which implies and

Since multiplication and addition are both commutative, exchanging the roots and will not change the coefficients and : one can say that and are symmetric polynomials in and Specifically, they are the elementary symmetric polynomials – any symmetric polynomial in and can be expressed in terms of and instead.

The Galois theory approach to analyzing and solving polynomials is to ask whether, given coefficients of a polynomial each of which is a symmetric function in the roots, one can "break" the symmetry and thereby recover the roots. Using this approach, solving a polynomial of degree is related to the ways of rearranging ("permuting") terms, called the symmetric group on letters and denoted For the quadratic polynomial, the only ways to rearrange two roots are to either leave them be or to transpose them, so solving a quadratic polynomial is simple.

To find the roots and consider their sum and difference:

These are called the Lagrange resolvents of the polynomial, from which the roots can be recovered as

Because is a symmetric function in and it can be expressed in terms of and specifically as described above. However, is not symmetric, since exchanging and yields the additive inverse So cannot be expressed in terms of the symmetric polynomials. However, its square is symmetric in the roots, expressible in terms of and Specifically which implies Taking the positive root "breaks" the symmetry, resulting in

from which the roots and are recovered as
which is the quadratic formula for a monic polynomial.

Substituting yields the usual expression for an arbitrary quadratic polynomial. The resolvents can be recognized as

respectively the vertex and the discriminant of the monic polynomial.

A similar but more complicated method works for cubic equations, which have three resolvents and a quadratic equation (the "resolving polynomial") relating and which one can solve by the quadratic equation, and similarly for a quartic equation (degree 4), whose resolving polynomial is a cubic, which can in turn be solved.[13] 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.

Numerical calculation[edit]

The quadratic formula is exactly correct when performed using the idealized arithmetic of real numbers, but when approximate arithmetic is used instead, for example pen-and-paper arithmetic carried out to a fixed number of decimal places or the floating-point binary arithmetic available on computers, the limited precision of intermediate calculations can lead to substantially inaccurate results.

When evaluation of causes catastrophic cancellation, as does the evaluation of when When using the standard quadratic formula, calculating one of the two roots always involves addition, which preserves the working precision of the intermediate calculations, while calculating the other root involves subtraction, which compromises it. Therefore, naïvely following the standard quadratic formula to solve arbitrary quadratic equations is an unacceptable generic strategy if results should always be accurate. Unfortunately, introductory algebra textbooks typically do not address this problem, even though it causes students to obtain inaccurate results in other school subjects such as introductory chemistry.[15]

For example, if trying to solve the equation using a pocket calculator, the result of the quadratic formula might be approximately calculated as:[16]

Even though the calculator used ten decimal digits of precision for each step, calculating the difference between two approximately equal numbers has yielded a result for with only four correct digits.

One way to recover an accurate result is to use the identity In this example can be calculated as which is correct to the full ten digits. Another more or less equivalent approach is to use the version of the quadratic formula with the square root in the denominator to calculate one of the roots (see § Square root in the denominator above).

Practical computer implementations of the solution of quadratic equations commonly choose which formula to use for each root depending on the sign of [17]

Historical development[edit]

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

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

The Indian mathematician Brahmagupta (597–668 AD) explicitly described the quadratic formula in his treatise Brāhmasphuṭasiddhānta published in 628 AD,[23] but written in words instead of symbols.[24] His solution of the quadratic equation 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."[25] In modern notation, this can be written Śrīdhara (8th century), an Indian mathematician also came up with a similar algorithm for solving quadratic equations, though there is no indication that he considered both the roots.[26]

The 9th-century Persian mathematician Muḥammad ibn Mūsā al-Khwārizmī solved quadratic equations algebraically.[18]: 42  The quadratic formula covering all cases was first obtained by Simon Stevin in 1594.[27] In 1637 René Descartes published La Géométrie containing special cases of the quadratic formula in the form we know today.[28]

Geometric significance[edit]

Graph of y = ax2 + bx + c, where a and the discriminant b2 − 4ac are positive, with
  • Roots and y-intercept in red
  • Vertex and axis of symmetry in blue
  • Focus and directrix in pink

In terms of coordinate geometry, an axis-aligned parabola is a curve whose -coordinates are the graph of a second-degree polynomial, of the form where and are real-valued constant coefficients with

Geometrically, the quadratic formula defines the points on the graph, where the parabola crosses the -axis. Furthermore, it can be separated into two terms,

The first term describes the axis of symmetry, the line The second term, gives the distance the roots are away from the axis of symmetry.

If the parabola's vertex is on the -axis, then the corresponding equation has a single repeated root on the line of symmetry, and this distance term is zero; algebraically, the discriminant

If the discriminant is positive, then the vertex is not on the -axis but the parabola opens in the direction of the -axis, crossing it twice, so the corresponding equation has two real roots. If the discriminant is negative, then the parabola opens in the opposite direction, never crossing the -axis, and the equation has no real roots; in this case the two complex-valued roots will be complex conjugates whose real part is the value of the axis of symmetry.

Dimensional analysis[edit]

If the constants and/or are not unitless then the quantities and must have the same units, because the terms and agree on their units. By the same logic, the coefficient must have the same units as irrespective of the units of This can be a powerful tool for verifying that a quadratic expression of physical quantities has been set up correctly.

See also[edit]


  1. ^ Sterling, Mary Jane (2010), Algebra I For Dummies, Wiley Publishing, p. 219, ISBN 978-0-470-55964-2
  2. ^ "Discriminant review", Khan Academy, retrieved 2019-11-10
  3. ^ "Understanding the quadratic formula", Khan Academy, retrieved 2019-11-10
  4. ^ "Axis of Symmetry of a Parabola. How to find axis from equation or from a graph. To find the axis of symmetry ...", www.mathwarehouse.com, retrieved 2019-11-10
  5. ^ This variant has been jokingly called the "citardauq" formula ("quadratic" spelled backwards).
    Goff, Gerald K. (1976), "The Citardauq Formula", The Mathematics Teacher, 69 (7): 550–551, JSTOR 27960584
  6. ^ Rich, Barnett; Schmidt, Philip (2004), Schaum's Outline of Theory and Problems of Elementary Algebra, The McGraw–Hill Companies, Chapter 13 §4.4, p. 291, ISBN 0-07-141083-X
  7. ^ 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."
  8. ^ Rockswold, Gary. College algebra and trigonometry and precalculus, p. 178 (Addison Wesley, 2002).
  9. ^ Beckenbach, Edwin et al. Modern college algebra and trigonometry, p. 81 (Wadsworth Pub. Co., 1986).
  10. ^ a b Hoehn, Larry (1975), "A More Elegant Method of Deriving the Quadratic Formula", The Mathematics Teacher, 68 (5): 442–443, doi:10.5951/MT.68.5.0442, JSTOR 27960212
  11. ^ Starting from a quadratic equation of the form Śrīdhara's derivation, as quoted by Bhaskara (c. 1150): "Multiply both sides of the equation by a number equal to four times the [coefficient of the] square, and add to them a number equal to the square of the original [coefficient of the] unknown quantity. [Then extract the root.]".
    Smith, David E. (1923), History of Mathematics, vol. 2, Boston: Ginn, p. 446
  12. ^ Debnath, Lokenath (2009), "The legacy of Leonhard Euler – a tricentennial tribute", International Journal of Mathematical Education in Science and Technology, 40 (3): 353–388, doi:10.1080/00207390802642237, S2CID 123048345
  13. ^ a b Clark, A. (1984). Elements of abstract algebra. Courier Corporation. p. 146.
  14. ^ Prasolov, Viktor; Solovyev, Yuri (1997), Elliptic functions and elliptic integrals, AMS Bookstore, p. 134, ISBN 978-0-8218-0587-9
  15. ^ Thompson, H. Bradford (1987). "Good numerical technique in chemistry: The quadratic equation". Journal of Chemical Education. 64 (12): 1009. doi:10.1021/ed064p1009.
  16. ^ This example comes from:
    Henrici, Peter (1982). Essentials of Numerical Analysis with Pocket Calculator Demonstrations. New York: Wiley. p. 13.
  17. ^ Forsythe, George E. (1966), How Do You Solve a Quadratic Equation (PDF) (Tech report), Stanford University, STAN-CS-66-40 (AD639052)
  18. ^ a b c d Irving, Ron (2013), Beyond the Quadratic Formula, MAA, ISBN 978-0-88385-783-0
  19. ^ The Cambridge Ancient History Part 2 Early History of the Middle East, Cambridge University Press, 1971, p. 530, ISBN 978-0-521-07791-0
  20. ^ Aitken, Wayne, "A Chinese Classic: The Nine Chapters" (PDF), Mathematics Department, California State University, retrieved 28 April 2013
  21. ^ Smith, David Eugene (1958), History of Mathematics, Courier Dover Publications, p. 380, ISBN 978-0-486-20430-7
  22. ^ Smith, David Eugene (1958), History of Mathematics, Courier Dover Publications, p. 134, ISBN 0-486-20429-4
  23. ^ Bradley, Michael. The Birth of Mathematics: Ancient Times to 1300, p. 86 (Infobase Publishing 2006).
  24. ^ Mackenzie, Dana. The Universe in Zero Words: The Story of Mathematics as Told through Equations, p. 61 (Princeton University Press, 2012).
  25. ^ Stillwell, John (2004), Mathematics and Its History (2nd ed.), Springer, p. 87, ISBN 0-387-95336-1
  26. ^ O'Connor, John J.; Robertson, Edmund F. (2000), "Sridhara", MacTutor History of Mathematics Archive, University of St Andrews
  27. ^ Struik, D. J.; Stevin, Simon (1958), The Principal Works of Simon Stevin, Mathematics (PDF), vol. II–B, C. V. Swets & Zeitlinger, p. 470
  28. ^ Rene Descartes, The Geometry