Determine the coefficient of polynomial det(I + xA) Given matrix an n-by-n matrix $A$ and its $n$ eigenvalues.
How do I determine the coefficient of the term $x^2$ of the polynomial given by
$q(x) = \det(I_n + xA)$ 
 A: $$\det(I+ x A) = x^n \det (A + \frac 1 x I) = x^n\left(\lambda_1 + \frac 1 x\right)\left(\lambda_2 + \frac 1 x\right)\cdots \left(\lambda_n + \frac 1 x\right) $$
A: Translating result appeared on the wiki page of Characteristic polynomial,
$$\det(I_n + x A ) = \sum_{k=0}^n x^k \text{tr}(\wedge^k A)$$
where $\text{tr}(\wedge^k A)$ is the trace of the $k^{th}$ exterior power of $A$
which can be evaluated explicitly as the determinant of the $k \times k$ matrix,
$$\text{tr}(\wedge^k A) = \frac{1}{k!}
\left|\begin{matrix}
\text{tr}A & k-1 & 0 & \cdots\\
\text{tr}A^2 & \text{tr}A & k-2 & \cdots\\
\vdots & \vdots & & \ddots & \vdots\\
\text{tr}A^{k-1} & \text{tr}A^{k-2} & & \cdots & 1 \\
\text{tr}A^k & \text{tr}A^{k-1} & & \cdots & \text{tr}A
\end{matrix}\right|
$$
In the special case of $k = 2$, the coefficient of $x^2$ in $\det(I_n + x A)$ is equal to
$$\text{tr}(\wedge^2 A) 
= \frac{1}{2!}
\left|\begin{matrix}
\text{tr}A & 1\\
\text{tr}A^2 & \text{tr}A\\
\end{matrix}\right|
= \frac12 \left[(\text{tr}A)^2 - \text{tr}(A^2)\right]$$
In terms of the eigenvalues of $\lambda_1, \ldots, \lambda_n$ of $A$, this is equal
to
$$\frac12 \left( ( \sum_{i=1}^n \lambda_i )^2 - \sum_{i=1} \lambda_i^2 \right)
=\sum_{1\le i < j \le n} \lambda_i\lambda_j$$
Similarly, the coefficient of $x^k$ in $\det(I_n + xA)$ will have following general form:
$$\sum_{1\le i_1 < i_2 < \cdots < i_k \le n} \lambda_{i_1}\lambda_{i_2} \cdots \lambda_{i_k}$$
i.e sum of all possible combination of product of $k$ eigenvalues.
