Finding determinant of $3\times3$ matrix $$A = \left(\begin{matrix}
\lambda - 1 & -1 & -1 \\
1 & \lambda - 3 & 1 \\
-3 & 1 & \lambda + 1 \\
\end{matrix}\right)$$
$$\det A = \begin{vmatrix}A\end{vmatrix} = 
(\lambda - 1) \begin{vmatrix}
\lambda - 3 & 1 \\
1 & \lambda + 1 \\
\end{vmatrix} + 1\begin{vmatrix}
1 & 1 \\
-3 & \lambda + 1 \\
\end{vmatrix} -
1\begin{vmatrix}
1 & \lambda - 3 \\
-3 & 1 \\
\end{vmatrix}\\
= ((\lambda - 1)(\lambda - 3)(\lambda + 1)) - (1 + (\lambda + 1) + 3) + (1 +3\lambda - 9) \\
= (\lambda - 1)(\lambda - 3)(\lambda + 1) + (\lambda + 1) + 2(\lambda - 3)$$
The solution says that it is $(\lambda - 2)(\lambda + 2)(\lambda - 3)$. I feel like I am so close, but I don't get what I am supposed to do to get to the solution. 
 A: $$=(\lambda - 1)\Big((\lambda - 3)(\lambda + 1)-1\Big) + ((\lambda + 1) + 3) -(1 +3\lambda - 9)  $$
$$=(\lambda - 1)\Big(\lambda ^2 - 2\lambda -4\Big) + (\lambda + 4) -(3\lambda - 8)  $$
$$=(\lambda - 1)\Big(\lambda ^2 - 2\lambda -4\Big) - 2\lambda +12  $$
$$=\lambda ^3 - 3\lambda^2 -2\lambda +4 - 2\lambda +12  $$
$$=\lambda ^3 - 3\lambda^2 -4\lambda +16$$
A: What is wrong with this solution? Here we line the two copy of the same matrix side by side and draw blue and red lines and add all products of numbers on the blue lines and substract products of numbers on the red lines. The solution is off by 4.

The determinant is thus
$$(\lambda-1)(\lambda-3)(\lambda+1)\\+(-3)(1)(-1)\\+(-1)(1)(1)\\-(-1)(\lambda-3)(-3)\\-(-1)(1)(\lambda+1)\\-(\lambda-1)(1)(1)$$
That is
$$(\lambda-1)(\lambda-3)(\lambda+1)+3-1-3(\lambda-3)+(\lambda+1)-(\lambda-1)\\
=(\lambda-1)(\lambda-3)(\lambda+1)+2-3(\lambda-3)+2\\
=(\lambda-1)(\lambda-3)(\lambda+1)+4-3(\lambda-3)\\
=(\lambda-3)\left[(\lambda-1)(\lambda+1)-3\right]+4\\
=(\lambda-3)(\lambda^2-1-3)+4\\
=(\lambda-3)(\lambda^2-4)+4\\
=(\lambda-3)(\lambda-2)(\lambda+2)+4$$
A: HINT
We can simplify a little bit summing the third to the first row
$$\begin{vmatrix}
\lambda - 1 & -1 & -1 \\
1 & \lambda - 3 & 1 \\
-3 & 1 & \lambda + 1 \\
\end{vmatrix}= \begin{vmatrix}
\lambda -4 & 0 & \lambda \\
1 & \lambda - 3 & 1 \\
-3 & 1 & \lambda + 1 \\
\end{vmatrix}$$
and using Laplace expansion in the first row to obtain
$$\begin{vmatrix}
\lambda -4 & 0 & \lambda \\
1 & \lambda - 3 & 1 \\
-3 & 1 & \lambda + 1 \\
\end{vmatrix}
=(\lambda -4) \cdot \begin{vmatrix}
\lambda - 3 & 1 \\
 1 & \lambda + 1 \\
\end{vmatrix}
+\lambda\cdot \begin{vmatrix}
1 & \lambda - 3  \\
-3 & 1  \\
\end{vmatrix}$$
Can you proceed from here?
