Key idea of this section
char K ≠ 2: ax² + bx + c = 0 ⟺ (2ax + b)² = b² − 4ac roots exist in K ⟺ the discriminant b² − 4ac is a square in K
The quadratic formula is not a fact about real numbers; it is an identity valid in every field in which 2 is invertible. Seeing it this way explains where the formula breaks and what replaces it.
Completing the square
Let K be a field with char K ≠ 2 and a ≠ 0. Multiplying ax² + bx + c = 0 by 4a (an invertible operation) gives 4a²x² + 4abx + 4ac = 0, that is
(2ax + b)² = b² − 4ac = Δ
So the equation has a root in K if and only if Δ is a square in K, and then the roots are x = (−b ± δ)/(2a), where δ² = Δ. If Δ = 0 there is a double root −b/(2a); if Δ is a nonzero square there are two distinct roots; otherwise the polynomial is irreducible over K and its roots lie in the quadratic extension K(√Δ) = K[t]/(t² − Δ). Every quadratic extension of K arises this way: if [L : K] = 2 and α ∈ L∖K, then α satisfies a quadratic over K, and completing the square shows L = K(√Δ) for some non-square Δ ∈ K.
Vieta's relations for the quadratic state that the roots α, β satisfy α + β = −b/a and αβ = c/a, and the discriminant is
Δ = a²(α − β)²
This form generalizes to every degree (Lesson 8): the discriminant is, up to a power of the leading coefficient, the product of the squared differences of the roots.
Quadratics over finite fields
Over 𝔽ₚ with p odd, the nonzero squares form the subgroup of index 2 in the cyclic group 𝔽ₚˣ, so exactly (p − 1)/2 nonzero elements are squares. Euler's criterion decides squareness: for a ≢ 0, a is a square modulo p if and only if a(p−1)/2 ≡ 1 (mod p). (If g is a generator, gᵏ is a square exactly when k is even, and (gᵏ)(p−1)/2 = (−1)ᵏ.) Quadratic reciprocity then makes the computation efficient for large p.
Worked example. Over 𝔽₅ solve x² + x + 3 = 0. The discriminant is 1 − 12 = −11 ≡ 4 = 2², so the roots are (−1 ± 2)/2. Since 2⁻¹ = 3 in 𝔽₅, these are 1 · 3 = 3 and (−3) · 3 = −9 ≡ 1. Check: 3² + 3 + 3 = 15 ≡ 0 and 1 + 1 + 3 = 5 ≡ 0. Vieta: 3 + 1 = 4 ≡ −1 and 3 · 1 = 3, as required.
Worked example. Over 𝔽₇, x² + 3x + 4 has Δ = 9 − 16 = −7 ≡ 0, so it has the double root −3/2 = −3 · 4 = −12 ≡ 2. Indeed (x − 2)² = x² − 4x + 4 ≡ x² + 3x + 4 mod 7, since −4 ≡ 3.
Characteristic 2
When char K = 2, the derivative of x² + bx + c is b, and the substitution trick collapses because 2a = 0. If b = 0 the equation is x² = c, which has the root √c, a double root, whenever c is a square; over a finite field of characteristic 2 every element is a square, because the Frobenius map x ↦ x² is injective and hence bijective. If b ≠ 0, substitute x = by to obtain the Artin–Schreier form
y² + y = d, d = c/b²
The map y ↦ y² + y is additive in characteristic 2, with kernel {0, 1}. Over 𝔽 with 2ᵏ elements its image is the kernel of the absolute trace Tr(d) = d + d² + d⁴ + ⋯ + d2k−1, so y² + y = d is solvable if and only if Tr(d) = 0. Over 𝔽₂ itself the trace is the identity, so y² + y + 1 has no root: it is the unique irreducible quadratic over 𝔽₂, and 𝔽₄ = 𝔽₂[y]/(y² + y + 1).
Counting irreducible quadratics
Over 𝔽q there are q² monic quadratics, and the reducible ones are (x − α)(x − β) with {α, β} a multiset of size 2 from 𝔽q, giving q(q + 1)/2 of them. Hence the number of monic irreducible quadratics is q² − q(q + 1)/2 = (q² − q)/2. For q = 2 this is 1, for q = 3 it is 3 (namely x² + 1, x² + x + 2, x² + 2x + 2), for q = 5 it is 10. Gauss's general formula, proved via the factorization of xqⁿ − x as the product of all monic irreducibles of degree dividing n, gives (1/n) ∑d | n μ(d) qn/d monic irreducibles of degree n.
Quadratic forms and geometry
Solving ax² + bxy + cy² = 0 projectively is the same problem, and over ℚ the deeper question of solving ax² + by² = cz² in integers is answered by Legendre's theorem and, more generally, by the Hasse–Minkowski local-global principle: a quadratic form over ℚ represents 0 nontrivially if and only if it does so over ℝ and over every p-adic field ℚₚ. No such principle holds for cubic equations (Selmer's example 3x³ + 4y³ + 5z³ = 0 has nontrivial solutions everywhere locally but none in ℚ), which is one sign of how much harder degree three is.
Exercise
- (a)Does x² + 4x + 1 have a root in 𝔽₇?
- (b)Solve y² + y = 1 over 𝔽₄ = {0, 1, ω, ω²}, where ω² = ω + 1.
Show solution
Answers: (a) Δ = 16 − 4 = 12 ≡ 5 (mod 7). The nonzero squares modulo 7 are 1, 4, 2, so 5 is not a square (equivalently 5³ = 125 ≡ 6 ≡ −1). There is no root; the polynomial is irreducible over 𝔽₇. (b) Over 𝔽₄ the trace of 1 is 1 + 1 = 0, so solutions exist. Try y = ω: ω² + ω = (ω + 1) + ω = 1. The other solution is ω + 1 = ω². Thus y ∈ {ω, ω²}, the two roots of y² + y + 1.