Writing a 2 by 2 matrix as a product of elementary matrices

linear algebramatrices

Problem:

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

Answer:

Call the matrix we are given $M$. Note that since the determinant of this matrix is non-zero we can write it as a product of elementary matrices.
\begin{align*}
\begin{bmatrix}
1 & 3 \\
3 & 5\\
\end{bmatrix} &\sim
\begin{bmatrix}
1 & 3 \\
0 & -4 \\
\end{bmatrix} \\
&\sim
\begin{bmatrix}
1 & 3 \\
0 & 1 \\
\end{bmatrix} \\
&\sim
\begin{bmatrix}
1 & 0 \\
0 & 1 \\
\end{bmatrix}
\end{align*}

The matrix operations performed were
\begin{align*}
R_2 &= -3R_1 + R_2 \\
R_2 &= -\dfrac{1}{4} R_2 \\
R_1 &= -3R_2 + R_1
\end{align*}

\begin{align*}
e_1 &= \begin{bmatrix}
1 & 0 \\
-3 & 1 \\
\end{bmatrix} \\
e_2 &= \begin{bmatrix}
1 & 0 \\
0 & -\dfrac{1}{4} \\
\end{bmatrix} \\
e_3 &= \begin{bmatrix}
1 & -3 \\
0 & 1 \\
\end{bmatrix}
\end{align*}

Now observe that:
$$ e_3e_2e_1M = I $$
Now we solve for $M$.
\begin{align*}
e_2e_1M &= e_3^{-1} I \\
e_1M &= e_2^{-1} e_3^{-1} \\
M &= e_1^{-1}e_2^{-1} e_3^{-1} \\
e_1^{-1} &= \begin{bmatrix}
1 & 0 \\
3 & 0 \\
\end{bmatrix} \\
e_2^{-1} &= \begin{bmatrix}
1 & 0 \\
0 & -4 \\
\end{bmatrix} \\
e_3^{-1} &= \begin{bmatrix}
1 & 3 \\
0 & 1 \\
\end{bmatrix}
\end{align*}

Using SciLab I see that my solution is wrong. Where did I go wrong?

Best Answer

The fourth entry of $e^{-1}_1$ should be 1, not 0.