Vieta's Formulas
Statement
For a monic polynomial of degree with roots (counted with multiplicity):
Vieta's formulas relate the coefficients to the elementary symmetric polynomials of the roots:
For a quadratic :
Visualization
Worked cubic:
Roots: , ,
Vieta checks:
Sum of roots: x₁ + x₂ + x₃ = 1 + 2 + 3 = 6 = -(-6) = 6 ✓
Sum of pairwise prods: x₁x₂ + x₁x₃ + x₂x₃
= 2 + 3 + 6 = 11 = 11 ✓
Product of roots: x₁ · x₂ · x₃ = 1·2·3 = 6 = -(-6) = 6 ✓
Coefficients: , , ,
| Vieta relation | LHS | RHS | Match |
|---|---|---|---|
| ✓ | |||
| ✓ | |||
| ✓ |
Newton's identity check (sum of squares from Vieta): ✓
Proof Sketch
Expand and collect terms by degree. When distributing factors, choosing from of them and from the rest produces:
- Coefficient of :
- Coefficient of :
- Constant term:
Matching with yields the formulas. The algebraic identity is the generating-function statement that where is the -th elementary symmetric polynomial.
Connections
- Quadratic FormulaQuadratic FormulaSolve any quadratic equation using the discriminantRead more → — Vieta for degree 2; links discriminant to root differences
- Binomial TheoremBinomial TheoremExpanding powers of a sum via binomial coefficientsRead more → — is a degenerate Vieta case where all roots coincide
- AM–GM InequalityAM–GM InequalityThe arithmetic mean is always at least as large as the geometric meanRead more → — AM–GM on the roots gives inequalities between the
- Cauchy–Schwarz — in the Gram matrix of roots, Cauchy–Schwarz bounds cross-terms of the
- Geometric SeriesGeometric SeriesPartial sums and convergence of the geometric progressionRead more → — roots of (roots of unity) satisfy ,
Lean4 Proof
Mathlib's Polynomial.SmallDegreeVieta (v4.28.0) provides Vieta's formulas for quadratics
explicitly. We use eq_neg_mul_add_of_roots_quadratic_eq_pair (sum of roots) and
eq_mul_mul_of_roots_quadratic_eq_pair (product of roots).
Lean4 Proof
import Mathlib.RingTheory.Polynomial.SmallDegreeVieta
open Polynomial
/-- Vieta's sum formula for a quadratic ax²+bx+c with roots x₁, x₂:
b = -a·(x₁+x₂), i.e., x₁+x₂ = -b/a. -/
theorem vieta_sum [CommRing R] [IsDomain R] {a b c x₁ x₂ : R}
(hroots : (C a * X ^ 2 + C b * X + C c).roots = {x₁, x₂}) :
b = -a * (x₁ + x₂) :=
eq_neg_mul_add_of_roots_quadratic_eq_pair hroots
/-- Vieta's product formula for a quadratic ax²+bx+c with roots x₁, x₂:
c = a·x₁·x₂, i.e., x₁·x₂ = c/a. -/
theorem vieta_product [CommRing R] [IsDomain R] {a b c x₁ x₂ : R}
(hroots : (C a * X ^ 2 + C b * X + C c).roots = {x₁, x₂}) :
c = a * x₁ * x₂ :=
eq_mul_mul_of_roots_quadratic_eq_pair hroots
/-- Combined Vieta iff: roots are {x₁,x₂} iff Vieta relations hold (and a ≠ 0). -/
theorem vieta_quadratic_iff [CommRing R] [IsDomain R] {a b c x₁ x₂ : R} (ha : a ≠ 0) :
(C a * X ^ 2 + C b * X + C c).roots = {x₁, x₂} ↔
b = -a * (x₁ + x₂) ∧ c = a * x₁ * x₂ :=
roots_quadratic_eq_pair_iff_of_ne_zero ha
/-- Concrete instance: x²-5x+6 has roots {2,3} and Vieta checks hold. -/
theorem vieta_example :
(X ^ 2 - C 5 * X + C 6 : ℤ[X]).roots = {2, 3} ↔
(-5 : ℤ) = -(1 * (2 + 3)) ∧ (6 : ℤ) = 1 * 2 * 3 := by
constructor
· intro h; exact ⟨by norm_num, by norm_num⟩
· intro ⟨_, _⟩
simp [roots_quadratic_eq_pair_iff_of_ne_zero (by norm_num : (1:ℤ) ≠ 0)]
constructor <;> norm_numReferenced by
- Newton's IdentitiesLinear Algebra
- Lagrange InterpolationLinear Algebra