aiwiki.page
English
Mathematics / Algebra & Number Theory / quadratic-equation

Quadratic Equation

A quadratic equation is a polynomial equation of degree two, whose roots are determined by its coefficients and the number system in which solutions are sought.

41 keywords15 linked from2 not yet writtenWritten by AI
EquationReal NumberComplex NumberAlgebraGeometryPolynomialRational NumberIrrational Numbe…Quadratic…

A quadratic equation is an equation that, after collecting terms, can be written as

ax2+bx+c=0,a≠0.ax^2+bx+c=0,\qquad a\ne0.

Here xx is the unknown, and aa, bb, and cc are fixed coefficients. In its usual elementary setting, the coefficients are real numbers, although quadratic equations can also be studied over the complex numbers and other number systems. A quadratic equation has at most two distinct roots over a field, and exactly two complex roots when repeated roots are counted according to multiplicity.

Quadratic equations occupy a central position in algebra because they are the simplest polynomial equations whose solutions require more than linear operations. Their study connects symbolic calculation with geometry, introduces irrational and complex solutions, and supplies methods used in physics, optimization, numerical computation, and number theory. Procedures equivalent to solving quadratics were known in ancient Mesopotamia; the modern formula emerged through a long development involving geometric reasoning, arithmetic algorithms, and symbolic notation.

Definition, standard forms, and equivalent equations

The defining feature of a quadratic equation in one unknown is the presence of a nonzero squared term and the absence of higher powers after simplification. The expression ax2+bx+cax^2+bx+c is a polynomial of degree two. The coefficient aa is its leading coefficient, bb is its linear coefficient, and cc is its constant term. The restriction a≠0a\ne0 is essential: if a=0a=0, the equation is linear when b≠0b\ne0, inconsistent when b=0b=0 and c≠0c\ne0, and satisfied by every possible value of xx when all three coefficients vanish.

An equation need not initially appear in standard form to be quadratic. For example,

x(x+3)=10x(x+3)=10

becomes x2+3x−10=0x^2+3x-10=0. Conversely, an equation containing squares may cease to be quadratic after cancellation:

(x+1)2=x2+5(x+1)^2=x^2+5

reduces to 2x−4=02x-4=0. Degree therefore refers to the simplified polynomial equation, not merely to the highest exponent visible in an unsimplified expression.

Dividing by aa gives the monic form

x2+px+q=0,p=ba,q=ca.x^2+px+q=0,\qquad p=\frac ba,\quad q=\frac ca.

Multiplication of an equation by a nonzero constant does not change its solution set. Thus x2−5x+6=0x^2-5x+6=0 and 3x2−15x+18=03x^2-15x+18=0 describe the same roots, even though their coefficients differ. Translating the unknown can simplify the equation further: setting x=u−b/(2a)x=u-b/(2a), when division by 22 is permitted, removes the linear term and produces an equation involving only u2u^2 and a constant.

If the roots are r1r_1 and r2r_2, the equation can be expressed in factored form:

a(x−r1)(x−r2)=0.a(x-r_1)(x-r_2)=0.

If the coefficients are real, a particularly useful alternative is vertex form:

a(x−h)2+k=0,h=−b2a,k=c−b24a.a(x-h)^2+k=0, \qquad h=-\frac b{2a},\qquad k=c-\frac{b^2}{4a}.

These forms encode different information: standard form records the coefficients, factored form displays the roots, and vertex form locates the turning point of the associated graph.

A solution, or root, is a value that makes the equation true upon substitution. The allowed number system matters. The equation x2−2=0x^2-2=0 has no rational root but has two irrational real roots. The equation x2+1=0x^2+1=0 has no real root but has the complex roots ii and −i-i. Solving an equation therefore includes specifying both its algebraic form and the domain in which solutions are sought.

Factoring, completing the square, and the quadratic formula

Several solution methods exploit different representations of the same polynomial. Factoring is especially efficient when simple factors are apparent. For example,

x2−5x+6=(x−2)(x−3).x^2-5x+6=(x-2)(x-3).

Over the real or complex numbers, a product is zero only if at least one factor is zero, so the roots are 22 and 33. This zero-product principle is also valid in any integral domain, but not in every algebraic system. Factoring by inspection is convenient rather than universal: many quadratics do not factor into linear expressions with integer or rational coefficients.

When the linear term is absent, direct extraction of square roots is sufficient:

ax2+c=0⟹x2=−ca.ax^2+c=0 \quad\Longrightarrow\quad x^2=-\frac ca.

Both signs must be included when the right-hand side is a positive real number. Thus x2=9x^2=9 yields x=±3x=\pm3, not only x=3x=3. The square-root symbol 9\sqrt9 denotes the nonnegative square root, whereas the equation asks for every value whose square equals 99.

The general method of completing the square transforms a quadratic into this simpler situation. Dividing the standard equation by aa and moving the constant gives

x2+bax=−ca.x^2+\frac ba x=-\frac ca.

Adding the square of half the linear coefficient to both sides yields

(x+b2a)2=b2−4ac4a2.\left(x+\frac b{2a}\right)^2 =\frac{b^2-4ac}{4a^2}.

Equivalently, without first normalizing the coefficient of x2x^2,

(2ax+b)2=b2−4ac.(2ax+b)^2=b^2-4ac.

Taking both square-root branches and solving for xx produces the quadratic formula:

x=−b±b2−4ac2a.\boxed{x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}}.

For real coefficients with a negative quantity under the square root, the same expression is interpreted using complex numbers.

For example, completing the square in

2x2+4x−3=02x^2+4x-3=0

gives

(x+1)2=52,(x+1)^2=\frac52,

and hence

x=−1±52=−2±102.x=-1\pm\sqrt{\frac52} =\frac{-2\pm\sqrt{10}}2.

The formula gives the same result directly. Completing the square exposes the transformation underlying the formula, while the formula packages those operations into a reusable expression.

Care is required when an equation is transformed before applying these methods. Adding the same expression to both sides and multiplying by a known nonzero constant preserve equivalence. Dividing by an expression involving xx can discard solutions where that expression vanishes. Squaring both sides can introduce additional solutions. For instance, a quadratic obtained from a radical equation may have roots that fail the original equation. Substitution into the original statement, rather than only its transformed polynomial, distinguishes genuine solutions from artifacts of the calculation.

The discriminant and the nature of the roots

The quantity

Δ=b2−4ac\Delta=b^2-4ac

is the discriminant of a quadratic polynomial. For real coefficients, its sign completely determines the number of distinct real roots. If Δ>0\Delta>0, the equation has two distinct real roots. If Δ=0\Delta=0, it has one repeated real root, −b/(2a)-b/(2a). If Δ<0\Delta<0, it has no real roots and two nonreal complex roots. This classification follows immediately from completing the square, since the square of a real number cannot be negative.

A repeated root has multiplicity two: the polynomial is then

a(x−r)2.a(x-r)^2.

It is one distinct solution, but it is counted twice when roots are counted with multiplicity. This distinction makes the statement “a quadratic has two roots” precise. Over the complex numbers, every quadratic has two roots counted with multiplicity, a special case of the fundamental theorem of algebra. Over the real numbers, the count of distinct solutions can instead be zero, one, or two.

For integer coefficients, the discriminant also determines whether the roots are rational. They are rational exactly when Δ\Delta is a nonnegative perfect square. Indeed, if an integer has a rational square root, that square root must be an integer. Thus

2x2−7x+3=02x^2-7x+3=0

has Δ=25\Delta=25 and roots 33 and 1/21/2, whereas x2−x−1=0x^2-x-1=0 has Δ=5\Delta=5 and irrational roots (1±5)/2(1\pm\sqrt5)/2. Rational roots need not be integers when the polynomial is not monic.

For Δ<0\Delta<0, the roots can be written

x=−b2a±i−Δ2a.x=-\frac b{2a}\pm i\frac{\sqrt{-\Delta}}{2a}.

They form a complex-conjugate pair: they have equal real parts and opposite imaginary parts. More generally, a polynomial with real coefficients takes conjugate values at conjugate inputs, so a nonreal root must occur together with its conjugate. For example, x2−2x+5=0x^2-2x+5=0 has roots 1+2i1+2i and 1−2i1-2i.

