I want to find the coefficients $h$ of an $n^{th}$ order polynomial with given roots $a$. The $n^{th}$ order polynomial is given by the geometric series and summation:

$$ \prod_{k=0}^{n-1} x+a_k = \sum_{k=0}^{n-1} h_kx^k $$

Where all values of $a$ are known.

What I ultimately need to know how to express the $k^{th}$ coefficient $h_k$ as a function of the roots $a_0,a_1,...$. For example, I have found the following by expanding the product by hand and looking for patterns by inspection:

$$ h_{n-1} = 1 $$

$$ h_{n-2} = \sum_{k=0}^{n-1}a_k $$

$$ h_{n-3} = \sum_{k=1}^{n-1}a_k\sum_{j=0}^{k-1}a_j $$

$$ h_{0} = \prod_{k=0}^{n-1}a_k $$

However, I struggle to find the general form for $h_k$

  • $\begingroup$ You have the general idea already. $h_{n-4}$ is a triple sum similar to the double sum for $h_{n-3}$, etc. $\endgroup$ Commented Apr 22, 2020 at 23:46
  • $\begingroup$ If the roots are $a_0, \dots, a_{n-1}$ you're interested in the polynomial $\prod_{k=0}^{n-1} (x - a_k)$. $\endgroup$ Commented Apr 22, 2020 at 23:46
  • $\begingroup$ Yeah, but for simplicity I left the product with $+$ $\endgroup$ Commented Apr 22, 2020 at 23:48

2 Answers 2


If I understand correctly, I believe you're looking for what the Vieta's formulas gives. Note your $4$ results for $h_0$, $h_{n-1}$, $h_{n-2}$ and $h_{n-3}$ are shown there.

In particular, it states that for the $n$'th degree polynomial

$$P(x)=a_{n}x^{n}+a_{n-1}x^{n-1}+\cdots +a_{1}x+a_{0} \tag{1}\label{eq1A}$$

with $a_n \neq 0$ and the $r_i$ for $1 \le i \le n$ roots being real or complex numbers, you have the general expression of

$$\sum _{1\leq i_{1}<i_{2}<\cdots <i_{k}\leq n}\left(\prod_{j=1}^{k}r_{i_{j}}\right)=(-1)^{k}{\frac {a_{n-k}}{a_{n}}} \tag{2}\label{eq2A}$$

for $k = 1, 2, \ldots, n$, and with the indices $i_k$ being sorted in increasing order to ensure each product of $k$ roots is used exactly once.

In your case, the $r_i$ are your $-a_i$ and its $a_i$ are your $h_i$, with their $a_n = 1$ in your particular case. Using your symbols, \eqref{eq2A} becomes

$$\begin{equation}\begin{aligned} & \sum _{1\leq i_{1}<i_{2}<\cdots < i_{k}\leq n}\left(\prod_{j=1}^{k}(-a_{i_{j}})\right) = (-1)^{k}h_{n-k} \\ &h_{n-k} = \sum _{1\leq i_{1}<i_{2}<\cdots < i_{k}\leq n}\left(\prod_{j=1}^{k}a_{i_{j}}\right) \end{aligned}\end{equation}\tag{3}\label{eq3A}$$


Let $a_1, \dots, a_n$ be the roots. We want to compute the coefficients $h_0, \dots, h_n$ of the polynomial $P := \prod_{k=0}^{n-1} (x - a_k)$.

Fix $0\leqslant k \leqslant n$. Let $P_k :=\mathcal{P}_k(\{1,\dots, n\})$ be the set of all subsets of $\{1,\dots, n\}$ of size $k$. One gets :

$$h_k = \sum_{I \in P_{n-k}} (-1)^{n -k} \prod_{i \in I} a_i$$

  • $\begingroup$ Thank-you, your answer has easy to digest notation! I think you might have made some indexing mismatches in your answer. In my question I have all subscripts go from $0$ to $n-1$. $\endgroup$ Commented Apr 23, 2020 at 0:13
  • $\begingroup$ @Condensation it barely changes anything and I was too lazy to have $n - 1$ in subscripts. ;) Oh and don't forget tu upvote/accept the answer if it suits you. ;) $\endgroup$ Commented Apr 23, 2020 at 0:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .