00.03.02 · precalc / equations-lines

Quadratic equations and the quadratic formula

shipped3 tiersLean: partial

Anchor (Master): al-Khwārizmī ~825 Al-jabr; Cardano 1545 Ars Magna; Viète 1591 In artem analyticen isagoge; Gauss 1801 Disquisitiones Arithmeticae; Lang Algebra Ch. IV §1

Intuition [Beginner]

A quadratic equation in one variable has the form , where , , are numbers and the leading coefficient is not zero. The number we square is what makes it quadratic, and the condition is what prevents the equation from collapsing into a linear one. The quadratic formula

gives the solutions directly from the coefficients. The expression inside the square root is called the discriminant, written . It controls the answer to the central question: how many real solutions are there?

The discriminant tells us three things at once. If the square root is a positive real number, so the two values and are different — two distinct real solutions. If the square root is zero, the collapses, and there is one repeated real solution . If the number under the square root is negative; no real number squares to a negative, so the equation has no real solutions — only two complex ones.

The geometric picture matches the algebra. The graph of is a parabola — a U-shaped curve opening upward when and downward when . The solutions of are exactly the -values where the parabola crosses the -axis. A parabola that crosses the axis twice has two real roots, one that just touches the axis at its vertex has one repeated root, and one that floats entirely above or below the axis has no real roots.

Visual [Beginner]

Picture a parabola drawn on a coordinate grid, opening upward and crossing the -axis at two marked points. The curve dips below the axis between the crossings and rises above the axis on both sides. The vertex of the parabola sits at the bottom of the dip, marked with a smaller dot. The two crossing points are the solutions of the quadratic equation that defines the curve.

An upward-opening parabola on a coordinate grid crossing the x-axis at two marked roots with a vertex marked between them below the axis, axes labelled.

The picture records the central correspondence. Each real root of is a crossing of the parabola with the horizontal axis. The number of real roots — two, one, or zero — matches the number of crossings. The discriminant measures, algebraically, how far the parabola sits from being tangent to the axis: positive means cleanly two crossings, zero means tangent at the vertex, and negative means the parabola misses the axis entirely.

Worked example [Beginner]

Solve . Read off the coefficients: , , . Compute the discriminant: . Since there are two distinct real solutions. The square root of the discriminant is . Apply the formula: , giving or .

Check by factoring: , so the equation is , with solutions and . The two answers match.

Solve . Here , , , so . The discriminant is negative, so the equation has no real solutions. The parabola sits one unit above the -axis at its vertex and rises from there, never crossing the axis. Over the complex numbers the formula gives , the two imaginary solutions.

What this tells us: the discriminant predicts the answer before any computation. A positive discriminant gives two real roots, a zero discriminant gives a repeated real root, and a negative discriminant gives no real roots. The quadratic formula then turns those predictions into specific numbers.

Check your understanding [Beginner]

Formal definition [Intermediate+]

A quadratic polynomial over a field is a polynomial with and , the leading coefficient. A quadratic equation is the equation for a quadratic polynomial [Lang — Basic Mathematics Ch. 3–4]. A root (or solution) of the equation is an element (or in an extension field) with .

The discriminant of the quadratic polynomial is

The vertex of the parabola , viewed as a curve in , is the point with and . This is the unique critical point of the polynomial as a function of — the place where the derivative vanishes — and it is the global minimum when and global maximum when .

The quadratic polynomial admits the completed-square form

a pointwise identity in valid whenever is invertible (so over any field of characteristic not two). The completed-square form makes the vertex coordinates visible: the polynomial equals plus a non-negative multiple of at every , reaching the value exactly when .

Counterexamples to common slips

  • The condition is essential. If the polynomial is linear, not quadratic, and the quadratic formula's denominator vanishes. The classification by discriminant does not extend to the linear case in a meaningful way.
  • The discriminant depends on the polynomial, not just its set of roots. The polynomials and have the same roots , but their discriminants are and , respectively. Multiplying the equation by a nonzero constant scales the discriminant by the square of that constant.
  • Over a field of characteristic two the formula breaks down: division by is undefined. Quadratic equations over and its extensions require a different treatment via Artin-Schreier theory rather than the quadratic formula.

Key theorem with proof [Intermediate+]

Theorem (the quadratic formula via completing the square). Let be a field of characteristic not two and let with . Set . Then the equation has the solutions

in any extension field in which admits a square root [Lang — Basic Mathematics Ch. 3–4]. When has a square root in itself, the two solutions lie in ; when the two solutions coincide as the single repeated root ; and when is not a square in , the two solutions lie in the quadratic extension .

