Writting a matrix as a product of elementary matrices

linear algebramatrices

Problem:
Write the following matrix as a product of elementary matrices:
$$ \begin{bmatrix}
1 & 2 \\
3 & 4
\end{bmatrix} $$

Answer:

First note that since the determinate of this matrix is non-zero we can
write it as a product of elementary matrices. To do this, we use row-operations
to reduce the matrix to the identity matrix. Call the original matrix $M$.
\begin{align*}
M \sim \begin{bmatrix}
1 & 3 \\
0 & -4 \\
\end{bmatrix} \\
M \sim \begin{bmatrix}
1 & 3 \\
0 & 1 \\
\end{bmatrix} \\
M \sim \begin{bmatrix}
1 & 0 \\
0 & 1 \\
\end{bmatrix} \\
\end{align*}

The first row operation was $R2 = -3R1 + R2$. The second row operation
was $R2 = -\frac{1}{4}R2$. The third row operation was $R1 = R1 – 3R2$.
Am I right so far? I am not sure how to finish it?
$$
D = \begin{bmatrix}
1 & 0 \\
-3 & 1 \\
\end{bmatrix} \begin{bmatrix}
1 & 0 \\
0 & -\frac{1}{4} \\
\end{bmatrix}
\begin{bmatrix}
1 & 0 \\
0 & -3 \\
\end{bmatrix}
$$

Am I right?

Best Answer

The elementary matrices are \begin{align*} R_2&\rightarrow R_2-3R_1 &\implies E_1 = \begin{bmatrix} 1&0 \\ -3& 1\end{bmatrix} \\ R_2&\rightarrow -\frac{R_2}{2} &\implies E_2 = \begin{bmatrix} 1&0 \\ 0& -\frac{1}{2}\end{bmatrix} \\ R_1&\rightarrow R_1-2R_2 &\implies E_3 = \begin{bmatrix} 1&-2 \\ 0& 1\end{bmatrix} \end{align*}

We get $$ E_3E_2E_1 A = I. $$ Note that $A=(E_3E_2E_1)^{-1}$.