What is the best strategy to find the characteristic polynomial of a 3x3 matrix?
For example I got this matrix:
$A=\begin{bmatrix}6 & -2 & -1 \\ -2 & 6 & -1 \\ -1 & -1 & 5 \end{bmatrix}$
and I know the characteristic equation of this matrix should be: $ -\lambda^3 + 17\lambda^2 -90\lambda + 144 $ and that I can get it from solving $(6-\lambda)(6-\lambda)(5-\lambda)+something$ however the formula without $something$ solves to $-\lambda^3 + 17 \lambda^2 - 96\lambda + 180$. What should this $something$ be?
Alternatively, this website says this formula exists:
$−λ^3+tr(A)λ^2+(tr(A)^2−tr(A^2))λ+det(A)$
however, I find:
$A^2=\begin{bmatrix}41 & -23 &-9 \\ -23 & 41 & -9 \\ -9 & -9 & 27 \end{bmatrix}$
and thus $tr(A)^2−tr(A^2)=17^2-109=180$ which results in the equation $−λ^3+17λ^2+180λ+144$ which is not correct. Did I do something wrong here? Because if this formula does work it is very usefull
You got the matrix $A$, and you know that its characteristic polynomial should be $ -\lambda^3 + 17\lambda^2 -90\lambda + 144 ,$ but when you apply the formula listed at that web site, you get $−λ^3+17λ^2+\color{red}{180}λ+144$, which is not correct. You wrote:
You did not do anything wrong, but the formula listed on that web site left out a factor of $\frac12$, which should multiply the coefficient $tr(A)^2-tr(A^2)$ of $\lambda$. Of note, that web site seems to calculate the characteristic polynomial correctly when the matrix components are entered. Correct formulas for the characteristic polynomial of a $3\times3$ matrix, including $\frac12[tr(A)^2-tr(A^2)],$ are given on Mathworld.