Given matrix $X$, how to find elementary matrices $E_1$, $E_2$ and $E_3$ such that $X = E_1 E_2 E_3$

gaussian eliminationlinear algebramatrices

Given $$X = \begin{bmatrix} 0 & 1\\ -2 & -18\end{bmatrix}$$ find elementary matrices $E_1$, $E_2$ and $E_3$ such that $X = E_1 E_2 E_3$.


My attempt

I did 3 row operations from $X$ to get to $I_2$

  1. Swapping row 1 and row 2

  2. Row 1 becomes $-\frac12$ of row 1

  3. Row 1 becomes Row 1 – 9 Row 2

So then

$$E_1 = \begin{bmatrix}
0 & 1\\
1 & 0
\end{bmatrix}, \qquad
E_2 = \begin{bmatrix}
-1/2 & 0\\
0 & 1
\end{bmatrix}, \qquad
E_3 = \begin{bmatrix}
1 & -9\\
0 & 1
\end{bmatrix}$$

However, when I multiply the $E_1$, $E_2$ and $E_3$ it doesn't give $X$. Can someone please tell me where I have made a mistake or if I've approached this question incorrectly?

Best Answer

From the row operations you've performed, we can say that $E_3E_2E_1 X=I$. So, $X=E_1^{-1}E_2^{-1}E_3^{-1}$.