<s>[INST] Determinant by Gauss Elimination I want to find the determinant by Gauss Elimination Method for the following matrix:
$$\begin{bmatrix}
1 & 2 & 0 & 1\\ 
0 & -1 &1  & -4\\ 
1 & 2 & 0 & -2\\ 
2 &  0& 5 &8 
\end{bmatrix}$$ 
My attempt is
Row3-row1 and Row4-2Row1
$$\begin{bmatrix}
1 & 2 & 0 & 1\\ 
0 & -1 &1  & -4\\ 
0 & 0 & 0 & -3\\ 
0 & -4& 5 &6 
\end{bmatrix}$$
the next step is
Row4-4Row2
$$\begin{bmatrix}
1 & 2 & 0 & 1\\ 
0 & -1 &1  & -4\\ 
0 & 0 & 0 & -3\\ 
0 & 0& 1 &22 
\end{bmatrix}$$
What is the next step??
 [/INST] The operations you performed don't change the determinant; you can also swap two rows, which however multiplies the determinant by $-1$.
Swap rows 3 and 4, you matrix becomes triangular and its determinant is
$$
1\cdot(-1)\cdot 1\cdot(-3)=3
$$
so the given matrix has determinant $-3$.
</s>