Matrix as a product of elementary matrices?

So

$$A = \begin{bmatrix} 1 & 2 \\ 3 & 1 \end{bmatrix}$$

and the matrix can be reduced in these steps:

$$\begin{bmatrix} 1 & 2 \\ 0 & -5 \end{bmatrix}$$

via an elementary matrix that looks like this:

$$E_1 = \begin{bmatrix} 1 & 0 \\ -3 & 1 \end{bmatrix}$$

next:

$$\left [ \begin{matrix} 1 & 0 \\ 0 & -5 \end{matrix} \right ]$$

via an elementary matrix that looks like this:

$$E_2 = \left [ \begin{matrix} 1 & \frac{2}{5} \\ 0 & 1 \end{matrix} \right ]$$

next:

$$\left [ \begin{matrix} 1 & 0 \\ 0 & 1 \end{matrix} \right ]$$

via an elementary matrix that looks like this:

$$E_1 = \left [ \begin{matrix} 1 & 0 \\ 0 & \frac{-1}{5} \end{matrix} \right ]$$

So...

$$E_1^{-1} = \left [ \begin{matrix} 1 & 0 \\ 3 & 1 \end{matrix} \right ]$$ $$E_2^{-1} = \left [ \begin{matrix} 1 & \frac{-2}{5} \\ 0 & 1 \end{matrix} \right ]$$ $$E_3^{-1} = \left [ \begin{matrix} 1 & 0 \\ 0 & -5 \end{matrix} \right ]$$

And if I multiply them together I get:

$$E_1^{-1} * E_2^{-2} = \left [ \begin{matrix} 1 & \frac{-2}{5} \\ 3 & \frac{-1}{5} \end{matrix} \right ] = C$$

and

$$C * E_3^{-1} = \left [ \begin{matrix} 1 & 2 \\ 3 & 1 \end{matrix} \right ]$$

So this works out. Is this right?

Also question, the underlying premise of all of this is that $A$ is invertible right? And if $A$ is invertible, that means that a series of row operations can change it to the identity matrix. Why is this? This doesn't make intuitive sense to me.

Also, why does the product of elementary matrices equal $A$? What is the underlying theorem?

• Multiplying a matrix $A$ by an elementary matrix $E$ is equivalent to applying elementary row operations to $A$. The underlying theorem that you seek says that $A$ is invertible if and only if it is row-equivalent and column equivalent to the identity matrix; it is commonly called "the invertible matrix theorem". You can search up a proof in any elementary linear algebra textbook. Aug 6, 2018 at 19:18

This is equivalent to performing the operation $R_2 -3R_1$ on $I_2$, the 2x2 identity matrix. This row operation would be the first operation performed to reduce this matrix. Personally, when I have to compute the sequence of elementary matrices I always do the reduction first and then compute the corresponding matrices.