<s>[INST] write the given matrix as a product of elementary matrices Please explain this in detail because i simply cannot understand previous explanations I have read for this type of problem.
By the way this is from elementary linear algebra 10th edition section 1.5 exercise #29. There is a copy online if you want to check the problem out.
Write the given matrix as a product of elementary matrices.
\begin{bmatrix}-3&1\\2&2\end{bmatrix}
 [/INST] It took me a good 20 minutes to type this, so I'm gonna be pissed af if you don't read it.
Take the matrix $\begin{pmatrix}-3 & 1 \\ 2 & 2 \end{pmatrix}$ and add $2/3$ times the first row to the second.  You get $\begin{pmatrix}-3 & 1 \\ 0 & \frac{8}{3} \end{pmatrix}$.  Let $E_1$ be the elementary row matrix corresponding to the row operation you just did:
$$E_1 = \begin{pmatrix}1 & 0 \\ \frac{2}{3} & 1 \end{pmatrix}$$
Notice that $E_1 \begin{pmatrix}-3 & 1 \\ 2 & 2 \end{pmatrix} = \begin{pmatrix}-3 & 1 \\ 0 & \frac{8}{3} \end{pmatrix}$.  
Next, take the matrix $\begin{pmatrix}-3 & 1 \\ 0 & \frac{8}{3} \end{pmatrix}$ and add $-\frac{3}{8}$ times the second row to the first.  You get $\begin{pmatrix} -3 & 0 \\ 0 & \frac{8}{3} \end{pmatrix}$.  Let $E_2$ be the the elementary row matrix corresponding to the row operation you just did:
$$E_2 = \begin{pmatrix} 1 & -\frac{3}{8} \\ 0 & 1 \end{pmatrix} $$
Notice that $E_2 \begin{pmatrix}-3 & 1 \\ 0 & \frac{8}{3} \end{pmatrix} = \begin{pmatrix} -3 & 0 \\ 0 & \frac{8}{3} \end{pmatrix}$.  
Next, take $\begin{pmatrix} -3 & 0 \\ 0 & \frac{8}{3} \end{pmatrix}$ and multiply the first row by $-\frac{1}{3}$.  You get $\begin{pmatrix} 1 & 0 \\ 0 & \frac{8}{3} \end{pmatrix}$.  Let 
$$E_3 = \begin{pmatrix} -\frac{1}{3} & 0 \\ 0 & 1 \end{pmatrix}$$
Notice $E_3  \begin{pmatrix} -3 & 0 \\ 0 & \frac{8}{3}\end{pmatrix} = \begin{pmatrix} 1 & 0 \\ 0 & \frac{8}{3} \end{pmatrix}$
Now take $\begin{pmatrix} 1 & 0 \\ 0 & \frac{8}{3} \end{pmatrix}$ and multiply the bottom row by $-\frac{3}{8}$.  You get $I =\begin{pmatrix} 1 &0\\0 & 1 \end{pmatrix}$.  Let 
$$E_4 = \begin{pmatrix} 1 & 0 \\ 0 & -\frac{3}{8} \end{pmatrix}$$
And notice $E_4\begin{pmatrix} 1 & 0 \\ 0 & \frac{8}{3} \end{pmatrix} = I$.
Now
$$I = E_4\begin{pmatrix} 1 & 0 \\ 0 & \frac{8}{3} \end{pmatrix}  = E_4 E_3\begin{pmatrix} -3 & 0 \\ 0 & \frac{8}{3}\end{pmatrix} = E_4E_3E_2\begin{pmatrix}-3 & 1 \\ 0 & \frac{8}{3} \end{pmatrix}$$
$$ = E_4E_3E_2E_1 \begin{pmatrix}-3 & 1 \\ 2 & 2 \end{pmatrix}$$
and so 
$$ \begin{pmatrix}-3 & 1 \\ 2 & 2 \end{pmatrix} = E_1^{-1}E_2^{-1}E_3^{-1}E_4^{-1}$$
where $E_1^{-1} = \begin{pmatrix} 1 & 0 \\ -\frac{2}{3} & 1 \end{pmatrix}, E_2^{-1} = \begin{pmatrix} 1 & \frac{3}{8} \\ 0 & 1 \end{pmatrix}, E_3^{-1} = \begin{pmatrix} -3 & 0 \\ 0 & 1 \end{pmatrix}, E_4^{-1} = \begin{pmatrix} 1 & 0 \\ 0 & -\frac{8}{3} \end{pmatrix}$.  Those are the elementary matrices you want.
</s>