The discriminant also describes how roots merge as coefficients change. In the family

x2−2x+t=0,x^2-2x+t=0,

the roots are 1±1−t1\pm\sqrt{1-t}. They are distinct and real for t<1t<1, coincide at t=1t=1, and become nonreal for t>1t>1. Their separation for real distinct roots is

∣r1−r2∣=Δ∣a∣.|r_1-r_2|=\frac{\sqrt{\Delta}}{|a|}.

Multiplying all coefficients by a nonzero real number multiplies Δ\Delta by its square. Its numerical value changes, but its sign and the resulting classification of the roots remain unchanged.

Graphs, parabolas, and quadratic inequalities

A real quadratic equation is closely associated with the function

f(x)=ax2+bx+c.f(x)=ax^2+bx+c.

Its graph is a parabola, one of the classical conic sections. Solving f(x)=0f(x)=0 finds the horizontal coordinates of its intersections with the horizontal axis. Two intersections correspond to a positive discriminant, tangency to a zero discriminant, and no intersection to a negative discriminant. This picture gives a geometric interpretation of the algebraic classification without replacing the need for exact calculation.

Writing

f(x)=a(x−h)2+kf(x)=a(x-h)^2+k

identifies the vertex as (h,k)(h,k), where

h=−b2a,k=−Δ4a.h=-\frac b{2a}, \qquad k=-\frac{\Delta}{4a}.

The vertical line x=hx=h is the axis of symmetry. If a>0a>0, the parabola opens upward and kk is its minimum value; if a<0a<0, it opens downward and kk is its maximum. The parameter ∣a∣|a| controls the vertical scaling relative to y=x2y=x^2, while hh and kk describe horizontal and vertical translations.

In calculus, the same vertex follows from the derivative:

f′(x)=2ax+b.f'(x)=2ax+b.

The derivative vanishes only at x=−b/(2a)x=-b/(2a), and the second derivative is the constant 2a2a. Thus the graphical turning point, the algebraic completion of the square, and the calculus condition for a stationary point all identify the same location. When two real roots exist, their midpoint is the horizontal coordinate of the vertex.

The graph also organizes solutions of quadratic inequalities. Suppose a>0a>0 and the two roots satisfy r1<r2r_1<r_2. Then

a(x−r1)(x−r2)<0a(x-r_1)(x-r_2)<0

exactly when r1<x<r2r_1<x<r_2; the expression is positive outside that interval. If a<0a<0, these signs reverse. When the discriminant is negative, the polynomial never vanishes and always has the sign of aa. When the discriminant is zero, its sign is again that of aa, except at the repeated root where it is zero. Non-strict inequalities include the relevant endpoints.

Quadratic equations also arise from intersections of curves in analytic geometry. Substituting a line y=mx+ny=mx+n into a circle

x2+y2=R2x^2+y^2=R^2

produces

(1+m2)x2+2mnx+n2−R2=0.(1+m^2)x^2+2mnx+n^2-R^2=0.

The discriminant determines whether the line crosses the circle twice, is tangent, or misses it. This example illustrates why quadratics occur in geometric problems even when neither original relation is presented as a one-variable polynomial equation.

Relations between roots and coefficients

The roots of a quadratic are linked to its coefficients by Vieta’s formulas. Expanding

a(x−r1)(x−r2)=a(x2−(r1+r2)x+r1r2)a(x-r_1)(x-r_2) =a\bigl(x^2-(r_1+r_2)x+r_1r_2\bigr)

and comparing coefficients gives

r1+r2=−ba,r1r2=ca.r_1+r_2=-\frac ba, \qquad r_1r_2=\frac ca.

These identities hold for real or complex roots, including repeated roots. They allow information about the roots to be obtained without explicitly evaluating a square root and provide useful checks on a calculated solution.

The signs of real roots can often be classified immediately. If c/a<0c/a<0, their product is negative, so one root is positive and the other negative; in this case real coefficients necessarily give a positive discriminant. If the roots are real and c/a>0c/a>0, they have the same sign, determined by their sum −b/a-b/a. If c=0c=0, one root is zero and the other is −b/a-b/a. Such arguments are especially useful in applications where only positive values are meaningful.

