Writing 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:
My plan is to use row operations to reduce the matrix to the identity matrix. Let $A$ be the original matrix. We
have:
$$
\begin{bmatrix}
1 & 2 \\
3 & 4
\end{bmatrix} \sim
\begin{bmatrix}
1 & 2 \\
0 & -2
\end{bmatrix}
$$

using $R_2 = -3R_1 + R_2$.
$$ \begin{bmatrix}
1 & 2 \\
0 & -2
\end{bmatrix} \sim
\begin{bmatrix}
1 & 2 \\
0 & 1
\end{bmatrix}
$$

using $R_2 = -\dfrac{1}{2}R_2$.
$$
\begin{bmatrix}
1 & 2 \\
0 & 1
\end{bmatrix} \sim
\begin{bmatrix}
1 & 0 \\
0 & 1
\end{bmatrix}
$$

using $R_1 = -2R_2 + R_1$.
I would expect this would give me:
$$ A = \begin{bmatrix}
1 & 0 \\
-3 & 1
\end{bmatrix}
\begin{bmatrix}
1 & 0 \\
0 & \dfrac{1}{2}
\end{bmatrix}
\begin{bmatrix}
1 & -2 \\
0 & 1
\end{bmatrix}
$$

However, this answer is wrong. Where did I go wrong?

Best Answer

You're on the right track, but there seems to be an error in your order of matrix multiplication. Remember, when representing row operations as matrix multiplication, you left multiply in ascending order. The identity matrix $$I=E_nE_{n-1}\cdots E_2E_1A$$ for some finite $n$.

Now, given your matrix, we have to start with

$$A=\pmatrix{1&2\\3&4}$$

You're row operations are correct, we would like to use $R_2=-3R_1+R_2$ first. The elementary matrix operation for this is

$$E_1=\pmatrix{1&0\\-3&1}\implies E_1A=\pmatrix{1&0\\-3&1}\pmatrix{1&2\\3&4}=\pmatrix{1&2\\0&-2}$$

Now, we want to eliminate that $2$ in the first row and second column, this can be done by using $R_1=R_1+R_2$

$$E_2=\pmatrix{1&1\\0&1}\implies E_2E_1A=\pmatrix{1&1\\0&1}\pmatrix{1&2\\0&-2}=\pmatrix{1&0\\0&-2}$$

Finally, we'll reduce to the identity by $R_2=-\frac{1}{2}R_2$ represented by

$$E_3=\pmatrix{1&0\\0&-\dfrac{1}{2}}\implies E_3E_2E_1A=\pmatrix{1&0\\0&-\dfrac{1}{2}}\pmatrix{1&0\\0&-2}=\pmatrix{1&0\\0&1}$$

Being elementary matrices, they each have an inverse, and so we make use our fast inverse formula for a $2\times2$ matrix $\pmatrix{a&b\\c&d}^{-1}=\dfrac{1}{ad-bc}\pmatrix{d&-b\\-c&a}$

$$E_1^{-1}E_2^{-1}E_3^{-1}I=A=\pmatrix{1&0\\3&1}\pmatrix{1&-1\\0&1}\pmatrix{1&0\\0&-2}$$