<s>[INST] Finding a sequence of elementary matrices So I have this matrix 
A = $\begin{bmatrix}2 & 4\\1 & 1\end{bmatrix}$
I am tasked with finding all the elementary matrices such that Ek...E2E1A = I. Use this sequence to write both A and A-1 as products of elementary matrices/
I ended up getting four elementary matrices
E1 = $\begin{bmatrix}0 & 1\\1 & 0\end{bmatrix}$
E2 = $\begin{bmatrix}1 & 0\\-2 & 1\end{bmatrix}$
E3 = $\begin{bmatrix}1 & 0\\0 & 1/2\end{bmatrix}$
E4 = $\begin{bmatrix}1 & -1\\0 & 1\end{bmatrix}$
When I invert all the elementary matrices and multiply them it equals A but when I multiple All the elementary matrices by A I do not get the identity matrix
 [/INST] A matrix is elementary if it differs from the identity matrix by a single elementary row or column operation.
See for example, Wolfram MathWorld Elementary Matrix

The Gauss-Jordan reduction process is expressed as a sequence of elementary operations:
$$
%
\left[
\begin{array}{c|c}
 \mathbf{A} & \mathbf{I}
\end{array}
\right]
%
\qquad \Rightarrow \qquad 
%
\left[
\begin{array}{c|c}
 \mathbf{E_{A}} & \mathbf{R}
\end{array}
\right]
$$
First form the augmented matrix
$$
\left[
\begin{array}{c|c}
 \mathbf{A} & \mathbf{I}
\end{array}
\right]
=
\left[
\begin{array}{cc|cc}
 2 & 4 & 1 & 0 \\
 1 & 1 & 0 & 1 \\
\end{array}
\right]
$$
Normalize row 1:
$$
\left[
\begin{array}{cc}
 \frac{1}{2} & 0 \\
 0 & 1 \\
\end{array}
\right]
%
\left[
\begin{array}{cc|cc}
 2 & 4 & 1 & 0 \\
 1 & 1 & 0 & 1 \\
\end{array}
\right]
=
\left[
\begin{array}{cc|cc}
 1 & 2 & \frac{1}{2} & 0 \\
 1 & 1 & 0 & 1 \\
\end{array}
\right]
$$
Clear column 1
$$
\left[
\begin{array}{rc}
 1 & 0 \\
 -1 & 1 \\
\end{array}
\right]
%
\left[
\begin{array}{cc|cc}
 1 & 2 & \frac{1}{2} & 0 \\
 1 & 1 & 0 & 1 \\
\end{array}
\right]
=
\left[
\begin{array}{cr|rc}
 1 & 2 & \frac{1}{2} & 0 \\
 0 & -1 & -\frac{1}{2} & 1 \\
\end{array}
\right]
$$
Normalize row 2
$$
\left[
\begin{array}{cr}
 1 & 0 \\
 0 & -1 \\
\end{array}
\right]
%
\left[
\begin{array}{cc|cr}
 1 & 2 & \frac{1}{2} & 0 \\
 0 & 1 & \frac{1}{2} & -1 \\
\end{array}
\right]
=
\left[
\begin{array}{cc|cr}
 1 & 2 & \frac{1}{2} & 0 \\
 0 & 1 & \frac{1}{2} & -1 \\
\end{array}
\right]
$$
Clear column 2
$$
\left[
\begin{array}{cr}
 1 & -2 \\
 0 & 1 \\
\end{array}
\right]
%
\left[
\begin{array}{cc|cr}
 1 & 2 & \frac{1}{2} & 0 \\
 0 & 1 & \frac{1}{2} & -1 \\
\end{array}
\right]
=
\left[
\begin{array}{cc|rr}
 1 & 0 & -\frac{1}{2} & 2 \\
 0 & 1 & \frac{1}{2} & -1 \\
\end{array}
\right]
$$

## Products of the elementary matrices
$$
%
\begin{align}
%  
  \mathbf{E}_{4} \, \mathbf{E}_{3} \, \mathbf{E}_{2} \, \mathbf{E}_{1} \mathbf{A}  &= \mathbf{I}_{2} \\[3pt]
%
% four
\left[
\begin{array}{cr}
 1 & -2 \\
 0 & 1 \\
\end{array}
\right]
% third
\left[
\begin{array}{cr}
 1 & 0 \\
 0 & -1 \\
\end{array}
\right]
% second
\left[
\begin{array}{rc}
 1 & 0 \\
 -1 & 1 \\
\end{array}
\right]
% first
\left[
\begin{array}{cc}
 \frac{1}{2} & 0 \\
 0 & 1 \\
\end{array}
\right]
% A
\left[
\begin{array}{cc|cc}
 2 & 4 \\
 1 & 1 \\
\end{array}
\right]
&=
\left[
\begin{array}{rr}
 1 & 0 \\
 0 & 1 \\
\end{array}
\right]
%
\end{align}
%
$$
$$
%
\begin{align}
%  
  \mathbf{E}_{4} \, \mathbf{E}_{3} \, \mathbf{E}_{2} \, \mathbf{E}_{1} \mathbf{I}_{2} &= \mathbf{A}^{-1} \\[3pt]
%
% four
\left[
\begin{array}{cr}
 1 & -2 \\
 0 & 1 \\
\end{array}
\right]
% third
\left[
\begin{array}{cr}
 1 & 0 \\
 0 & -1 \\
\end{array}
\right]
% second
\left[
\begin{array}{rc}
 1 & 0 \\
 -1 & 1 \\
\end{array}
\right]
% first
\left[
\begin{array}{cc}
 \frac{1}{2} & 0 \\
 0 & 1 \\
\end{array}
\right]
\left[
\begin{array}{rr}
 1 & 0 \\
 0 & 1 \\
\end{array}
\right]
&=
\left[
\begin{array}{rr}
 -\frac{1}{2} & 2 \\
 \frac{1}{2} & -1 \\
\end{array}
\right]
%
\end{align}
%
$$
</s>