Determinant by cofactor expansion Vs Row reduction For the following matrix
$$ \begin{pmatrix}
 1 & 1 & 1 \\
 1 & 1 & -4 \\ 
-4 & 1 & 1 \\
 \end{pmatrix} $$
The determinant by cofactor expansion is 25 . But by EROs reduction I'm always getting -25 ..here is one trial :
--> R3+4R2     &      R1-R2
$$ \begin{pmatrix}
 1 & 1 & 1 \\ 
0 & 0 & 5 \\
 0 & 5 & -15 \\ 
\end{pmatrix} $$
And continuing by cofactor expansion
1(-25)=-25 !!
I aslo tried completing it by EROs , ECOs but  the answer always is -25 ..WHY?
Also another example,
$$ \begin{pmatrix} 
0 & 1 & 5\\ 
3 & -6&  9\\
 2 & 6 & 1 \\
 \end{pmatrix} $$
I tried   R2-1.5R3
And got
$$ \begin{pmatrix} 
0 & 1 & 5\\ 
3 & -6&  9\\
 0 & -15 & 7.5 \\
 \end{pmatrix} $$
Det()= -3(7.5+15×5)  =-247.5
Where the real answer is -165!!
Please I need a justfication for these cases.

You can only replace the row $R_i$ with $R_i + k R_j$ (not row $R_j$).
If you replaced row $R_j$ instead, the determinant is multiplied by a factor of $k$.
This is related to the elementary matrix multiplications that underlie the row reduction methods.
Hence for example $1$, under row operations $R_3 + 4R_2 \to R_3$ and $R_1-R_2 \to R_1$:
\begin{pmatrix}0 &0 &5\\1& 1& -4\\-4&1&1\end{pmatrix}
which by cofactor expansion evaluates to $25$.
The row operation $R_1-R_2 \to R_1$ can be represented as the matrix:
\begin{pmatrix}1 &-1 &0\\0& 1& 0\\0&0&1\end{pmatrix}
which has determinant $1$.
The row operation $R_1-R_2 \to R_2$ can be represented as the matrix:
\begin{pmatrix}1 &0 &0\\1& -1& 0\\0&0&1\end{pmatrix}
which has determinant $-1$.
Hence we must take note of which row we are replacing. The same applies for columns.
