nLab quadratic formula

The quadratic formula

Context

Analysis

Algebra

The quadratic formula

Idea

Consider the quadratic function

(1)f(x)ax 2+bx+c f(x) \coloneqq a{x}^2 + b{x} + c

which we wish to find the elements of the zero set. In certain contexts, the elements of the zero set are given by one or more versions of the quadratic formula.

Discussion

The coefficients a,b,ca, b, c of the quadratic function are commonly taken from an algebraically closed field KK of characteristic 00, such as the field \mathbb{C} of complex numbers, although any quadratically closed field whose characteristic is not 22 would work just as well. Alternatively, the coefficients can be taken from a real closed field KK, such as the field \mathbb{R} of real numbers; then the solutions belong to K[i]K[\mathrm{i}]. (Of course, [i]\mathbb{R}[\mathrm{i}] is simply \mathbb{C} again.) More generally, starting from any integral domain KK whose characteristic is not 22, the solutions belong to some splitting field of KK. (Of course, there are solutions in some splitting field, regardless of the characteristic, but they are not given by the quadratic formula if the characteristic is 22.)

Forms of the formula

Explicitly, the zero set of (1) may be given by the usual quadratic formula

(2)x ±=b±b 24ac2a, x_\pm = \frac{-b \pm \sqrt{b^2 - 4a{c}}}{2a} ,

which works as long as a0a \ne 0. There is also an alternate quadratic formula

(3)x ±=2cbb 24ac, x_\pm = \frac{2c}{-b \mp \sqrt{b^2 - 4a{c}}} ,

which may be obtained from (2) by rationalizing the numerator; this works as long as c0c \ne 0. (Note that ±\pm and \mp appear here simply to indicate the two square roots of the determinant b 24acb^2 - 4a{c} and how they correspond to the two solutions x ±x_\pm; we do not need to have a function \sqrt{} which always chooses a ‘principal’ square root.)

These two formulas are reconciled in the projective line of KK. As long as (a,b,c)(0,0,0)(a, b, c) \ne (0, 0, 0), there are two solutions (which might happen to be equal) in the projective line. If a=0a = 0, then one of these solutions is \infty, and (2) correctly gives us that solution (as long as b0b \ne 0) for one choice of square root, although it gives 0/00/0 for the other choice. Similarly, (3) correctly gives us x=0x = 0 when c=0c = 0 and b0b \ne 0, but it does not give us the other root when c=0c = 0. Note that if a,c=0a, c = 0 but b0b \ne 0, then (2) gives us one root (\infty) while (3) gives us the other (00).

So in general, we should be given a0a \ne 0, b0b \ne 0, or c0c \ne 0 for a nondegenerate equation (1). If a0a \ne 0, then we use (2); if c0c \ne 0, then we use (3). Finally, if b0b \ne 0, then we use both; each root will be successfully given by at least one formula for some choice of square root of b 24acb^2 - 4a{c}.

When the coefficients come from an ordered field KK (which we assume real closed), then we can write down a formula specially for the case when b0b \ne 0. This is the numerical analysts' quadratic formula

(4)x b^=2cbb^b 24ac; x b^=bb^b 24ac2a. \begin {gathered} \displaystyle x_{\hat{b}} = \frac{2c}{-b - \hat{b}\sqrt{b^2 - 4a{c}}} ;\\ \displaystyle x_{-\hat{b}} = \frac{-b - \hat{b}\sqrt{b^2 - 4a{c}}}{2a} .\\ \end {gathered}

In this formula, b^\hat{b} is the sign of bb, that is b/|b|b/{|b|}; also, we must choose a nonnegative principal square root, so that b 24ac<0\sqrt{b^2 - 4a{c}} \lt 0 in KK is avoided (and thus the common denominator of x b^x_{\hat{b}} and numerator of x b^x_{-\hat{b}} is nonzero even if not imaginary). Despite the name, this formula is not sufficient for all purposes in numerical analysis; one still needs all three formulas and chooses between them based on whether a0a \ne 0, b0b \ne 0, or c0c \ne 0 is best established.

Simplified formulas and characteristic 22

Sometimes one considers the quadratic function

f(x)ax 2+2px+cf(x) \coloneqq a{x}^2 + 2p{x} + c

instead of (1); then (2) simplifies to

(5)x ±=p±p 2aca x_\pm = \frac{-p \pm \sqrt{p^2 - a{c}}}a

(and similarly for (3) and (4)).

This is valid even in characteristic 22, but unfortunately then it is fairly useless, since b=2p=0b = 2p = 0. More precisely, if b=0b = 0, then (5) with p=0p = 0 gives the roots ±c/a\pm\sqrt{-c/a} in any characteristic, but in that case the equation was easy to solve without any formula. On the other hand, if b0b \ne 0 and charK=2\char K = 2, then no version of the quadratic formula is applicable, yet this gives no information as to whether the polynomial is solvable and what its roots are if it is. For example, the quadratic function f(x)x 2+xf(x) \coloneqq x^2 + x has roots 00 and 11 in F 2\F_2 (or 00 and 1-1 in any field, as may be found by factoring), while f(x)x 2+x+1f(x) \coloneqq x^2 + x + 1 is not solvable over F 2\F_2, yet both have b 24ac=1b^2 - 4a{c} = 1 and give 0/00/0 in both (2) and (3) (while (4) and (5) are directly inapplicable).

