# Finding the characteristic polynomial in a square matrix

The example in the textbook had a square matrix

\begin{pmatrix} 0&1&0\\0&0&1\\4&-17&8 \end{pmatrix}

Then proceed to say $\ (\lambda \cdot I - A) \$ is

\begin{pmatrix} \lambda&-1&0\\0&\lambda&-1\\-4&17&\lambda - 8 \end{pmatrix}

Then proceed to say the characteristic polynomial is $\ (\lambda)^3 - (8 \lambda)^ 2 + (17 \lambda) - 4 \$ .

But I don't understand why because when I multiply the entries the main diagonal: $\ \lambda \cdot \lambda \cdot (\lambda - 8) \ = \ \lambda^3 - \lambda^2 \cdot 8 \$ .

-
To answer your question about where the LaTex wasn;t working: for math expression on a line, a single 'dollar sign' is needed as delimiters on each end; also, your 'lambdas' needed backslashes in front of them. – RecklessReckoner May 8 '14 at 20:51

The characteristic polynomial is the determinant of your second matrix, which is $\lambda I-A$. The determinant is not only the multiplication of the entries of the diagonal, but the sum of all descending diagonals minus the sum of the ascending diagonals, which is here $\lambda^2(\lambda-8)+(-1)(-1)(-4)-(17)(-1)\lambda$.
You need to find the determinant of the 2nd matrix. This is $$\lambda * [\lambda*(\lambda-8) + 17 ] + 1[-4] = \lambda^3 - 8\lambda^2 + 17\lambda -4$$