Simplify the determinant of a $4 \times 4$ matrix. I have to find the determinant of the following 4x4 matrix:
$\quad A=\begin{bmatrix}3&0&1&0\\0&2&0&0\\1&0&3&0\\0&0&0&-4\end{bmatrix}$
So I apply the Gaussian elimination to obtain an upper-triangle matrix:
$$det\begin{bmatrix}3&0&1&0\\0&2&0&0\\1&0&3&0\\0&0&0&-4\end{bmatrix}=\begin{vmatrix}3&0&1&0\\0&2&0&0\\1&0&3&0\\0&0&0&-4\end{vmatrix}\xrightarrow{3R_3-R_1}\begin{vmatrix}3&0&1&0\\0&2&0&0\\0&0&8&0\\0&0&0&-4\end{vmatrix}$$
Since I know from the solutions that the determinant is -64, I suppose that I need to simplify the third row in the reduced form to $\quad 0 \quad 0 \quad 2 \quad 0 \quad$ and then multiply the elements in the upper-left-to-bottom-right diagonal, which is indeed -64. But this doesn't make much sense since there's also a $-4$ that we can simplify. Can someone explain me the actual rules we need to follow?

Rather than applying row operations, expand the minors.
$\det A = -4\begin{vmatrix} 3&0&1\\0&2&0\\1&0&3\end{vmatrix} = (-4)(18-2) = -64$
If you apply row operations, you don't want your row operations to change the determinant.
I think of multiplying by an elementary matrix.
$\begin{vmatrix} 1\\&1\\-\frac 13&&1\\&&&1\end{vmatrix}\begin{vmatrix} 3&0&1&0\\0&2&0&0\\1&0&3&0\\0&0&0&-4\end{vmatrix} = \begin{vmatrix} 3&0&1&0\\0&2&0&0\\0&0&\frac {8}{3}&0\\0&0&0&-4\end{vmatrix}$
keeps the determinant unchanged.
while
$\begin{vmatrix} 1\\&1\\-1&&3\\&&&1\end{vmatrix}\begin{vmatrix} 3&0&1&0\\0&2&0&0\\1&0&3&0\\0&0&0&-4\end{vmatrix} = \begin{vmatrix} 3&0&1&0\\0&2&0&0\\0&0&8&0\\0&0&0&-4\end{vmatrix}$
will  change the determinant by a factor of $3.$
