Definition of the characteristic polynomial My textbook defines the characteristic polynomial of an $n \times n$-matrix $A$ as:
$$p_A = \text{det}(A-XI_n) = \sum_{\sigma \in S_n} \text{sign } \sigma. (a_{1\sigma(1)}-X\delta_{1\sigma(1)})...(a_{n\sigma(n)}-X\delta_{n\sigma(n)})$$
(where $S_n$ is the symmetric group). Then it just states that by reordering according to the powers of $X$, we get the form
$$p_A = a_0+a_1X+...+a_{n-1}X^{n-1}+a_nX^n$$
with coefficients $a_i$ from a field, where $a_0=\text{det } A$, $a_{n-1}=(-1)^{n-1}. \text{tr}(A)$ and $a_n=(-1)^n$.
Could someone clarify how to derive this formula from the definition?
 A: Those equations are the consequence of developing the product on the RHS of the equation $$p_A = \text{det}(A-XI_n) = \sum_{\sigma \in S_n} \text{sign } \sigma. (a_{1\sigma(1)}-X\delta_{1\sigma(1)})...(a_{n\sigma(n)}-X\delta_{n\sigma(n)})$$
1. $a_0=\text{det } A$
in the product $$(a_{1\sigma(1)}-X\delta_{1\sigma(1)})...(a_{n\sigma(n)}-X\delta_{n\sigma(n)})$$ the only term without an $X$ factor is $$a_{1\sigma(1)}...a_{n\sigma(n)}.$$ Hence the only term without $X$ in factor in 
$$p_A = \text{det}(A-XI_n) = \sum_{\sigma \in S_n} \text{sign } \sigma. (a_{1\sigma(1)}-X\delta_{1\sigma(1)})...(a_{n\sigma(n)}-X\delta_{n\sigma(n)})$$ is $$\sum_{\sigma \in S_n} \text{sign } \sigma. a_{1\sigma(1)}...a_{n\sigma(n)} = \det A.$$
2. $a_{n-1}=(-1)^{n-1}. \text{tr}(A)$
Developing the product $$(a_{1\sigma(1)}-X\delta_{1\sigma(1)})...(a_{n\sigma(n)}-X\delta_{n\sigma(n)})$$ the term with power $X^{n-1}$ is
$$\sum_{i=1}^n a_{i\sigma(i)} (-1)^{n-1}[\delta_{1 \sigma(1)} \dots \delta_{n \sigma(n)}]_i$$ where $[\delta_{1 \sigma(1)} \dots \delta_{n \sigma(n)}]_i$ is the product of the $\delta_{j \sigma(j)}$ for $1 \le j \le n$ with the term $\delta_{i \sigma(i)}$ missing. But $[\delta_{1 \sigma(1)} \dots \delta_{n \sigma(n)}]_i$ is not vanishing if and only if $\sigma$ is the identity. Hence
$$\sum_{\sigma \in S_n} \text{sign } \sigma. \sum_{i=1}^n a_{i\sigma(i)} (-1)^{n-1}[\delta_{1 \sigma(1)} \dots \delta_{n \sigma(n)}]_i = (-1)^{n-1} \sum_{i=1}^n a_{ii}=(-1)^{n-1} \text{tr} A$$
3.$a_n=(-1)^n$
Here, developing the product $$(a_{1\sigma(1)}-X\delta_{1\sigma(1)})...(a_{n\sigma(n)}-X\delta_{n\sigma(n)}),$$ the only term with $X^n$ in factor is $(-1)^n  \delta_{1 \sigma(1)} \dots \delta_{n \sigma(n)}$ which is not vanishing only if $\sigma$ is the identity. And in that case, you get in the sum $(-1)^n X^n$ as the unique term with $x^n$ in factor.
A: The term $a_0$ has no factor of $X$. So, look at each summand $(a_{1\sigma(1)} - X \delta_{a\sigma(a)}) \cdots (a_{n\sigma(n)}-X \delta_{n\sigma(n)})$, in each factor of that product choose the first term $a_{i\sigma(i)}$ of that factor and ignore the other term $X\delta_{i\sigma(i)}$. You get $a_{1\sigma(1)}\cdots a_{n\sigma(n)}$. Sum those up with appropriate sign and you get the determinant. 
The term $a_{n-1} X^{n-1}$ has $n-1$ factors $X$. So, look at each summand $(a_{1\sigma(1)} - X \delta_{a\sigma(a)}) \cdots (a_{n\sigma(n)}-X \delta_{n\sigma(n)})$, choose $n-1$ factors of that product, in each of those chosen factors pick the $X \delta_{i\sigma(i)}$ term of that factor, and in each chosen factor make sure that $i=\sigma(i)$ or else you won't get the factor of $X$ that you want. It follows that $\sigma$ must be the identity in order to get something nonzero. So (up to sign) the term $a_{n-1} X^{n-1}$ is equivalent to $a_{11} X^{n-1} + a_{22} X^{n-1} + \cdots + a_{nn} X^{n-1} = \text{tr}(A) X^{n-1}$. The sign must be $(-1)^{n-1}$ because the $n-1$ chosen factors $X \delta_{i\sigma(i)}$ each come with a minus sign in front.
If you follow those, I'll leave you to follow $a_n = (-1)^n$.
