Given that $$\begin{vmatrix}a&b&c\\d&e&f\\g&h&i\end{vmatrix}=9$$
Compute \begin{vmatrix}a&b&c\\4g&4h&4i\\d+2a&e+2b&f+2c\end{vmatrix}
I have the solution my teacher made below but I'm having trouble understanding how he got the values in front of each matrix (which I highlighted). Like why does $4$ eventually turn into $-4$? I don't understand where he's pulling these values from and I'd appreciate it if someone explained.
\begin{align} \begin{vmatrix}a&b&c\\4g&4h&4i\\d+2a&e+2b&f+2c\end{vmatrix}\hspace{4mm}&\vcenter{\underrightarrow{R_2\leftarrow{\textstyle{\frac{1}{4}}}R_2}}\hspace{4mm}\bbox[yellow,3px]4\begin{vmatrix}a&b&c\\g&h&i\\d+2a&e+2b&f+2c\end{vmatrix} \\[2ex] &\vcenter{\underrightarrow{R_3\leftarrow R_3-2R_1}}\hspace{4mm}\bbox[yellow,3px]4\begin{vmatrix}a&b&c\\g&h&i\\d&e&f\end{vmatrix} \\[2ex] &\vcenter{\underrightarrow{R_2\leftrightarrow R_3}}\hspace{3mm}\bbox[yellow,3px]{-4}\begin{vmatrix}a&b&c\\d&e&f\\g&h&i\end{vmatrix}=-4\cdot9=-36 \end{align}
The key is to know how elementary row operations affect the determinant:
We are given that your matrix has determinant $9$. Notice that the matrix in question is obtained from your original matrix as follows: