Relation Between Roots and Coefficients
Theorem
Let a polynomial of degree $n$ over a field $F$ be written as below. The coefficients $a_{0}, \dots, a_{n}$ are elements of $F$, and $a_{n} \ne 0$.
$$ f(x) = a_{n}x^{n} + a_{n-1}x^{n-1} + \cdots + a_{1}x + a_{0} \in F[x], \qquad a_{n} \ne 0 $$
Suppose that $f(x)$ factors over an extension field $E$ of $F$ into a product of linear factors (counting multiplicity) as follows.
$$ f(x) = a_{n} (x - r_{1})(x - r_{2}) \cdots (x - r_{n}), \qquad r_{1}, \dots, r_{n} \in E $$
Then the following holds for the $k$th elementary symmetric polynomial $e_{k}$, and this is called the relation between roots and coefficients or Vieta formulas.
$$ e_{k}(r_{1}, \dots, r_{n}) = (-1)^{k} \frac{a_{n-k}}{a_{n}}, \qquad k = 1, \dots, n \tag{1} $$
Explanation
The elementary symmetric polynomial $e_{k}(r_{1}, \dots, r_{n})$ is the sum of the products obtained by choosing $k$ of $r_{1}, \dots, r_{n}$ and multiplying them. For example, if $n = 3$,
$$ \begin{align*} (k = 1) \quad e_{1}(r_{1}, r_{2}, r_{3}) &= r_{1} + r_{2} + r_{3} \\ (k = 2) \quad e_{2}(r_{1}, r_{2}, r_{3}) &= r_{1}r_{2} + r_{1}r_{3} + r_{2}r_{3} \\ (k = 3) \quad e_{3}(r_{1}, r_{2}, r_{3}) &= r_{1}r_{2}r_{3} \end{align*} $$
That is, when $k = 1$ it is the sum of all of them, and when $k = n$ it is the product of all of them.
$$ r_{1} + r_{2} + \cdots + r_{n} = -\frac{a_{n-1}}{a_{n}}, \qquad r_{1} r_{2} \cdots r_{n} = (-1)^{n} \frac{a_{0}}{a_{n}} $$
Proof
Strategy: We show that when $\prod_{i=1}^{n}(x - r_{i})$ is expanded, the coefficient of $x^{n-k}$ is $(-1)^{k}e_{k}$, and then compare it with the coefficients of $f$.
Multiplying out the $n$ factors $(x - r_{1}), \dots, (x - r_{n})$ means adding up all the products obtained by choosing either $x$ or $-r_{i}$ from each factor. To obtain $x^{n-k}$, one must choose $-r_{i}$ from $k$ of the factors and $x$ from the remaining $n-k$ factors. If the indices of the factors from which $-r_{i}$ was chosen are $i_{1}, \dots, i_{k}$, that term is as follows.
$$ (-r_{i_{1}}) \cdots (-r_{i_{k}}) \cdot x^{n-k} = (-1)^{k} r_{i_{1}} \cdots r_{i_{k}} x^{n-k} $$
Summing these terms over all possible choices, the coefficient of $x^{n-k}$ is the sum of the products of $k$ elements chosen from $r_{1}, \dots, r_{n}$, multiplied by $(-1)^{k}$, that is, $(-1)^{k}e_{k}(r_{1}, \dots, r_{n})$. Therefore the following holds, where $e_{0} = 1$.
$$ \prod_{i=1}^{n}(x - r_{i}) = \sum_{k=0}^{n} (-1)^{k} e_{k}(r_{1}, \dots, r_{n}) x^{n-k} \tag{2} $$
$f(x)$ can be expressed as the left-hand side and the right-hand side below.
$$ \sum_{j=0}^{n} a_{j} x^{j} = f(x) = a_{n} \prod_{i=1}^{n}(x - r_{i}) = \sum_{k=0}^{n} (-1)^{k} a_{n} e_{k}(r_{1}, \dots, r_{n}) x^{n-k} $$
Since the polynomials on both sides are equal, their coefficients agree degree by degree. Comparing the coefficients of $x^{n-k}$ gives the following.
$$ a_{n-k} = (-1)^{k} a_{n} e_{k}(r_{1}, \dots, r_{n}) $$
Since $a_{n} \ne 0$, dividing both sides by $a_{n}$ yields $(1)$.
■
Corollary
(a) Relation between roots and coefficients of a quadratic equation: When $a \ne 0$, the following holds for the two roots $r_{1}$, $r_{2}$ of $ax^{2} + bx + c = 0$.
$$ r_{1} + r_{2} = -\frac{b}{a}, \qquad r_{1}r_{2} = \frac{c}{a} $$
(b) Relation between roots and coefficients of a cubic equation: When $a \ne 0$, the following holds for the three roots $r_{1}$, $r_{2}$, $r_{3}$ of $ax^{3} + bx^{2} + cx + d = 0$.
$$ r_{1} + r_{2} + r_{3} = -\frac{b}{a}, \qquad r_{1}r_{2} + r_{2}r_{3} + r_{3}r_{1} = \frac{c}{a}, \qquad r_{1}r_{2}r_{3} = -\frac{d}{a} $$
