# 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 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$.

-

P(lambda) = det(A - lambda*I) Dont forget to take the determinant correctly. Use the laPlace expansion. | a b c | | d e f | = A | g h i | det(A) = a * det([e,h],[f,i]) - d * det([b,h],[c,i]) + g * det([b,e],[c.f]) it brings the determinant down to a 2x2 matrix

-

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$$

-