# Determinant of Matrix is different than product of diagonal

(sorry in advance, but I can't find a page on how to format math equation/structures) I'm having a bit of an issue with this matrix and finding its determinant. I know what the correct determinant is (thanks to wolfram), but I need to be able to figure it on paper for my math class, especially for larger matrices. I'm dealing with eigenvalues and eigenvectors in class but right now the issue is getting $\det \left( A-\lambda I\right)$ for a $3 \times 3$ matrix:

$\left( \begin{matrix} 2 & -2 & 5 \\ 0 & 3 & -2 \\ 0 & -1 & 2 \end{matrix}\right)$

For $\det\left(A-\lambda I\right)$, I get the matrix:

$\left( \begin{matrix} 2- \lambda & -2 & 5 \\ 0 & 3 - \lambda & -2 \\ 0 & -1 & 2 - \lambda \end{matrix}\right)$

The determinant/characteristic equation being $-\lambda^3 + 7 \lambda^2 - 14\lambda + 8$. I can get this by using expansion of cofactors. However, if I attempt to use elementary row operations and find the product of the main diagonal, I get a polynomial with a $\lambda^4$ in it.

I even tried finding the determinant of $A$ by itself with both methods and I still get two different answers. Can someone explain what I'm doing wrong here. I tried asking the instructor but he just tells me to look over the book (which I have) but I still have this problem.

EDIT: In response to mookid's answer. This is what I did:

$\left( \begin{matrix} 2- \lambda & -2 & 5 \\ 0 & 3 - \lambda & -2 \\ 0 & -1 & 2 - \lambda \end{matrix}\right)$ -> $\left( \begin{matrix} 2- \lambda & -2 & 5 \\ 0 & 3 - \lambda & -2 \\ 0 & -1(3 - \lambda) + 3 - \lambda & (3 - \lambda)(2 - \lambda) - 2 \end{matrix}\right)$ =

$\left( \begin{matrix} 2- \lambda & -2 & 5 \\ 0 & 3 - \lambda & -2 \\ 0 & 0 & \lambda^2 - 5\lambda + 4\end{matrix}\right)$

I feel like I'm doing something wrong here because based on what my teacher told me, I should be getting what you got for the determinant.

• Only one of the three types of elementary row operations always preserve determinants. Note that you multiplied the last row by $3-\lambda$, which makes the determinant of the resultant matrix $3-\lambda$ times that of $A$. The 4th order polynomial you got is thus $3-\lambda$ times the characteristic polynomial of $A$. – epimorphic Oct 16 '14 at 9:50

$$\begin{bmatrix} 2-k & -2 & 5 \\ 0 & 3-k & -2 \\ 0 & -1 & 2-k \end{bmatrix} \to \begin{bmatrix} 2-k & -2 & 5 \\ 0 & -1 & 2-k \\ 0 & 3-k & -2 \end{bmatrix} \\ \to \begin{bmatrix} 2-k & -2 & 5 \\ 0 & -1 & 2-k \\ 0 & 3-k -(3-k) & -2 + (2-k)(3-k) \end{bmatrix} = \begin{bmatrix} 2-k & -2 & 5 \\ 0 & -1 & 2-k \\ 0 & 0 & 4-5k+k^2 \end{bmatrix}$$ using elementary operations. Hence the eigenvalues are $2$ and the roots of $4-5k+k^2=0$, that is $k \in \{2, 1, 4\}$.