In constructive mathematics

In real analysis

For some discussion about the quadratic formula in constructive real analysis, see real quadratic function#ExactZeroes.

In complex analysis

In constructive mathematics, given a set KK, one has to distinguish between mere existence of an element that satisfies some property PP on KK, there exists xKx \in K such that P(x)P(x) holds, and constructive existence of an element that satisfies P(x)P(x) via the BHK interpretation of logic, which is the structure of an element of the set {xK|P(x)}\{x \in K \vert P(x)\}. This becomes very important in complex analysis when talking about square roots.

In constructive complex analysis, there are multiple notions of the fundamental theorem of algebra. One version that is provable without any constructive taboo for the associated complex numbers =[i]/(i 2+1)\mathbb{C} = \mathbb{R}[i]/(i^2 + 1) of the Cauchy real numbers (see Ruitenburg 1991) and for any Cauchy complete Archimedean ordered field (see Geuvers, Wiedijk, & Zwanenburg 2000) uses mere existence of a root for non-constant polynomials. Mere existence of a root in the BHK sense is equivalent in strength to every non-constant polynomial function being a surjection, since non-constant polynomial functions are closed under addition of constant polynomial functions. Hence, this implies that for all a,b,ca, b, c \in \mathbb{C}, there exists a root of the quadratic function zaz 2+bz+cz \mapsto a z^2 + b z + c.

However, the fundamental theorem of algebra is not provable if we try to use constructive existence of a root of non-constant polynomials in the sense of the BHK interpretation, that one can construct a specified element zz \in \mathbb{C} such that p(z)=0p(z) = 0. Constructive existence of a root in the BHK sense is equivalent in strength to having a section of every non-constant polynomial function, since non-constant polynomial functions are closed under addition of constant polynomial functions. In the case of the quadratic function zaz 2+bz+cz \mapsto a z^2 + b z + c, this implies a section of the quadratic function valid on the entirety of the complex numbers. However, such sections cannot be proven to exist on the complex numbers, and in fact can be proven to not exist in certain topoi, such as sheaves over \mathbb{R}, because any such section on the complex numbers, if it exists, is not continuous at the value b2a- \frac{b}{2a} where the discriminant b 24acb^2 - 4a c is equal to zero, and it is consistent for all functions on the complex numbers to be continuous. The problem here is the failure of some amount of choice, that since the quadratic function zaz 2+bz+cz \mapsto a z^2 + b z + c is a surjection on the complex numbers, one can construct a section of zaz 2+bz+cz \mapsto a z^2 + b z + c.

In light of this, one can instead interpret the constructive FTA as a statement about sets of roots rather than about individual roots, an interpretation that dates from Richman 2000. He constructs a complete metric space M^ n()\hat{M}_n(\mathbb{C}) which, classically, is the space of nn-element multisets of complex numbers (and constructively is the completion of that space) and proves that every complex polynomial function pp of degree nn may be associated with a point in this space in such a way that the nn elements of that point (when viewed as a multiset, if possible, and morally in any case) are the nn roots of pp. The quadratic formula is then a partial function

(a,b,c)b±b 24ac2a: 3M^ 2()(a, b, c) \mapsto \frac{-b \pm\sqrt{b^2 - 4a c}}{2a}:\mathbb{C}^3 \to \hat{M}_2(\mathbb{C})

which takes complex numbers a,b,ca, b, c \in \mathbb{C}, where aa is apart from zero, to a point

b±b 24ac2aM^ 2()\frac{-b \pm\sqrt{b^2 - 4a c}}{2a} \in \hat{M}_2(\mathbb{C})

that represents the set of roots of the quadratic function az 2+bz+ca z^2 + b z + c.

See also

References

  • Wim Ruitenburg: Constructing Roots of Polynomials over the Complex Numbers, Computational Aspects of Lie Group Representations and Related Topics, CWI Tract 84 Centre for Mathematics and Computer Science, Amsterdam (1991) 107–-128 [pdf, pdf]

  • Herman Geuvers, Freek Wiedijk, Jan Zwanenburg, A Constructive Proof of the Fundamental Theorem of Algebra without using the Rationals, TYPES ‘00: Selected papers from the International Workshop on Types for Proofs and Programs, Pages 96 - 111, 08 December 2000 [web, pdf]

  • Fred Richman, The fundamental theorem of algebra: a constructive development without choice. Pacific Journal of Mathematics 196 1 (2000) 213–230 [doi:10.2140/pjm.2000.196.213, pdf]

Last revised on June 9, 2026 at 21:12:30. See the history of this page for a list of all contributions to it.