 Quadratic equation

This article is about quadratic equations and solutions. For more general information about quadratic functions, see Quadratic function. For more information about quadratic polynomials, see Quadratic polynomial.
In mathematics, a quadratic equation is a univariate polynomial equation of the second degree. A general quadratic equation can be written in the form
where x represents a variable or an unknown, and a, b, and c are constants with a ≠ 0. (If a = 0, the equation is a linear equation.)
The constants a, b, and c are called respectively, the quadratic coefficient, the linear coefficient and the constant term or free term. The term "quadratic" comes from quadratus, which is the Latin word for "square". Quadratic equations can be solved by factoring, completing the square, graphing, Newton's method, and using the quadratic formula (given below).
Contents
Quadratic formula
A quadratic equation with real or complex coefficients has two solutions, called roots. These two solutions may or may not be distinct, and they may or may not be real.
The roots are given by the quadratic formula
where the symbol "±" indicates that both
are solutions of the quadratic equation.
Discriminant
In the above formula, the expression underneath the square root sign is called the discriminant of the quadratic equation, and is often represented using an upper case Greek delta, the initial of the Greek word Διακρίνουσα, Diakrínousa, discriminant:
A quadratic equation with real coefficients can have either one or two distinct real roots, or two distinct complex roots. In this case the discriminant determines the number and nature of the roots. There are three cases:
 If the discriminant is positive, then there are two distinct roots, both of which are real numbers:
 For quadratic equations with integer coefficients, if the discriminant is a perfect square, then the roots are rational numbers—in other cases they may be quadratic irrationals.
 If the discriminant is zero, then there is exactly one distinct real root, sometimes called a double root:
 If the discriminant is negative, then there are no real roots. Rather, there are two distinct (nonreal) complex roots, which are complex conjugates of each other:
 where i is the imaginary unit.
Thus the roots are distinct if and only if the discriminant is nonzero, and the roots are real if and only if the discriminant is nonnegative.
Monic form
Dividing the quadratic equation by coefficient a gives the simplified monic form of
where p = ^{b}⁄_{a} and q = ^{c}⁄_{a}. This in turn simplifies the root and discriminant equations somewhat to
and
History
The Babylonian mathematicians, as early as 2000 BC (displayed on Old Babylonian clay tablets) could solve a pair of simultaneous equations of the form:
which are equivalent to the equation:^{[1]}
The original pair of equations were solved as follows:
 Form
 Form
 Form
 Form (where x ≥ y is assumed)
 Find x and y by inspection of the values in (1) and (4).^{[2]}
