Links forward

Sums and products of roots

Suppose we have a monic cubic polynomial \(f(x)\) with roots 2, 5, 7:

\[ f(x) = (x-2)(x-5)(x-7). \]

If we expand out these brackets, we see something interesting:

\[ f(x) = x^3 - (2+5+7) x^2 + (2 \cdot 5 + 2 \cdot 7 + 5 \cdot 7) x - 2 \cdot 5 \cdot 7. \]

Each coefficient is written in terms of the roots. In particular, the coefficient of \(x^2\) is the (negative) sum of the roots, and the constant term is the (negative) product of the roots.

More generally, suppose we have a cubic polynomial \(f(x) = a_3 x^3 + a_2 x^2 + a_1 x + a_0\) with roots \(\alpha, \beta, \gamma\). Then

\[ f(x) = c (x-\alpha) (x-\beta) (x-\gamma) \]

for some real number constant \(c\). Expanding this out gives

\[ f(x) = c \big[ x^3 - (\alpha + \beta + \gamma) x^2 + (\alpha \beta + \beta \gamma + \gamma \alpha) x - \alpha \beta \gamma \big]. \]

Comparing the two expressions for \(f(x)\), we obtain

\[ a_3 = c, \qquad a_2 = -c(\alpha + \beta + \gamma), \qquad a_1 = c(\alpha \beta + \beta \gamma + \gamma \alpha), \qquad a_0 = - c \alpha \beta \gamma. \]

From these equalities we obtain the following theorem, relating the sums and products of the roots to the coefficients of \(f(x)\).

Theorem (Vieta's formulas for cubics)

Let \(f(x) = a_3 x^3 + a_2 x^2 + a_1 x + a_0\) be a cubic polynomial with roots \(\alpha, \beta, \gamma\). Then

\[ \alpha + \beta + \gamma = - \frac{a_2}{a_3}, \qquad \alpha \beta + \beta \gamma + \gamma \alpha = \frac{a_1}{a_3}, \qquad \alpha \beta \gamma = - \frac{a_0}{a_3}. \]
Technical notes.
  1. The roots of \(f(x)\) referred to in this theorem are all the complex number roots of \(f(x)\). If we restrict attention to real roots, the result is not true.
  2. In the theorem we must take all the roots of \(f(x)\) with multiplicities.

Example

Let \(f(x) = 2x^3 + 3x^2 - 4x + 7\).

  1. What is the sum of the roots of \(f(x)\)?
  2. What is the product of the roots of \(f(x)\)?

Solution

By Vieta's formulas, the sum of the roots is \(-\frac{3}{2}\) and the product of the roots is \(-\frac{7}{2}\).

(We can also deduce that, if the three roots of \(f(x)\) are \(\alpha, \beta, \gamma\), then \(\alpha \beta + \beta \gamma + \gamma \alpha = -2\).)

Vieta's formulas apply not just to cubics but to polynomials of any degree. For instance, consider the quartic polynomial

\[ f(x) = 2(x-1)(x-3)(x-6)(x-7). \]

Expanding out this expression gives

\begin{align*} f(x) = 2 \Big( x^4 &- \big(1+3+6+7\big) x^3 + \big(1 \cdot 3 + 1 \cdot 6 + 1 \cdot 7 + 3 \cdot 6 + 3 \cdot 7 + 6 \cdot 7 \big) x^2 \\ &- \big(1 \cdot 3 \cdot 6 + 1 \cdot 3 \cdot 7 + 1 \cdot 6 \cdot 7 + 3 \cdot 6 \cdot 7\big) x + 1 \cdot 3 \cdot 6 \cdot 7 \Big). \end{align*}

The coefficient of \(x^3\) is \(-2(1+3+6+7)\), which is two (the leading coefficient) times the (negative) sum of the roots. And the constant term is two times the product of the roots. So again the coefficients of \(f(x)\) can be described in terms of the sums and products of the roots.

For a general polynomial we have the following theorem. The proof is left to you.

Theorem (Vieta's formulas)

Let \(f(x) = a_n x^n + a_{n-1} x^{n-1} + \dots + a_1 x + a_0\). Then

  1. the sum of the roots of \(f(x)\), counted with multiplicities, is \(-\dfrac{a_{n-1}}{a_n}\), and
  2. the product of the roots, again counted with multiplicities, is \((-1)^n \dfrac{a_0}{a_n}\).

Next page - Links forward - Solving cubics