$$A = \left( \begin{array}{cccc} 1 & 3 & 1 & 0 \\ 1 & -1 & 2 & 1 \\ 1 & 0 & 1 & 1 \\ 0 & 1 & 0 & 2 \\ \end{array} \right)$$
Its determinant is $7$ for I used Laplace method. I checked and it's $7$.
When I compute Guass reduction, though it is not $7$ anymore. I took into account the scale factor, but I do not know where I did wrong.
Those the operations I've made: the first two ones:
$$\text{Row 2} - \text{row 1} \to \text{row 2}$$ $$\text{row 3} - \text{row 1} \to \text{row 3}$$
No scale factor.
Then
$$\text{4 row 3} - \text{3 row 2} \to \text{row 3}$$ $$\text{3 row 4} - \text{row 3} \to \text{row 4}$$
At this point the matrix is
$$A = \left( \begin{array}{cccc} 1 & 3 & 1 & 0 \\ 0 & -4 & 1 & 1 \\ 0 & 0 & -3 & 1 \\ 0 & 0 & 0 & 7 \\ \end{array} \right)$$
Dividing now the last row by $7$ and I get
$$A = \left( \begin{array}{cccc} 1 & 3 & 1 & 0 \\ 0 & -4 & 1 & 1 \\ 0 & 0 & -3 & 1 \\ 0 & 0 & 0 & 1 \\ \end{array} \right)$$
Now the scale factor is $7$.
Yet this matrix is a scale matrix, hence the determinant is trivial that is $1\cdot (-4)\cdot (-3)\cdot 1 = 12$
And $12\cdot 7 \neq 7$. Where have I went wrong?
When yu add or subtract a multiple of one row to/from another row, the coefficient of the latter row should be $1$. Thus properly:
$$\text{Row 2} - \text{row 1} \to \text{row 2}$$ $$\text{row 3} - \text{row 1} \to \text{row 3}$$
as given in the question, but then