There is evidence pushing this back as far as the Ur III dynasty.^{[3]}
In the Sulba Sutras in ancient India circa 8th century BC quadratic equations of the form ax^{2} = c and ax^{2} + bx = c were explored using geometric methods. Babylonian mathematicians from circa 400 BC and Chinese mathematicians from circa 200 BC used the method of completing the square to solve quadratic equations with positive roots, but did not have a general formula.^{[citation needed]}
Euclid, the Greek mathematician, produced a more abstract geometrical method around 300 BC. Pythagoras and Euclid used a strictly geometric approach, and found a general procedure to solve the quadratic equation.^{[4]} In his work Arithmetica, the Greek mathematician Diophantus solved the quadratic equation, but giving only one root, even when both roots were positive.^{[5]}
In 628 AD, Brahmagupta, an Indian mathematician, gave the first explicit (although still not completely general) solution of the quadratic equation
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. (Brahmasphutasiddhanta (Colebrook translation, 1817, page 346)^{[2]} ” This is equivalent to:
The Bakhshali Manuscript written in India in the 7th century AD contained an algebraic formula for solving quadratic equations, as well as quadratic indeterminate equations (originally of type ax/c = y).
Muhammad ibn Musa alKhwarizmi (Persia, 9th century), inspired by Brahmagupta, developed a set of formulas that worked for positive solutions.^{[4]} AlKhwarizmi goes further in providing a full solution to the general quadratic equation, accepting one or two numerical answers for every quadratic equation, while providing geometric proofs in the process.^{[6]} He also described the method of completing the square and recognized that the discriminant must be positive,^{[7]} which was proven by his contemporary 'Abd alHamīd ibn Turk (Central Asia, 9th century) who gave geometric figures to prove that if the discriminant is negative, a quadratic equation has no solution.^{[8]} While alKhwarizmi himself did not accept negative solutions, later Islamic mathematicians that succeeded him accepted negative solutions,^{[9]} as well as irrational numbers as solutions.^{[10]} Abū Kāmil Shujā ibn Aslam (Egypt, 10th century) in particular was the first to accept irrational numbers (often in the form of a square root, cube root or fourth root) as solutions to quadratic equations or as coefficients in an equation.^{[11]}
The Jewish mathematician Abraham bar Hiyya HaNasi (12th century, Spain) authored the first European book to include the full solution to the general quadratic equation.^{[12]} His solution was largely based on AlKhwarizmi's work.^{[13]} The writing of the Chinese mathematician Yang Hui (12381298 AD) represents the first in which quadratic equations with negative coefficients of 'x' appear, although he attributes this to the earlier Liu Yi.
By 1545 Gerolamo Cardano compiled the works related to the quadratic equations. The quadratic formula covering all cases was first obtained by Simon Stevin in 1594.^{[14]} In 1637 René Descartes published La Géométrie containing the quadratic formula in the form we know today.^{[4]} The first appearance of the general solution in the modern mathematical literature appeared in a 1896 paper by Henry Heaton.^{[15]}
Examples of use
Geometry
The solutions of the quadratic equation
are also the roots of the quadratic function:
since they are the values of x for which
If a, b, and c are real numbers and the domain of f is the set of real numbers, then the roots of f are exactly the xcoordinates of the points where the graph touches the xaxis.
It follows from the above that, if the discriminant is positive, the graph touches the xaxis at two points, if zero, the graph touches at one point, and if negative, the graph does not touch the xaxis.
Quadratic factorization
The term
is a factor of the polynomial
if and only if r is a root of the quadratic equation
It follows from the quadratic formula that
In the special case (b^{2} = 4ac) where the quadratic has only one distinct root (i.e. the discriminant is zero), the quadratic polynomial can be factored as
Application to higherdegree equations
Certain higherdegree equations can be brought into quadratic form and solved that way. For example, the 6thdegree equation in x:
can be rewritten as:
or, equivalently, as a quadratic equation in a new variable u:
where
Solving the quadratic equation for u results in the two solutions:
Thus
Concentrating on finding the three cube roots of 2 + 2i – the other three solutions for x (the three cube roots of 2  2i ) will be their complex conjugates – rewriting the righthand side using Euler's formula:
(since e^{2kπi} = 1), gives the three solutions:
Using Eulers' formula again together with trigonometric identities such as cos(π/12) = (√2 + √6) / 4, and adding the complex conjugates, gives the complete collection of solutions as:
and
Derivations of the quadratic formula
By completing the square
The quadratic formula can be derived by the method of completing the square,^{[16]} so as to make use of the algebraic identity:
Dividing the quadratic equation
by a (which is allowed because a is nonzero), gives:
or
The quadratic equation is now in a form to which the method of completing the square can be applied. To "complete the square" is to add a constant to both sides of the equation such that the left hand side becomes a complete square:
which produces
The right side can be written as a single fraction, with common denominator 4a^{2}. This gives
Taking the square root of both sides yields
Isolating x, gives
By shifting ax^{2}
The quadratic formula can be derived by starting with equation
which describes the parabola as ax^{2} with the vertex shifted from the origin to (x_{V}, y_{V}).
Solving this equation for x is straightforward and results in
Using Vieta's formulas for the vertex coordinates
the values of x can be written as
Note. The formulas for x_{V} and y_{V} can be derived by comparing the coefficients in
and
Rewriting the latter equation as
and comparing with the former results in
from which Vieta's expressions for x_{V} and y_{V} can be derived.
By Lagrange resolvents
For more details on this topic, see Lagrange resolvents.An alternative way of deriving the quadratic formula is via the method of Lagrange resolvents, which is an early part of Galois theory.^{[17]} A benefit of this method is that it generalizes to give the solution of cubic polynomials and quartic polynomials, and leads to Galois theory, which allows one to understand the solution of polynomials 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
assume that it factors as
Expanding yields
where
and
Since the order of multiplication does not matter, one can switch α and β and the values of p and q will not change: one says that p and q are symmetric polynomials in α and β. In fact, they are the elementary symmetric polynomials – any symmetric polynomial in α and β can be expressed in terms of α + β and αβ. 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 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 α and β, consider their sum and difference:
These are called the Lagrange resolvents of the polynomial; notice that these depend on the order of the roots, which is the key point. One can recover the roots from the resolvents by inverting the above equations:
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 with inverse matrix The transform matrix is also called the DFT matrix or Vandermonde matrix.
Now r_{1} = α + β is a symmetric function in α and β, so it can be expressed in terms of p and q, and in fact r_{1} = − p, as noted above. Contrariwise, r_{2} = α − β is not symmetric, since switching α and β yields − r_{2} = β − α (formally, this is termed a group action of the symmetric group of the roots). Since 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. However, changing the order of the roots only changes r_{2} by a factor of − 1, and thus the square is symmetric in the roots, and thus expressible in terms of p and q. Using the equation
yields
and thus
 .
If one takes the positive root, breaking symmetry, one obtains:
and thus
Thus the roots are
which is the quadratic formula. Substituting yields the usual form for when a quadratic is not monic. The resolvents can be recognized as being the vertex, and 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 r_{2} and 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. However, 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.
Other methods of root calculation
Alternative quadratic formula
In some situations it is preferable to express the roots in an alternate form.
This alternative requires c to be nonzero; for, if c is zero, the formula correctly gives zero as one root, but fails to give any second, nonzero root. Instead, one of the two choices for ∓ produces the indeterminate form 0/0, which is undefined. However, the alternative form works when a is zero (giving the unique solution as one root and division by zero again for the other), which the normal form does not (instead producing division by zero both times).
The roots are the same regardless of which expression we use; the alternate form is merely an algebraic variation of the common form:
The alternative formula can reduce loss of precision in the numerical evaluation of the roots, which may be a problem if one of the roots is much smaller than the other in absolute magnitude. In this case, b is very close to , and the subtraction in the numerator causes loss of significance.
A mixed approach avoids both all cancellation problems (only numbers of the same sign are added), and the problem of c being zero:
Here sgn denotes the sign function.
Floating point implementation
A careful floating point computer implementation differs a little from both forms to produce a robust result. Assuming the discriminant, b^{2} − 4ac, is positive and b is nonzero, the code will be something like the following:^{[18]}
Here sgn(b) is the sign function, where sgn(b) is 1 if b is positive and −1 if b is negative; its use ensures that the quantities added are of the same sign, avoiding catastrophic cancellation. The computation of x_{2} uses the fact that the product of the roots is c/a.
Vieta's formulas
Main article: Vieta's formulasVieta's formulas give a simple relation between the roots of a polynomial and its coefficients. In the case of the quadratic polynomial, they take the following form:
and
These results follow immediately from the relation:
which can be compared term by term with:
The first formula above yields a convenient expression when graphing a quadratic function. Since the graph is symmetric with respect to a vertical line through the vertex, when there are two real roots the vertex’s xcoordinate is located at the average of the roots (or intercepts). Thus the xcoordinate of the vertex is given by the expression:
The ycoordinate can be obtained by substituting the above result into the given quadratic equation, giving
As a practical matter, Vieta's formulas provide a useful method for finding the roots of a quadratic in the case where one root is much smaller than the other. If x _{2} << x _{1}, then x _{1} + x _{2} ≈ x _{1}, and we have the estimate:
The second Vieta's formula then provides:
These formulas are much easier to evaluate than the quadratic formula under the condition of one large and one small root, because the quadratic formula evaluates the small root as the difference of two very nearly equal numbers (the case of large b), which causes roundoff error in a numerical evaluation. The figure shows the difference between (i) a direct evaluation using the quadratic formula (accurate when the roots are near each other in value) and (ii) an evaluation based upon the above approximation of Vieta's formulas (accurate when the roots are widely spaced). As the linear coefficient b increases, initially the quadratic formula is accurate, and the approximate formula improves in accuracy, leading to a smaller difference between the methods as b increases. However, at some point the quadratic formula begins to lose accuracy because of round off error, while the approximate method continues to improve. Consequently the difference between the methods begins to increase as the quadratic formula becomes worse and worse.
This situation arises commonly in amplifier design, where widely separated roots are desired to insure a stable operation (see step response).
Trigonometric solution for complex roots
In the case of complex roots the roots can also be found trigonometrically.^{[19]}
Generalization of quadratic equation
The formula and its derivation remain correct if the coefficients a, b and c are complex numbers, or more generally members of any field whose characteristic is not 2. (In a field of characteristic 2, the element 2a is zero and it is impossible to divide by it.)
The symbol
in the formula should be understood as "either of the two elements whose square is b^{2} − 4ac, if such elements exist". In some fields, some elements have no square roots and some have two; only zero has just one square root, except in fields of characteristic 2. Note that even if a field does not contain a square root of some number, there is always a quadratic extension field which does, so the quadratic formula will always make sense as a formula in that extension field.
Characteristic 2
In a field of characteristic 2, the quadratic formula, which relies on 2 being a unit, does not hold. Consider the monic quadratic polynomial
over a field of characteristic 2. If b = 0, then the solution reduces to extracting a square root, so the solution is
and note that there is only one root since
In summary,
See quadratic residue for more information about extracting square roots in finite fields.
In the case that b ≠ 0, there are two distinct roots, but if the polynomial is irreducible, they cannot be expressed in terms of square roots of numbers in the coefficient field. Instead, define the 2root R(c) of c to be a root of the polynomial x^{2} + x + c, an element of the splitting field of that polynomial. One verifies that R(c) + 1 is also a root. In terms of the 2root operation, the two roots of the (nonmonic) quadratic ax^{2} + bx + c are
and
For example, let a denote a multiplicative generator of the group of units of F_{4}, the Galois field of order four (thus a and a + 1 are roots of x^{2} + x + 1 over F_{4}). Because (a + 1)^{2} = a, a + 1 is the unique solution of the quadratic equation x^{2} + a = 0. On the other hand, the polynomial x^{2} + ax + 1 is irreducible over F_{4}, but it splits over F_{16}, where it has the two roots ab and ab + a, where b is a root of x^{2} + x + a in F_{16}.
This is a special case of ArtinSchreier theory.
See also
Notes
 ^ Stillwell, p. 86.
 ^ ^{a} ^{b} Stillwell, p. 87.
 ^ [1] Jöran Friberg, A Geometric Algorithm with Solutions to Quadratic Equations in a Sumerian Juridical Document from Ur III Umma, CDLI, 2009.
 ^ ^{a} ^{b} ^{c} BBC  h2g2  The History Behind The Quadratic Formula
 ^ David Eugene Smith (1958). "History of mathematics". Courier Dover Publications. p.134. ISBN 0486204294
 ^ Katz, Victor J.; Barton, Bill (October 2007), "Stages in the History of Algebra with Implications for Teaching", Educational Studies in Mathematics (Springer Netherlands) 66 (2): 185–201 [190–1], doi:10.1007/s1064900690237
 ^ (Boyer 1991, "The Arabic Hegemony" p. 230) "AlKhwarizmi here calls attention to the fact that what we designate as the discriminant must be positive: "You ought to understand also that when you take the half of the roots in this form of equation and then multiply the half by itself; if that which proceeds or results from the multiplication is less than the units above mentioned as accompanying the square, you have an equation." [...] Once more the steps in completing the square are meticulously indicated, without justification,"
 ^ (Boyer 1991, "The Arabic Hegemony" p. 234) "The Algebra of alKhwarizmi usually is regarded as the first work on the subject, but a recent publication in Turkey raises some questions about this. A manuscript of a work by 'AbdalHamid ibnTurk, entitled "Logical Necessities in Mixed Equations," was part of a book on Aljabr wa'l muqabalah which was evidently very much the same as that by alKhwarizmi and was published at about the same time  possibly even earlier. The surviving chapters on "Logical Necessities" give precisely the same type of geometric demonstration as alKhwarizmi's Algebra and in one case the same illustrative example x^{2} + 21 = 10x. In one respect 'AbdalHamad's exposition is more thorough than that of alKhwarizmi for he gives geometric figures to prove that if the discriminant is negative, a quadratic equation has no solution. Similarities in the works of the two men and the systematic organization found in them seem to indicate that algebra in their day was not so recent a development as has usually been assumed. When textbooks with a conventional and wellordered exposition appear simultaneously, a subject is likely to be considerably beyond the formative stage. [...] Note the omission of Diophantus and Pappus, authors who evidently were not at first known in Arabia, although the Diophantine Arithmetica became familiar before the end of the tenth century."
 ^ Katz, Victor J.; Barton, Bill (October 2007), "Stages in the History of Algebra with Implications for Teaching", Educational Studies in Mathematics (Springer Netherlands) 66 (2): 185–201 [191], doi:10.1007/s1064900690237
 ^ O'Connor, John J.; Robertson, Edmund F., "Arabic mathematics: forgotten brilliance?", MacTutor History of Mathematics archive, University of St Andrews, http://wwwhistory.mcs.standrews.ac.uk/HistTopics/Arabic_mathematics.html. "Algebra was a unifying theory which allowed rational numbers, irrational numbers, geometrical magnitudes, etc., to all be treated as "algebraic objects"."
 ^ Jacques Sesiano, "Islamic mathematics", p. 148, in Selin, Helaine; D'Ambrosio, Ubiratan (2000), Mathematics Across Cultures: The History of NonWestern Mathematics, Springer, ISBN 1402002602
 ^ The Equation that Couldn't be Solved
 ^ Katz, Victor J.; Barton, Bill (October 2007), "Stages in the History of Algebra with Implications for Teaching", Educational Studies in Mathematics (Springer Netherlands) 66 (2): 185–201 [193], doi:10.1007/s1064900690237
 ^ Struik, D. J.; Stevin, Simon (1958), The Principal Works of Simon Stevin, IIB, C. V. Swets & Zeitlinger, p. 470, http://www.historyofscience.nl/works_detail.cfm?RecordId=2702, Extract page 470
 ^ Heaton, H. (1896) A Method of Solving Quadratic Equations, American Mathematical Monthly 3(10), 236–237.
 ^ Rich, Barnett; Schmidt, Philip (2004), Schaum's Outline of Theory and Problems of ELEMENTARY ALGEBRA, The McGrawHill Companies, ISBN 007141083X, http://books.google.com/?id=8PRU9cTKprsC, Chapter 13 §4.4, p. 291
 ^ Prasolov, Viktor; Solovyev, Yuri (1997), Elliptic functions and elliptic integrals, AMS Bookstore, ISBN 978 0 82180587 9, http://books.google.com/?id=fcp9IiZd3tQC, §6.2, p. 134
 ^ Press, William H.; Flannery, Brian P.; Teukolsky, Saul A.; Vetterling, William T. (1992), Numerical Recipes in C (Second ed.), http://www.nrbook.com/a/bookcpdf.php, Section 5.6: "Quadratic and Cubic Equations.
 ^ Simons, Stuart, "Alternative approach to complex roots of real quadratic equations", Mathematical Gazette 93, March 2009, 9192.
References
 AlDīnawarī, Abū Ḥanīfa. 820. AlKitāb almukhtaṣar fī hīsāb alğabr wa’lmuqābala.
 Stillwell, John, Mathematics and Its History, Springer; 2nd edition (January 27, 2004). ISBN 0387953361.
External links
 Weisstein, Eric W., "Quadratic equations" from MathWorld.
 101 uses of a quadratic equation
 101 uses of a quadratic equation: Part II
 Stepbystep instructions on using the quadratic formula for any input
By name Zero polynomial · Constant function · Linear equation · Quadratic function · Cubic function · Quartic function · Quintic function · Sextic equation · Septic equation · Octic equation · Nonic equation · Decic equation · Hectic equationBy degree Categories: Featured articles on Mathematics Portal
 Polynomials
 Elementary algebra
 Equations
Wikimedia Foundation. 2010.
Look at other dictionaries:
quadratic equation — n. Algebra an equation in which the second power, or square, is the highest to which the unknown quantity is raised … English World dictionary
quadratic equation — noun an equation in which the highest power of an unknown quantity is a square • Syn: ↑quadratic • Hypernyms: ↑equation * * * Math. an equation containing a single variable of degree 2. Its general form is ax2 + bx + c = 0, where x … Useful english dictionary
quadratic equation — Math. an equation containing a single variable of degree 2. Its general form is ax2 + bx + c = 0, where x is the variable and a, b, and c are constants (a non zero). [1680 90] * * * Algebraic equation of particular importance in optimization. A… … Universalium
quadratic equation — UK [kwɒˌdrætɪk ɪˈkweɪʒ(ə)n] / US [kwɑˌdrætɪk ɪˈkweɪʒ(ə)n] noun [countable] Word forms quadratic equation : singular quadratic equation plural quadratic equations maths an equation in which a variable (= quantity that can represent different… … English dictionary
quadratic equation — equation in which one of the unknown quantities is squared (Mathematics) … English contemporary dictionary
quadratic equation — quadratic equation [kwɔˌdrætık ıˈkweıʒən US kwa: ] n [Date: 1600 1700; Origin: quadratic from quadrate square (14 21 centuries), from Latin quadratus, past participle of quadrare to make square ] technical an ↑equation such ax²+by+c = z,… … Dictionary of contemporary English
quadratic equation — noun a polynomial equation of the second degree … Wiktionary
QUADRATIC EQUATION — an equation involving the square of the unknown quantity … The Nuttall Encyclopaedia
quadratic equation — quadratic equation [ kwa,drætık ı kweıʒn ] noun count in mathematics, an EQUATION in which a VARIABLE (=quantity which can represent different amounts) is multiplied by itself once only … Usage of the words and phrases in modern English
quadratic equation — noun (C) technical an equation such as x/^2+bx+c=y, which includes numbers or quantities multiplied by themselves … Longman dictionary of contemporary English