How to find a characteristic polynomial of 5x5 matrix From an example that I am looking at, the characteristic polynomial of 
$\begin{bmatrix}
-1&4&0&0&0 \\
0&3&0&0&0 \\
0&-4&-1&0&0 \\ 
3&-8&-4&2&1 \\
1&5&4&1&4
\end{bmatrix}$ 
is $(x-3)^3(x+1)^2$. I understand how to find the characteristic polynomial of 2x2 and 3x3 matrices but anything nxn beyond that I'm not sure what to do. Could someone walk me through the steps of the calculation to find the characteristic polynomial for this matrix? 

Directly using elementary operations that don't change the value of the determinant. Develop by the second row twice:
$$\begin{vmatrix}
x+1&-4&0&0&0 \\
0&x-3&0&0&0 \\
0&4&x+1&0&0 \\ 
-3&8&4&x-2&-1 \\
-1&-5&-4&-1&x-4
\end{vmatrix}=(x-3)\begin{vmatrix}
x+1&0&0&0 \\
0&x+1&0&0 \\ 
-3&4&x-2&-1 \\
-1&-4&-1&x-4
\end{vmatrix}=$$$${}$$
$$=(x-3)(x+1)\begin{vmatrix}
x+1&0&0 \\ 
-3&x-2&-1 \\
-1&-1&x-4
\end{vmatrix}\stackrel{\text{1st row}}
=(x-3)(x+1)^2\begin{vmatrix}x-2&-1\\-1&x-4\end{vmatrix}=$$$${}$$
$$=(x-3)(x+1)^2(x^2-6x+7)$$
As you can see, the above isn't $\;(x-3)^3(x+1)^2\;$, so at least one of you or I is wrong...but I already checked mine with this program
