Finding determinant for matrix using upper triangle method Here is an example of a matrix, and I'm trying to evaluate its determinant:
$$
\begin{pmatrix}
1 & 3 & 2 & 1 \\
0 & 1 & 4 & -4 \\
2 & 5 & -2 & 9 \\
3 & 7 & 0 & 1 \\
\end{pmatrix}
$$
When applying first row operation i get:
$$
\begin{pmatrix}
1 & 3 & 2 & 1 \\
0 & 1 & 4 & -4 \\
0 & -1 & -6 & 7 \\
0 & -2 & -6 & -2 \\
\end{pmatrix}
$$
Now, if I continue doing row operations until i get the upper triangle, the determinant will be 14 (which is said to be the correct one).
$$
\begin{pmatrix}
1 & 3 & 2 & 1 \\
0 & 1 & 4 & -4 \\
0 & 0 & 2 & 3 \\
0 & 0 & 0 & -7 \\
\end{pmatrix}
$$
However, if I instead apply this certain operation, R4 --> (1/-2)R4...
$$
\begin{pmatrix}
1 & 3 & 2 & 1 \\
0 & 1 & 4 & -4 \\
0 & -1 & -6 & 7 \\
0 & 1 & 3 & 1 \\
\end{pmatrix}
$$
...and then carry on with operations, I get a different final answer: The determinant will be 7 in this case!
$$
\begin{pmatrix}
1 & 3 & 2 & 1 \\
0 & 1 & 4 & -4 \\
0 & 0 & -1 & 5 \\
0 & 0 & 0 & -7 \\
\end{pmatrix}
$$
Could someone explain that to me - is this operation illegal?
R4 --> (1/-2)R4
How so? Because i always tend to use it, just to simply things a little.

You just multiplied a row with $\frac {1}{-2}$! This will change the value of determinant. What you can do is take $-2$ common from a row and write it outside. 
Consider a $1\times 1$ matrix $A=[1]$.
$det(A)=1$
Apply $R_!\to2R_1$
$A=[2]$
$det(A)=2$
Can you see why you cannot do it? 