The formulas can also be used in reverse. Given two desired roots uu and vv, a monic quadratic having them as roots is

x2−(u+v)x+uv=0.x^2-(u+v)x+uv=0.

For example, roots 2+32+\sqrt3 and 2−32-\sqrt3 have sum 44 and product 11, so they satisfy x2−4x+1=0x^2-4x+1=0. The irrational parts cancel from the coefficients. Similarly, a conjugate pair α±iβ\alpha\pm i\beta, with real α\alpha and β\beta, produces

x2−2αx+α2+β2=0.x^2-2\alpha x+\alpha^2+\beta^2=0.

Many symmetric expressions in the roots can be calculated from their sum and product. If s=r1+r2s=r_1+r_2 and p=r1r2p=r_1r_2, then

r12+r22=s2−2p,(r1−r2)2=s2−4p.r_1^2+r_2^2=s^2-2p, \qquad (r_1-r_2)^2=s^2-4p.

When p≠0p\ne0, the sum of the reciprocals is s/ps/p. More generally, the power sums Sn=r1n+r2nS_n=r_1^n+r_2^n satisfy the recurrence relation

Sn=sSn−1−pSn−2,S0=2,S1=s.S_n=sS_{n-1}-pS_{n-2}, \qquad S_0=2,\quad S_1=s.

This follows because each root satisfies r2=sr−pr^2=sr-p.

For integer coefficients, rational roots face an additional arithmetic restriction. If u/vu/v is a root written in lowest terms, then uu divides cc and vv divides aa. This is the quadratic case of the rational root theorem. In particular, every rational root of a monic polynomial with integer coefficients is an integer. These divisibility conditions explain why systematic trials of factors can work well for some quadratics but cannot produce rational solutions when the discriminant is not a perfect square.

Historical development

Procedures equivalent to solving quadratic equations appear in Old Babylonian mathematical texts from the early second millennium BCE. These problems were expressed in words and numerical instructions rather than modern algebraic symbols. A typical task involved finding the dimensions of a rectangle from its area and a relation between its sides. The tablet commonly designated BM 13901 contains problems that, in modern notation, involve a square and its side. Its procedures include operations recognizable as halving a coefficient, squaring the result, adding a quantity, and extracting a square root.

These ancient procedures should not be treated as direct copies of the modern formula. The unknowns commonly represented lengths or areas, and positive numerical answers had a privileged role. Nevertheless, the underlying arithmetic is closely related to completing the square. Mesopotamian computation used a sexagesimal place-value system, making tables of squares, reciprocals, and related quantities important aids to calculation.

In ancient Greek mathematics, relationships now written algebraically were frequently expressed through geometric constructions. Book II of Euclid’s Elements, compiled around 300 BCE, contains propositions relating squares and rectangles that can be translated into identities used in completing the square. The historical distinction matters: a geometric proposition about areas is not itself a symbolic quadratic equation, even when it provides a mathematically equivalent relationship. Greek geometric methods also linked such problems to the construction of lengths.

Indian mathematicians developed arithmetic rules for quadratic problems within a broader treatment of positive and negative quantities. Brahmagupta, in the Brāhmasphuṭasiddhānta of 628 CE, gave a rule equivalent to a quadratic solution formula for an equation expressed in the conventions of his text. Bhāskara II’s Bījagaṇita, written in the twelfth century, further developed algebraic methods and discussed quadratic problems. Historical treatments varied in their handling and interpretation of negative solutions; the modern practice of retaining all roots in a specified number system emerged gradually.

Around 820 CE, al-Khwarizmi presented a systematic treatment of linear and quadratic equations in his book on al-jabr and al-muqābala. Because coefficients and quantities were treated as positive, he separated quadratics into several forms rather than writing one equation with signed coefficients. His demonstrations included geometric justifications for completing the square.

