Inmathematics, aquadratic equation (from Latinquadratus'square') is anequation that can be rearranged in standard form as[1]where thevariable represents an unknown number, anda,b, andc represent known numbers, wherea ≠ 0. (Ifa = 0 andb ≠ 0 then the equation islinear, not quadratic.) The numbersa,b, andc are thecoefficients of the equation and may be distinguished by respectively calling them, thequadratic coefficient, thelinear coefficient and theconstant coefficient orfree term.[2]
The values of that satisfy the equation are calledsolutions of the equation, androots orzeros of thequadratic function on its left-hand side. A quadratic equation has at most two solutions. If there is only one solution, one says that it is adouble root. If all the coefficients arereal numbers, there are either two real solutions, or a real double root, or twocomplex solutions that arecomplex conjugates of each other. A quadratic equation always has two roots, if complex roots are included and a double root is counted for two. A quadratic equation can befactored into an equivalent equation[3]wherer ands are the solutions for.
Solutions to problems that can be expressed in terms of quadratic equations were known as early as 2000 BC.[4][5]
The quadratic equation contains onlypowers of that are non-negative integers, and therefore it is apolynomial equation. In particular, it is asecond-degree polynomial equation, since the greatest power is two.
Figure 1. Plots of quadratic functiony =ax2 +bx +c, varying each coefficient separately while the other coefficients are fixed (at valuesa = 1,b = 0,c = 0)
A quadratic equation whosecoefficients arereal numbers can have either zero, one, or two distinct real-valued solutions, also calledroots. When there is only one distinct root, it can be interpreted as two roots with the same value, called adouble root. When there are no real roots, the coefficients can be considered ascomplex numbers with zeroimaginary part, and the quadratic equation still has two complex-valued roots,complex conjugates of each-other with a non-zero imaginary part. A quadratic equation whose coefficients are arbitrary complex numbers always has two complex-valued roots which may or may not be distinct.
The solutions of a quadratic equation can be found by several alternative methods.
It may be possible to express a quadratic equationax2 +bx +c = 0 as a product(px +q)(rx +s) = 0. In some cases, it is possible, by simple inspection, to determine values ofp,q,r, ands that make the two forms equivalent to one another. If the quadratic equation is written in the second form, then the "Zero Factor Property" states that the quadratic equation is satisfied ifpx +q = 0 orrx +s = 0. Solving these two linear equations provides the roots of the quadratic.
For most students, factoring by inspection is the first method of solving quadratic equations to which they are exposed.[6]: 202–207 If one is given a quadratic equation in the formx2 +bx +c = 0, the sought factorization has the form(x +q)(x +s), and one has to find two numbersq ands that add up tob and whose product isc (this is sometimes called "Vieta's rule"[7] and is related toVieta's formulas). As an example,x2 + 5x + 6 factors as(x + 3)(x + 2). The more general case wherea does not equal1 can require a considerable effort in trial and error guess-and-check, assuming that it can be factored at all by inspection.
Except for special cases such as whereb = 0 orc = 0, factoring by inspection only works for quadratic equations that have rational roots. This means that the great majority of quadratic equations that arise in practical applications cannot be solved by factoring by inspection.[6]: 207
Figure 2. For thequadratic functiony =x2 −x − 2, the points where the graph crosses thex-axis,x = −1 andx = 2, are the solutions of the quadratic equationx2 −x − 2 = 0.
The process of completing the square makes use of the algebraic identitywhich represents a well-definedalgorithm that can be used to solve any quadratic equation.[6]: 207 Starting with a quadratic equation in standard form,ax2 +bx +c = 0
Divide each side bya, the coefficient of the squared term.
Subtract the constant termc/a from both sides.
Add the square of one-half ofb/a, the coefficient ofx, to both sides. This "completes the square", converting the left side into a perfect square.
Write the left side as a square and simplify the right side if necessary.
Produce two linear equations by equating the square root of the left side with the positive and negative square roots of the right side.
Solve each of the two linear equations.
We illustrate use of this algorithm by solving2x2 + 4x − 4 = 0
Some sources, particularly older ones, use alternative parameterizations of the quadratic equation such asax2 + 2bx +c = 0 orax2 − 2bx +c = 0 ,[11] whereb has a magnitude one half of the more common one, possibly with opposite sign. These result in slightly different forms for the solution, but are otherwise equivalent.
A number ofalternative derivations can be found in the literature. These proofs are simpler than the standard completing the square method, represent interesting applications of other frequently used techniques in algebra, or offer insight into other areas of mathematics.
A lesser known quadratic formula, as used inMuller's method, provides the same roots via the equation This can be deduced from the standard quadratic formula byVieta's formulas, which assert that the product of the roots isc/a. It also follows from dividing the quadratic equation by giving solving this for and then inverting.
One property of this form is that it yields one valid root whena = 0, while the other root contains division by zero, because whena = 0, the quadratic equation becomes a linear equation, which has one root. By contrast, in this case, the more common formula has a division by zero for one root and anindeterminate form0/0 for the other root. On the other hand, whenc = 0, the more common formula yields two correct roots whereas this form yields the zero root and an indeterminate form0/0.
When neithera norc is zero, the equality between the standard quadratic formula and Muller's method,can be verified bycross multiplication, and similarly for the other choice of signs.
It is sometimes convenient to reduce a quadratic equation so that itsleading coefficient is one. This is done by dividing both sides bya, which is always possible sincea is non-zero. This produces thereduced quadratic equation:[12]
wherep =b/a andq =c/a. Thismonic polynomial equation has the same solutions as the original.
The quadratic formula for the solutions of the reduced quadratic equation, written in terms of its coefficients, is
In the quadratic formula, the expression underneath the square root sign is called thediscriminant of the quadratic equation, and is often represented using an upper caseD or an upper case Greekdelta:[13]A quadratic equation withreal 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 withrational coefficients, if the discriminant is asquare number, then the roots are rational—in other cases they may bequadratic irrationals.
If the discriminant is zero, then there is exactly onereal root sometimes called a repeated ordouble root or two equal roots.
If the discriminant is negative, then there are no real roots. Rather, there are two distinct (non-real)complex roots[14] which arecomplex conjugates of each other. In these expressionsi is theimaginary unit.
Thus the roots are distinct if and only if the discriminant is non-zero, and the roots are real if and only if the discriminant is non-negative.
Visualisation of the complex roots ofy =ax2 +bx +c: the parabola is rotated 180° about its vertex (orange). Itsx-intercepts are rotated 90° around their mid-point, and the Cartesian plane is interpreted as the complex plane (green).[15]
The functionf(x) =ax2 +bx +c is aquadratic function.[16] The graph of any quadratic function has the same general shape, which is called aparabola. The location and size of the parabola, and how it opens, depend on the values ofa,b, andc. Ifa > 0, the parabola has aminimum point and opens upward. Ifa < 0, the parabola has a maximum point and opens downward. The extreme point of the parabola, whether minimum or maximum, corresponds to itsvertex. Thex-coordinate of the vertex will be located at, and they-coordinate of the vertex may be found by substituting thisx-value into the function. They-intercept is located at the point(0,c).
The solutions of the quadratic equationax2 +bx +c = 0 correspond to theroots of the functionf(x) =ax2 +bx +c, since they are the values ofx for whichf(x) = 0. Ifa,b, andc arereal numbers and thedomain off is the set of real numbers, then the roots off are exactly thex-coordinates of the points where the graph touches thex-axis. If the discriminant is positive, the graph touches thex-axis at two points; if zero, the graph touches at one point; and if negative, the graph does not touch thex-axis.
The termis a factor of the polynomialif and only ifr is aroot of the quadratic equationIt follows from the quadratic formula thatIn the special caseb2 = 4ac where the quadratic has only one distinct root (i.e. the discriminant is zero), the quadratic polynomial can befactored as
Figure 4. Graphing calculator computation of one of the two roots of the quadratic equation2x2 + 4x − 4 = 0. Although the display shows only five significant figures of accuracy, the retrieved value ofxc is 0.732050807569, accurate to twelve significant figures.A quadratic function without real root:y = (x − 5)2 + 9. The "3" is the imaginary part of thex-intercept. The real part is thex-coordinate of the vertex. Thus the roots are5 ± 3i.
If the parabola intersects thex-axis in two points, there are two realroots, which are thex-coordinates of these two points (also calledx-intercept).
If the parabola istangent to thex-axis, there is a double root, which is thex-coordinate of the contact point between the graph and parabola.
If the parabola does not intersect thex-axis, there are twocomplex conjugate roots. Although these roots cannot be visualized on the graph, theirreal and imaginary parts can be.[17]
Leth andk be respectively thex-coordinate and they-coordinate of the vertex of the parabola (that is the point with maximal or minimaly-coordinate. The quadratic function may be rewrittenLetd be the distance between the point ofy-coordinate2k on the axis of the parabola, and a point on the parabola with the samey-coordinate (see the figure; there are two such points, which give the same distance, because of the symmetry of the parabola). Then the real part of the roots ish, and their imaginary part are±d. That is, the roots areor in the case of the example of the figure
Although the quadratic formula provides an exact solution, the result is not exact ifreal numbers are approximated during the computation, as usual innumerical analysis, where real numbers are approximated byfloating point numbers (called "reals" in manyprogramming languages). In this context, the quadratic formula is not completelystable.
This occurs when the roots have differentorder of magnitude, or, equivalently, whenb2 andb2 − 4ac are close in magnitude. In this case, the subtraction of two nearly equal numbers will causeloss of significance orcatastrophic cancellation in the smaller root. To avoid this, the root that is smaller in magnitude,r, can be computed as whereR is the root that is bigger in magnitude. This is equivalent to using the formula
using the plus sign if and the minus sign if
A second form of cancellation can occur between the termsb2 and4ac of the discriminant, that is when the two roots are very close. This can lead to loss of up to half of correct significant figures in the roots.[11][18]
The trajectory of the cliff jumper isparabolic because horizontal displacement is a linear function of time, while vertical displacement is a quadratic function of time. As a result, the path follows quadratic equation, where and are horizontal and vertical components of the original velocity,a isgravitationalacceleration andh is original height. Thea value should be considered negative here, as its direction (downwards) is opposite to the height measurement (upwards).
Thegolden ratio is found as the positive solution of the quadratic equation
Descartes' theorem states that for every four kissing (mutually tangent) circles, theirradii satisfy a particular quadratic equation.
The equation given byFuss' theorem, giving the relation among the radius of abicentric quadrilateral'sinscribed circle, the radius of itscircumscribed circle, and the distance between the centers of those circles, can be expressed as a quadratic equation for which the distance between the two circles' centers in terms of their radii is one of the solutions. The other solution of the same equation in terms of the relevant radii gives the distance between the circumscribed circle's center and the center of theexcircle of anex-tangential quadrilateral.
Babylonian mathematicians, as early as 2000 BC (displayed onOld Babylonianclay tablets) could solve problems relating the areas and sides of rectangles. There is evidence dating this algorithm as far back as theThird Dynasty of Ur.[19] In modern notation, the problems typically involved solving a pair of simultaneous equations of the form:which is equivalent to the statement thatx andy are the roots of the equation:[20]: 86
The steps given by Babylonian scribes for solving the above rectangle problem, in terms ofx andy, were as follows:
Compute half ofp.
Square the result.
Subtractq.
Find the (positive) square root using a table of squares.
Add together the results of steps (1) and (4) to givex.
In modern notation this means calculating, which is equivalent to the modern dayquadratic formula for the larger real root (if any) witha = 1,b = −p, andc =q.
Geometric methods were used to solve quadratic equations in Babylonia, Egypt, Greece, China, and India. The EgyptianBerlin Papyrus, dating back to theMiddle Kingdom (2050 BC to 1650 BC), contains the solution to a two-term quadratic equation.[21] Babylonian mathematicians from circa 400 BC andChinese mathematicians from circa 200 BC usedgeometric methods of dissection to solve quadratic equations with positive roots.[22][23] Rules for quadratic equations were given inThe Nine Chapters on the Mathematical Art, a Chinese treatise on mathematics.[23][24] These early geometric methods do not appear to have had a general formula.Euclid, theGreek mathematician, produced a more abstract geometrical method around 300 BC. With a purely geometric approachPythagoras and Euclid created a general procedure to find solutions of the quadratic equation. In his workArithmetica, the Greek mathematicianDiophantus solved the quadratic equation, but giving only one root, even when both roots were positive.[25]
In 628 AD,Brahmagupta, anIndian mathematician, gave in his bookBrāhmasphuṭasiddhānta the first explicit (although still not completely general) solution of the quadratic equationax2 +bx =c 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."[26] This is equivalent toTheBakhshali Manuscript written in India in the 7th century AD contained an algebraic formula for solving quadratic equations, as well as linearindeterminate equations (originally of typeax/c =y).
Muhammad ibn Musa al-Khwarizmi (9th century) developed a set of formulas that worked for positive solutions. Al-Khwarizmi goes further in providing a full solution to the general quadratic equation, accepting one or two numerical answers for every quadratic equation, while providing geometricproofs in the process.[27] He also described the method of completing the square and recognized that thediscriminant must be positive,[27][28]: 230 which was proven by his contemporary'Abd al-Hamī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.[28]: 234 While al-Khwarizmi himself did not accept negative solutions, laterIslamic mathematicians that succeeded him accepted negative solutions,[27]: 191 as well asirrational numbers as solutions.[29]Abū Kāmil Shujā ibn Aslam (Egypt, 10th century) in particular was the first to accept irrational numbers (often in the form of asquare root,cube root orfourth root) as solutions to quadratic equations or ascoefficients in an equation.[30] The 9th century Indian mathematicianSridhara wrote down rules for solving quadratic equations.[31]
The Jewish mathematicianAbraham bar Hiyya Ha-Nasi (12th century, Spain) authored the first European book to include the full solution to the general quadratic equation.[32] His solution was largely based on Al-Khwarizmi's work.[27] The writing of the Chinese mathematicianYang Hui (1238–1298 AD) is the first known one in which quadratic equations with negative coefficients of 'x' appear, although he attributes this to the earlierLiu Yi.[33] By 1545Gerolamo Cardano compiled the works related to the quadratic equations. The quadratic formula covering all cases was first obtained bySimon Stevin in 1594.[34] In 1637René Descartes publishedLa Géométrie containing the quadratic formula in the form we know today.
Vieta's formulas (named afterFrançois Viète) are the relations between the roots of a quadratic polynomial and its coefficients. They result from comparing term by term the relationwith the equation
The first Vieta's formula is useful for graphing a quadratic function. Since the graph is symmetric with respect to a vertical line through thevertex, the vertex'sx-coordinate is located at the average of the roots (or intercepts). Thus thex-coordinate of the vertex isThey-coordinate can be obtained by substituting the above result into the given quadratic equation, givingAlso, these formulas for the vertex can be deduced directly from the formula (seeCompleting the square)
For numerical computation, Vieta's formulas provide a useful method for finding the roots of a quadratic equation in the case where one root is much smaller than the other. If|x2| << |x1|, thenx1 +x2 ≈x1, 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 largeb), which causesround-off error in a numerical evaluation. The figure shows the difference between[clarification needed] (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 coefficientb increases, initially the quadratic formula is accurate, and the approximate formula improves in accuracy, leading to a smaller difference between the methods asb 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 ensure a stable operation (seeStep response).
In the days before calculators, people would usemathematical tables—lists of numbers showing the results of calculation with varying arguments—to simplify and speed up computation. Tables of logarithms and trigonometric functions were common in math and science textbooks. Specialized tables were published for applications such as astronomy, celestial navigation and statistics. Methods of numerical approximation existed, calledprosthaphaeresis, that offered shortcuts around time-consuming operations such as multiplication and taking powers and roots.[35] Astronomers, especially, were concerned with methods that could speed up the long series of computations involved incelestial mechanics calculations.
It is within this context that we may understand the development of means of solving quadratic equations by the aid oftrigonometric substitution. Consider the following alternate form of the quadratic equation,
1
where the sign of the ± symbol is chosen so thata andc may both be positive. By substituting
2
and then multiplying through bycos2(θ) /c, we obtain
3
Introducing functions of2θ and rearranging, we obtain
4
5
where the subscriptsn andp correspond, respectively, to the use of a negative or positive sign in equation[1]. Substituting the two values ofθn orθp found from equations[4] or[5] into[2] gives the required roots of[1]. Complex roots occur in the solution based on equation[5] if the absolute value ofsin 2θp exceeds unity. The amount of effort involved in solving quadratic equations using this mixed trigonometric and logarithmic table look-up strategy was two-thirds the effort using logarithmic tables alone.[36] Calculating complex roots would require using a different trigonometric form.[37]
To illustrate, let us assume we had available seven-place logarithm and trigonometric tables, and wished to solve the following to six-significant-figure accuracy:
A seven-place lookup table might have only 100,000 entries, and computing intermediate results to seven places would generally require interpolation between adjacent entries.
If the quadratic equation with real coefficients has two complex roots—the case where requiringa andc to have the same sign as each other—then the solutions for the roots can be expressed in polar form as[38]
Figure 6. Geometric solution ofax2 +bx +c = 0 using Lill's method. Solutions are −AX1/SA, −AX2/SA
The quadratic equation may be solved geometrically in a number of ways. One way is viaLill's method. The three coefficientsa,b,c are drawn with right angles between them as in SA, AB, and BC in Figure 6. A circle is drawn with the start and end point SC as a diameter. If this cuts the middle line AB of the three then the equation has a solution, and the solutions are given by negative of the distance along this line from A divided by the first coefficienta or SA. Ifa is1 the coefficients may be read off directly. Thus the solutions in the diagram are −AX1/SA and −AX2/SA.[39]
Carlyle circle of the quadratic equationx2 − sx + p = 0.
The formula and its derivation remain correct if the coefficientsa,b andc arecomplex numbers, or more generally members of anyfield whosecharacteristic is not2. (In a field of characteristic 2, the element2a is zero and it is impossible to divide by it.)
The symbolin the formula should be understood as "either of the two elements whose square isb2 − 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 characteristic2. Even if a field does not contain a square root of some number, there is always a quadraticextension field which does, so the quadratic formula will always make sense as a formula in that extension field.
In a field of characteristic2, the quadratic formula, which relies on2 being aunit, does not hold. Consider themonic quadratic polynomialover a field of characteristic2. Ifb = 0, then the solution reduces to extracting a square root, so the solution isand there is only one root sinceIn summary,Seequadratic residue for more information about extracting square roots in finite fields.
In the case thatb ≠ 0, there are two distinct roots, but if the polynomial isirreducible, they cannot be expressed in terms of square roots of numbers in the coefficient field. Instead, define the2-rootR(c) ofc to be a root of the polynomialx2 +x +c, an element of thesplitting field of that polynomial. One verifies thatR(c) + 1 is also a root. In terms of the 2-root operation, the two roots of the (non-monic) quadraticax2 +bx +c areand
For example, leta denote a multiplicative generator of the group of units ofF4, theGalois field of order four (thusa anda + 1 are roots ofx2 +x + 1 overF4. Because(a + 1)2 =a,a + 1 is the unique solution of the quadratic equationx2 +a = 0. On the other hand, the polynomialx2 +ax + 1 is irreducible overF4, but it splits overF16, where it has the two rootsab andab +a, whereb is a root ofx2 +x +a inF16.
^Brāhmasphuṭasiddhānta, Colebrook translation, 1817, page 346; cited byStillwell, John (2010).Mathematics and Its History (3rd ed.). Undergraduate Texts in Mathematics. Springer. p. 93.doi:10.1007/978-1-4419-6053-5.ISBN978-0-387-95336-6.
^abcdKatz, V. J.; Barton, B. (2006). "Stages in the History of Algebra with Implications for Teaching".Educational Studies in Mathematics.66 (2):185–201.doi:10.1007/s10649-006-9023-7.S2CID120363574.
^Aude, H. T. R. (1938). "The Solutions of the Quadratic Equation Obtained by the Aid of the Trigonometry".National Mathematics Magazine.13 (3):118–121.doi:10.2307/3028750.JSTOR3028750.
^Simons, Stuart, "Alternative approach to complex roots of real quadratic equations",Mathematical Gazette 93, March 2009, 91–92.
^Bixby, William Herbert (1879),Graphical Method for finding readily the Real Roots of Numerical Equations of Any Degree, West Point N. Y.
^Weisstein, Eric W."Carlyle Circle".From MathWorld—A Wolfram Web Resource. Retrieved21 May 2013.