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?
It should be: $$\begin{vmatrix}3&0&1&0\\0&2&0&0\\1&0&3&0\\0&0&0&-4\end{vmatrix}\rightarrow \begin{vmatrix}3&0&1&0\\0&2&0&0\\0&0&\color{red}{3-{1\over 3}}&0\\0&0&0&-4\end{vmatrix}$$