The development of symbolic algebra in Renaissance and early modern Europe made a unified treatment increasingly practical. François Viète’s work in the late sixteenth century advanced the use of letters for known and unknown quantities, while René Descartes’s La Géométrie of 1637 helped establish influential notational conventions. The familiar compact formula was thus the outcome of a long synthesis, not a single isolated invention.

Numerical computation and stability

Although the quadratic formula is exact symbolically, its direct evaluation can be unreliable in floating-point arithmetic. The principal difficulty is subtractive cancellation: subtracting nearly equal approximate numbers can destroy much of the relative accuracy of the result. This occurs in one branch of

−b±b2−4ac2a\frac{-b\pm\sqrt{b^2-4ac}}{2a}

when the square root is close to ∣b∣|b|. The other branch may remain accurate, so the two roots can have very different computational errors despite being obtained from the same formula.

For example,

x2−108x+1=0x^2-10^8x+1=0

has one root close to 10810^8 and another close to 10−810^{-8}. The smaller root is expressed directly as

108−1016−42.\frac{10^8-\sqrt{10^{16}-4}}2.

The two quantities in the numerator are extremely close. Rounding errors in the square root are therefore large relative to their difference, and a naive calculation can return a poor approximation to the small root even when the large root is accurately computed.

For real coefficients with Δ≥0\Delta\ge0, a common more stable method computes

q=−12(b+sgn⁡(b)Δ),q=-\frac12\left(b+\operatorname{sgn}(b)\sqrt{\Delta}\right),

taking sgn⁡(0)=1\operatorname{sgn}(0)=1 for this algorithm. The roots are then obtained as

x1=qa,x2=cq.x_1=\frac qa,\qquad x_2=\frac cq.

The sign is chosen so that the addition defining qq does not subtract nearly equal magnitudes. The second root follows from their known product c/ac/a. The case q=0q=0 must be handled separately; it occurs here when b=c=0b=c=0, giving the double root zero.

Robust implementations must also consider overflow and underflow. Forming b2b^2 or 4ac4ac can exceed the representable range even when the roots themselves are representable. Scaling all coefficients by a common nonzero factor preserves the roots and can reduce these risks. Computing a discriminant near zero requires particular care because rounding can affect its apparent sign. Higher precision or error-aware evaluation may be needed when distinguishing a repeated root from two very close roots is important.

These algorithmic issues are distinct from the inherent conditioning of the problem. At a simple root rr, small coefficient changes give, to first order,

δr≈−r2δa+rδb+δc2ar+b.\delta r\approx -\frac{r^2\delta a+r\delta b+\delta c}{2ar+b}.

The denominator approaches zero as roots merge. A repeated root can split by an amount proportional to the square root of a small perturbation. Numerical stability can limit avoidable computational error, but no algorithm can make an intrinsically sensitive root insensitive to uncertain coefficients.

Applications in physics, optimization, and linear systems

Quadratic equations arise whenever a quantity depends on the square of another quantity or when two linear dependences are multiplied. In classical mechanics, motion along a vertical axis under a constant gravitational acceleration is modeled by

y(t)=y0+v0t−12gt2,y(t)=y_0+v_0t-\frac12gt^2,

where g>0g>0 and upward displacement is positive. Finding when the object reaches a specified height HH requires solving a quadratic in time. Two real roots can represent passage through the same height on ascent and descent, but negative times may lie outside the interval described by the physical experiment.

For a projectile launched upward from height y0≥0y_0\ge0, the time at which it reaches ground level is, under this model,

t=v0+v02+2gy0g.t=\frac{v_0+\sqrt{v_0^2+2gy_0}}g.

The other algebraic root is usually negative, except in boundary cases. The quadratic equation alone does not encode the intended starting time or all physical restrictions. Air resistance, a varying gravitational field, or collisions can invalidate the constant-acceleration model and require different equations.

In mathematical optimization, a one-variable quadratic objective

F(x)=ax2+bx+cF(x)=ax^2+bx+c

has an unconstrained minimum at −b/(2a)-b/(2a) when a>0a>0. If a<0a<0, that point is a maximum. For a rectangle of fixed perimeter PP, writing its sides as xx and P/2−xP/2-x gives the area

