I've seen the formula written as the following:
$$ Characteristic Polynomial = −λ^3+ tr(A)λ^2+(tr(A)^2−tr(A^2))λ+det(A)$$
Although sometimes I've seen $tr(A)^2$ written as $tr^2(A)$. What does that mean and how do I compute it?
For the given matrix $\begin{bmatrix}-1 & 2 & 2\\2 & 2 & -1\\2&-1&2\end{bmatrix}$
Its characteristic polynomial is $-\lambda^3 +3\lambda^2+9\lambda-27$
If the $tr(A^2) = 27$ then what is the $tr(A)^2$ in order to get $9\lambda$? Or have I made a mistake with the first part?
The characteristic equation for the matrix $\textbf{A}$ is defined as
$$\lambda^3-\lambda^2\text{tr}(\textbf{A})+\dfrac{1}{2}\lambda\big[ \text{tr}^2(\textbf{A}) - \text{tr}(\textbf{A}^2) \big] - \text{det}\textbf{A} = 0$$
For the given matrix, $\text{tr}(\textbf{A})=3$ and $\text{tr}(\textbf{A}^2)=27$ therefore $\frac{1}{2}\big[ \text{tr}^2(\textbf{A}) - \text{tr}(\textbf{A}^2) \big] = -9$. We know $\text{det}\textbf{A}=-27$ and finally he characterestic equation is
$$\lambda^3-3\lambda^2-9\lambda+27 = 0$$