Proof. Since and has characteristic not two, both and are invertible. Divide the equation by :

Add and subtract on the left:

The first three terms form a square: . Substitute and rearrange:

Take square roots in any extension field in which has a square root :

using that and . Solve for :

Substituting either value back into and using the completed-square identity confirms the value is zero. The two solutions coincide iff iff .

Corollary (Vieta's formulas). If and are the two roots of the monic quadratic over a field, counted with multiplicity, then and . For the general quadratic the corresponding identities are and .

Proof of corollary. Multiply out and compare coefficients with , or compute directly from : the sum is , and the product is .

Bridge. The quadratic formula builds toward the broader structure theory of polynomial equations and the symmetry theory of roots. First, completing the square is the foundational substitution technique: by setting one eliminates the linear term, reducing the equation to . The analogous depression substitution for the cubic removes the quadratic term by setting , reducing the equation to a depressed cubic amenable to Cardano's 1545 formula; for the quartic, Ferrari's 1540 method depresses to and reduces via a resolvent cubic. Second, the discriminant generalises: every polynomial of degree over a field has a discriminant , a polynomial in the coefficients (via Vieta) that vanishes precisely when has a repeated root. The discriminant of a polynomial detects ramification in algebraic number theory and the singular locus in algebraic geometry. Third, Vieta's identities and are the prototype of the general fact that the elementary symmetric functions of the roots of a monic polynomial are (up to sign) the coefficients — the symmetric-function theory worked out by Newton and Lagrange and used systematically by Galois.

Putting these together, the foundational insight is that the formula for the roots of a polynomial is intertwined with the symmetry theory of the roots. The Abel-Ruffini theorem (1824) — that no general formula in radicals exists for polynomials of degree five or higher — is the negative companion of the formulas of Cardano and Ferrari. Galois theory (1832) supplied the structural explanation: the solvability of a polynomial equation in radicals is governed by the solvability of the associated Galois group, the group of permutations of the roots that preserves the rational relations among them. The quadratic and cubic and quartic each have soluble Galois groups (subgroups of for ), while the generic quintic has Galois group , which is not soluble. The quadratic formula is the simplest entry point to a body of algebra that runs from al-Khwārizmī's geometric construction in the ninth century to the structure-theoretic Galois correspondence of the nineteenth, and forward into modern algebraic number theory and algebraic geometry through the discriminant.

Exercises [Intermediate+]

Lean formalization [Intermediate+]

[object Promise]

The named statements compile against Mathlib's Algebra.QuadraticDiscriminant. Mathlib supplies the discriminant under the name discrim a b c = b^2 - 4ac, the characterisation quadratic_eq_zero_iff giving the root pair when a square root of the discriminant exists, the trichotomy discrim_lt_zero / discrim_eq_zero / discrim_pos for real-coefficient quadratics, and Vieta-style identities for the sum and product of roots. The human reviewer named in the frontmatter signs off on the coverage claim.

Advanced results [Master]

The quadratic formula is the simplest entry point to the structural theory of polynomial equations, and the generalisations follow in coordinated directions: higher degree, multiple variables, finite fields, and number-theoretic reciprocity.

Cubic and quartic formulas. The depression substitution transforms into the depressed cubic with and . Cardano's formula expresses the roots via nested radicals: setting with and reduces the cubic to a quadratic in with discriminant [Cardano — Ars Magna]. Ferrari's quartic formula, published in the same 1545 volume, depresses to via and then introduces an auxiliary parameter to write the depressed quartic as a difference of two squares, reducing to a resolvent cubic. Both formulas exhibit the same pattern as the quadratic formula: a substitution removes the second-highest-degree term, and the reduced equation is solved by an explicit radical expression in the coefficients.

Abel-Ruffini and the Galois obstruction. No analogous closed-form radical solution exists for the general polynomial of degree five or higher. Paolo Ruffini's 1799 Teoria generale delle equazioni gave an incomplete proof, completed by Niels Henrik Abel in 1824: there is no formula in radicals — finite expressions involving the coefficients, the field operations, and -th roots — that solves the general quintic [Lang — Algebra Ch. VI]. Évariste Galois's 1832 manuscript supplied the structural explanation. To each polynomial one associates its Galois group , the group of automorphisms of a splitting field fixing pointwise. A polynomial is solvable by radicals iff its Galois group is soluble — that is, admits a composition series with abelian quotients. The Galois groups of generic quadratics, cubics, and quartics are subgroups of (all soluble), while the generic quintic has Galois group , which contains the simple non-abelian subgroup and is not soluble. The quadratic case is the apex of solubility: is abelian, the discriminant generates the splitting field over the base field as , and the formula's single square root is the simplest possible radical.

Discriminant of a polynomial. For a polynomial of degree over a field, the discriminant is

The product over is symmetric in the roots, hence — by the fundamental theorem of symmetric functions — expressible as a polynomial in the coefficients of . For the quadratic this recovers . The discriminant vanishes iff has a repeated root, which over a perfect field is iff shares a common factor with its derivative . In algebraic number theory, the discriminant of the minimal polynomial of an algebraic number generates the discriminant ideal of the corresponding ring of integers and detects ramified primes; in algebraic geometry, the discriminant locus is the singular locus of the family of zero sets parametrised by the coefficients.

Quadratic forms and Sylvester's law of inertia. A quadratic form on is a homogeneous polynomial of degree two, equivalently for a symmetric matrix . The spectral theorem gives an orthogonal change of basis with and , the the eigenvalues of . In the new coordinates the form reads . The number of positive eigenvalues, the number of negative eigenvalues, and the number of zero eigenvalues are invariants of under arbitrary change of basis — not just orthogonal — by Sylvester's law of inertia (Sylvester 1852). The pair is the signature of the form, and the signature is a complete invariant: two quadratic forms over are equivalent (related by a basis change) iff they have the same signature. The one-variable case has signature for , for , and for — recovering the sign of the leading coefficient of a quadratic polynomial as the simplest signature invariant.

Conics and the binary discriminant. A conic section in the affine plane is the zero set of a degree-two polynomial . The conic discriminant is , computed from the homogeneous degree-two part alone. The sign of classifies the conic up to affine equivalence: gives an *ellipse* (the matrix of the quadratic part is sign-definite), a *parabola* (degenerate, the quadratic part factors as a square of a linear form), and a hyperbola (sign-indefinite quadratic part) [Apostol — Calculus Vol. 1 §I.4]. The classification reduces to the one-variable discriminant in this way: the homogeneous degree-two part viewed as a quadratic polynomial in with a parameter has discriminant , and the sign of determines whether the conic decomposes into two real lines through the origin (the asymptotic cone of the conic, hyperbolic case), one repeated real line (parabolic case), or no real lines (elliptic case).

Quadratic reciprocity. For distinct odd primes and , the Legendre symbol is if is a quadratic residue modulo (the equation has a solution), otherwise, and if . The law of quadratic reciprocity, proved by Gauss in his 1801 Disquisitiones Arithmeticae and called by him the aureum theorema (golden theorem), is the identity

[Gauss — Disquisitiones Arithmeticae]. Together with the supplementary laws for and , reciprocity reduces the question of whether the quadratic equation has a solution to a finite computation in the residues modulo small primes. Gauss gave eight different proofs in his lifetime; the result is the deepest theorem of elementary number theory and the foundational case of the broader class-field-theoretic reciprocity laws (Artin reciprocity, the Langlands program).

Algebraic closure. Over the complex numbers , every quadratic equation with has two solutions counted with multiplicity, since every element of has a square root (in fact distinct -th roots for any ). The fundamental theorem of algebra — first stated by d'Alembert in 1746, with the first essentially complete proof in Gauss's 1799 doctoral dissertation Demonstratio nova theorematis — extends this from quadratics to all polynomials: every non-constant has at least one root in , hence factors completely into linear factors. The closure of under taking quadratic roots — adjoining to form — turns out to be the closure under taking roots of every polynomial, a fact special to the real numbers among archimedean fields.

Synthesis. The bridge between the elementary quadratic formula and the broader theory of polynomial equations is the recognition that the discriminant is the load-bearing invariant. Once one has the discriminant, the trichotomy of solution counts, the conic classification, the binary-quadratic-form signature, the discriminant of an algebraic number field, and the splitting-field structure all read off as instances of the same algebraic shadow. The quadratic generalises in degree (cubic, quartic, quintic), in field (rational, real, complex, finite, -adic), in variable count (binary quadratic form, ternary quadratic form, -ary), and in arithmetic content (Legendre symbols, quadratic reciprocity, class-field-theoretic reciprocity). Completing the square generalises to the depression substitutions of Cardano and Ferrari, to the diagonalisation of quadratic forms by orthogonal change of basis, and to the normal-form reductions throughout linear algebra. Vieta's formulas generalise to the elementary symmetric functions of the roots of a degree- polynomial, the foundation of Newton's identities, Lagrange's resolvents, and Galois's symmetry-group construction.

This unit identifies the quadratic polynomial as the prototype higher-degree polynomial, the discriminant as the prototype algebraic invariant detecting repeated roots, completing the square as the prototype substitution that diagonalises a polynomial, the quadratic formula as the prototype radical expression of the roots in terms of the coefficients, and Vieta's identities as the prototype symmetric-function expression of the coefficients in terms of the roots. Each of these prototype roles motivates a downstream generalisation that runs through the algebra and geometry strands of the curriculum.

Full proof set [Master]

Proposition (real-discriminant trichotomy). Let with and let . Then the equation has two distinct real roots iff , a single repeated real root iff , and no real roots (two complex-conjugate roots) iff .

Proof. The quadratic formula gives over . When the square root is a positive real, so the two values are real and distinct. When the two values both equal , a single repeated real root. When the square root is with , so is a pair of complex-conjugate non-real numbers, and there are no real solutions.

Proposition (Vieta for the monic quadratic). Let be the two roots (counted with multiplicity) of over a field . Then and .

Proof. The monic quadratic factors as over an extension splitting the polynomial. Expanding the right-hand side: . Comparing coefficients of and gives and .

Proposition (discriminant of a polynomial via Vieta). For a monic polynomial over a field, the discriminant is symmetric in the roots, hence a polynomial expression in the coefficients of .

Proof sketch. Each permutation acts on the roots by . The expression is invariant under because squaring removes the sign ambiguity in versus . By the fundamental theorem of symmetric functions, every symmetric polynomial in is a polynomial in the elementary symmetric functions , which by Vieta's formulas equal the coefficients of in alternating sign. Hence is a polynomial in the coefficients. For explicit computation gives after restoring the leading coefficient.

Proposition (Sylvester's law of inertia, statement). Let be a quadratic form. There exist non-negative integers with and a basis of in which where . The pair is independent of the choice of basis: any two diagonal forms of have the same numbers of positive and negative coefficients.

Proof sketch. Existence of the diagonalisation: pick an orthonormal basis of eigenvectors of the matrix of (spectral theorem), then rescale to absorb the absolute values of the nonzero eigenvalues. Independence: suppose diagonalises as in one basis and in another. The subspace where the first diagonal form is non-negative has dimension (the span of the first basis vectors), and the subspace where the second is strictly negative has dimension (the span of the next-to-last basis vectors). By dimension counting, if these two subspaces share a nonzero vector on which is both and , a contradiction. Hence , and by symmetry , so and likewise . (Stated without all details; see Lang Algebra Ch. XV.)

Proposition (binary conic discriminant). Let be a degree-two polynomial in two variables over , with . The affine type of the conic is determined by the sign of the binary discriminant : ellipse if , parabola if , and hyperbola if .

Proof sketch. The principal minor of the symmetric matrix has determinant . By Sylvester's law of inertia, the binary quadratic form has signature or (definite) iff iff , signature or (semi-definite, rank ) iff iff , and signature (indefinite) iff iff . The three cases correspond to the affine types of conics with non-degenerate full matrix: ellipse, parabola, and hyperbola, respectively, by reducing to canonical form via an affine change of coordinates that diagonalises the quadratic part and absorbs the linear part. (Stated for non-degenerate conics; degenerate cases — point conic, line pair, double line — are detected by the full determinant of the homogeneous lifted form. See Audin Geometry Ch. VI.)

Connections [Master]

  • The discriminant proved here as the obstruction to having two distinct real roots is the simplest non-degenerate instance of the discriminant of a polynomial introduced in 00.01.03 and generalised in 01.01.07 (the determinant) and the algebra-strand discriminant of an algebraic number field. The conic discriminant in the Advanced results section is the binary-quadratic-form version, reappearing in the conic-section classification of 00.10.01 pending and the projective-conic classification of the algebraic-geometry strand. The discriminant detects repeated roots in every later algebra unit where the question arises, from the resolvent cubic of the quartic formula to the ramification of primes in algebraic number theory.

  • Completing the square — the substitution that removes the linear term — is the prototype of the depression substitutions used to derive the cubic and quartic formulas, and the prototype of the diagonalisation of quadratic forms by orthogonal change of basis introduced in 01.01.15 (bilinear and quadratic forms). Sylvester's law of inertia gives a complete invariant for real quadratic forms in variables, the signature , of which the case is the sign of the leading coefficient and the case is the conic discriminant. The substitution-and-reduce pattern recurs throughout the algebra and analysis strands: in the Lagrange resolvents that drive Galois theory, in the normal-form reductions of linear endomorphisms (Jordan form, rational canonical form), and in the eigenvalue diagonalisation used throughout the linear-algebra strand.

  • Vieta's formulas and are the prototype of the elementary-symmetric-function relations between the roots and coefficients of a polynomial, reappearing in 00.01.03 (polynomials) as the general identity expressing the coefficients as elementary symmetric functions of the roots, in Newton's identities and the theory of symmetric polynomials, and in the Galois-theoretic correspondence that organises [03.05.*] (Galois theory and field extensions). The symmetric-function framework is the algebraic shadow of the permutation-of-roots picture that underlies Galois's solubility criterion: a polynomial is solvable by radicals iff its Galois group is soluble.

  • The reduction of the quadratic equation over to the simple fact that every complex number has a square root is the simplest instance of the fundamental theorem of algebra (Gauss 1799), the statement that is algebraically closed. The fundamental theorem reappears in 00.01.03 (polynomials), is proved in [06.02.*] (complex analysis) using Liouville's theorem or the argument principle, and is the foundational result of complex algebraic geometry. The story that adjoining square roots to produces algebraic closure of is exceptional to the archimedean real field; over the -adic numbers no such low-degree closure exists.

Historical & philosophical context [Master]

The systematic solution of quadratic equations is among the oldest results in mathematics. Babylonian scribes, working in the period circa 2000-1600 BCE, solved specific quadratics of the form and using what amounts to completing the square in geometric form. Problem texts on cuneiform tablets (notably BM 13901 and YBC 6967) record procedures for finding two numbers given their sum and product — the special case of Vieta's identities — and for solving rectangle-area problems that reduce to single-variable quadratics [Lang — Basic Mathematics Ch. 3–4]. The Babylonian method does not state a general formula in symbols (algebraic notation predates Viète by three and a half millennia) but operates on numerical instances by a fixed recipe that corresponds exactly to the modern derivation.

Muhammad ibn Mūsā al-Khwārizmī (~780–850 CE), working at the House of Wisdom in Baghdad under the patronage of the Abbasid caliph al-Ma'mūn, wrote the Kitāb al-mukhtaṣar fī ḥisāb al-jabr wa-l-muqābala (The Compendious Book on Calculation by Completion and Balancing) around 825 CE [al-Khwārizmī — Kitāb al-jabr wa-l-muqābala]. The Arabic word al-jabr — meaning completion or restoration, the operation of adding the same quantity to both sides of an equation — is the origin of the English word algebra. Al-Khwārizmī classified quadratic equations into six canonical forms (working only with non-negative coefficients and avoiding subtraction) and gave a complete geometric demonstration of the completing-the-square procedure for each form, including a literal square-region diagram that motivates the name. His treatise was translated into Latin in the twelfth century by Robert of Chester and Gerard of Cremona, transmitting algebra to medieval Europe.

The first full algebraic treatment in the modern sense appeared in Gerolamo Cardano's 1545 Artis magnae sive de regulis algebraicis liber unus (The Great Art, or the Rules of Algebra), published in Nuremberg [Cardano — Ars Magna]. Cardano's Ars Magna gave systematic procedures for the cubic (drawing on the prior unpublished work of Scipione del Ferro and Niccolò Tartaglia) and the quartic (due to Cardano's student Lodovico Ferrari), placing the quadratic case as the simplest instance of a general theory. Cardano was also the first European to take negative roots seriously as legitimate solutions and to consider expressions involving square roots of negative numbers (in his analysis of the casus irreducibilis of the cubic) — a step toward the eventual recognition of complex numbers.

François Viète (1540–1603), in his 1591 In artem analyticen isagoge (Introduction to the Analytic Art), introduced the use of letters for both knowns and unknowns in algebraic equations, the symbolic-algebra innovation that enables the modern statement of the quadratic formula in coefficients [Viète — In artem analyticen isagoge]. Viète also stated the relations between the roots and coefficients of a polynomial that now bear his name. The systematic theory of the discriminant and the resolvent constructions for higher-degree polynomials developed through the eighteenth century in the work of Lagrange (Réflexions sur la résolution algébrique des équations, 1770–71), Vandermonde, and Ruffini, culminating in Niels Henrik Abel's 1824 proof of the impossibility of a general radical formula for the quintic and Évariste Galois's 1832 manuscript identifying the group-theoretic obstruction. Carl Friedrich Gauss, in his 1801 Disquisitiones Arithmeticae, proved the quadratic reciprocity law that he called the aureum theorema — establishing the modular arithmetic of quadratic residues as the foundational case of class-field-theoretic reciprocity [Gauss — Disquisitiones Arithmeticae]. Gauss's 1799 doctoral dissertation had two years earlier supplied the first essentially complete proof that is algebraically closed, completing the story that began with the quadratic case.

Bibliography [Master]

[object Promise]