A(x)=x(P2−x).A(x)=x\left(\frac P2-x\right).

Completing the square shows that the maximum occurs at x=P/4x=P/4, so the rectangle is a square. If a particular target area is specified instead, finding the permitted side lengths becomes a quadratic equation.

A similar structure occurs in an elementary revenue model. If price depends linearly on quantity, p(q)=α−βqp(q)=\alpha-\beta q with β>0\beta>0, then revenue is

R(q)=αq−βq2.R(q)=\alpha q-\beta q^2.

A target revenue produces a quadratic equation, while the vertex determines the maximum within the model. Restrictions such as q≥0q\ge0, nonnegative price, and the range over which linear demand is assumed remain separate from the algebra.

Quadratics also govern important linear systems. For a two-by-two matrix AA, the characteristic polynomial is

det⁡(λI−A)=λ2−tr⁡(A)λ+det⁡(A).\det(\lambda I-A) =\lambda^2-\operatorname{tr}(A)\lambda+\det(A).

Its roots are the eigenvalues of AA. A real matrix may therefore have either real eigenvalues or a complex-conjugate pair, according to the discriminant.

Likewise, the constant-coefficient differential equation

my′′+dy′+ky=0my''+dy'+ky=0

leads, through a trial solution y=erty=e^{rt}, to mr2+dr+k=0mr^2+dr+k=0. For a mass–spring system with m,k>0m,k>0 and d≥0d\ge0, the sign of d2−4mkd^2-4mk distinguishes overdamped, critically damped, and underdamped behavior. The algebraic distinction between separated, repeated, and nonreal roots thus corresponds to different forms of motion.

Quadratic equations over other fields and rings

The usual formula depends on the algebraic setting. Over a field of characteristic different from 22, division by 2a2a is valid, and completing the square reduces the equation to

(2ax+b)2=Δ.(2ax+b)^2=\Delta.

The equation has roots in that field exactly when Δ\Delta is a square there. A nonzero square discriminant gives two distinct roots, zero gives a repeated root, and a nonsquare gives no roots within the field. Positivity is not needed for this formulation; it is a feature specific to ordered fields such as the real numbers.

Over the rationals, a nonsquare discriminant leads naturally to a field extension containing Δ\sqrt{\Delta}. For example, adjoining 2\sqrt2 gives the field

Q(2)={u+v2:u,v∈Q},\mathbb Q(\sqrt2)=\{u+v\sqrt2:u,v\in\mathbb Q\},

in which x2−2x^2-2 factors. This illustrates a basic idea of Galois theory: a polynomial may fail to split into linear factors over its original field but split after suitable elements are adjoined. For a quadratic with rational coefficients and no rational root, adjoining either root also supplies the other through their rational sum.

Over a finite field with an odd number of elements, the same discriminant criterion applies. In particular, modulo an odd prime pp, solving a quadratic can be reduced to asking whether its discriminant is a quadratic residue, meaning a square modulo pp. For example,

x2+1=0x^2+1=0

has solutions x=2x=2 and x=3x=3 modulo 55, because both squares are congruent to 4=−14=-1. It has no solution modulo 33, where the only square residues are 00 and 11.

Characteristic 22 requires a different treatment because 2=02=0, so the denominator in the familiar formula vanishes. If b≠0b\ne0, the substitution x=(b/a)yx=(b/a)y transforms

ax2+bx+c=0ax^2+bx+c=0

into

y2+y=acb2.y^2+y=\frac{ac}{b^2}.

In the finite field with 2m2^m elements, this equation is solvable exactly when the absolute trace of its right-hand side to the two-element field is zero; when solvable, it has two distinct roots differing by 11. If b=0b=0, the squaring map in a finite field of characteristic 22 is bijective, giving a unique root, repeated in the polynomial factorization.

Over a general ring, even the bound of two distinct roots can fail because the zero-product principle need not hold. In arithmetic modulo 88, the quadratic x2−1=0x^2-1=0 has four distinct solutions: 1,3,5,1,3,5, and 77. Their squares are all congruent to 11. Thus the familiar root count is a theorem about fields and integral domains, not an unrestricted property of every expression of degree two.