Compute the determinant of the matrix \[B = \begin{bmatrix} 1 & 0 & -1 & 2 \\ 3 & 1 & 0 & 1 \\ 4 & -1 & 1 & 1 \\ -1 & 2 & 1 & 2 \end{bmatrix}.\]
Solution
Expand along the first row: \[ \det B =\det\begin{bmatrix}1&0&1\\-1&1&1\\2&1&2\end{bmatrix} -\det\begin{bmatrix}3&1&1\\4&-1&1\\-1&2&2\end{bmatrix} -2\det\begin{bmatrix}3&1&0\\4&-1&1\\-1&2&1\end{bmatrix}. \] The three \(3\times3\) determinants are respectively \[ -1,\qquad -21,\qquad -10. \] Therefore \[ \det B=-1-(-21)-2(-10)=40. \]