Vieta's Formulas Calculator
Apply Vieta's formulas to quadratic and cubic polynomials.
Get the sum of roots, product of roots, and elementary symmetric polynomials from coefficients.
Why Vieta’s formulas matter
For any polynomial, the coefficients and the roots are not independent. Once the roots are fixed, the coefficients are determined; once the coefficients are fixed, certain symmetric combinations of the roots (sum, product, sum of pairs) are determined. Vieta’s formulas, published by François Viète in 1579, give the exact relationships. They let you read these symmetric functions of the roots directly from the coefficients, without ever solving the polynomial.
This is more useful than it sounds. In competition math, “find the sum of the squares of the roots” is solved in one line using Vieta plus the identity r1² + r2² = (r1+r2)² − 2 r1 r2. In algebra class, you can sanity-check a quadratic factorization in five seconds. In control theory and signal processing, characteristic polynomials of state matrices encode stability information that Vieta makes accessible without numerical solving.
Quadratic case
For a x² + b x + c = 0 with leading coefficient a not zero, the two roots r1 and r2 satisfy:
r1 + r2 = −b / a r1 × r2 = c / a
The proof is one line: the factored form a (x − r1)(x − r2) expands to a x² − a (r1 + r2) x + a r1 r2, which must equal a x² + b x + c term by term. So a (r1 + r2) = −b and a r1 r2 = c. Vieta’s formulas are not deep — they are just polynomial multiplication run backwards.
Cubic case
For a x³ + b x² + c x + d = 0 with three roots r1, r2, r3:
r1 + r2 + r3 = −b / a (sum of roots) r1 r2 + r1 r3 + r2 r3 = c / a (sum of pairwise products) r1 r2 r3 = −d / a (product of all roots)
The three expressions on the left are the first three elementary symmetric polynomials in the roots. The signs alternate (−, +, −) because of the alternating signs in expanding (x − r1)(x − r2)(x − r3).
General degree-n polynomial
For a polynomial of degree n with leading coefficient a_n and constant term a_0:
e_1 = sum of all roots = −a_(n−1) / a_n e_2 = sum of all products of pairs = a_(n−2) / a_n e_3 = sum of all products of triples = −a_(n−3) / a_n e_n = product of all roots = (−1)^n × a_0 / a_n
The signs alternate. Note that this works even when some roots are complex; the symmetric polynomials are still real numbers when the coefficients are real, because complex conjugate roots pair up and their imaginary parts cancel.
Why this works for complex roots too
The fundamental theorem of algebra guarantees that a degree-n polynomial with complex coefficients has exactly n roots (counting multiplicity) in the complex numbers. Vieta’s formulas hold over the complex numbers without modification. For real polynomials, complex roots come in conjugate pairs (z and z-bar), which means their sum 2 Re(z) is real and their product |z|² is real. So even when individual roots are complex, the symmetric polynomials remain real and can be read off the coefficients.
Worked quadratic example
Take 2x² − 5x + 3 = 0. By Vieta:
- Sum of roots: −(−5) / 2 = 2.5
- Product of roots: 3 / 2 = 1.5
You can verify by solving: x = (5 ± √(25 − 24)) / 4 = (5 ± 1) / 4 → roots are 1.5 and 1. Sum is 2.5 ✓. Product is 1.5 ✓.
Worked cubic example
Take x³ − 6x² + 11x − 6 = 0 (which factors as (x − 1)(x − 2)(x − 3)). The roots are 1, 2, 3. By Vieta:
- Sum: −(−6) / 1 = 6 ✓ (1 + 2 + 3 = 6)
- Sum of pairs: 11 / 1 = 11 ✓ (1·2 + 1·3 + 2·3 = 2 + 3 + 6 = 11)
- Product: −(−6) / 1 = 6 ✓ (1 · 2 · 3 = 6)
Practical uses beyond competition math
In control theory, the characteristic polynomial of a state-space matrix has roots equal to the eigenvalues. The sum of eigenvalues equals the trace of the matrix, and the product of eigenvalues equals the determinant. These are direct consequences of Vieta applied to the characteristic polynomial, and they are how Routh-Hurwitz stability analysis works without ever computing eigenvalues numerically.
In number theory, if a monic polynomial with integer coefficients has rational roots, Vieta forces those roots to be integer divisors of the constant term. This gives the rational root theorem essentially for free.
In symbolic algebra and computer algebra systems, Vieta’s formulas are the bridge between two equivalent ways of describing a polynomial (coefficients vs. root set), and computer algebra systems use them constantly to convert between forms efficiently.
Limitations
Vieta gives you symmetric functions of the roots, not the roots themselves. If you want individual roots, you still have to factor, use the quadratic formula, apply Cardano for cubics, or fall back on numerical methods for higher degrees. But often the symmetric functions are exactly what the problem asks for, and computing them via Vieta is dramatically faster than solving and then combining.