Given the matrix $\mathbf A = \begin{pmatrix}3&5\\2&4\end{pmatrix}$, how would I go about writing this as a product of elementary matrices? I understand the concept of elementary matrices I'm just a little unsure algorithmically what the steps should be. Any help would be appreciated.
[Math] How to write this matrix as a product of elementary matrices
linear algebramatrices
Related Solutions
To do this sort of problem, consider the steps you would be taking for row elimination to get to the identity matrix. Each of these steps involves left multiplication by an elementary matrix, and those elementary matrices are easy to invert. Thus:
$$ \left( \begin{array}{ccc} 1&0&0 \\ 0&1&0 \\ -2&0&1 \end{array} \right) \left( \begin{array}{ccc} 1&0&1 \\ 0&2&0 \\ 2&2&4 \end{array} \right) = \left( \begin{array}{ccc} 1&0&1 \\ 0&2&0 \\ 0&2&2 \end{array} \right) \\ \left( \begin{array}{ccc} 1&0&0 \\ 0&1/2&0 \\ 0&0&1 \end{array} \right) \left( \begin{array}{ccc} 1&0&1 \\ 0&2&0 \\ 0&2&2 \end{array} \right) = \left( \begin{array}{ccc} 1&0&1 \\ 0&1&0 \\ 0&2&2 \end{array} \right) \\ \left( \begin{array}{ccc} 1&0&0 \\ 0&1&0 \\ 0&-2&1 \end{array} \right) \left( \begin{array}{ccc} 1&0&1 \\ 0&1&0 \\ 0&2&2 \end{array} \right) = \left( \begin{array}{ccc} 1&0&1 \\ 0&1&0 \\ 0&0&2 \end{array} \right) \\ \left( \begin{array}{ccc} 1&0&0 \\ 0&1&0 \\ 0&0&1/2 \end{array} \right) \left( \begin{array}{ccc} 1&0&1 \\ 0&1&0 \\ 0&0&2 \end{array} \right) = \left( \begin{array}{ccc} 1&0&1 \\ 0&1&0 \\ 0&0&1 \end{array} \right) \\ \left( \begin{array}{ccc} 1&0&-1 \\ 0&1&0 \\ 0&0&1 \end{array} \right) \left( \begin{array}{ccc} 1&0&1 \\ 0&1&0 \\ 0&0&1 \end{array} \right) = \left( \begin{array}{ccc} 1&0&1 \\ 0&1&0 \\ 0&0&1 \end{array} \right) \\ $$ So $$ \left( \begin{array}{ccc} 1&0&1 \\ 0&2&0 \\ 2&2&4 \end{array} \right) = \left( \begin{array}{ccc} 1&0&0 \\ 0&1&0 \\ 2&0&1 \end{array} \right) \left( \begin{array}{ccc} 1&0&0 \\ 0&2&0 \\ 0&0&1 \end{array} \right) \left( \begin{array}{ccc} 1&0&0 \\ 0&1&0 \\ 0&2&1 \end{array} \right) \left( \begin{array}{ccc} 1&0&0 \\ 0&1&0 \\ 0&0&2 \end{array} \right) \left( \begin{array}{ccc} 1&0&1 \\ 0&1&0 \\ 0&0&1 \end{array} \right) $$
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.
Best Answer
Perform the Gauss algorithm to bring $A$ into the reduced echelon form. Because every step of the Gauss algorithm is basically a multiplication with an elementary matrix you get the equation (You can also get the $T_i$ on the left side of $A$ it depends if you do row or column operations)
$$A \cdot T_1 \cdot T_2 \cdot \ldots \cdot T_k = \mathcal{E}$$
Where $\mathcal{E}$ is the unit matrix. Therefore you have that
$$A = T_k^{-1} \cdot \ldots \cdot T_2^{-1} \cdot T_1^{-1}$$
And because the inverse of elementary matrices are elementary matrices you have written $A$ as the product of elementary matrices. This is a constructive algorithm you just have to keep track of the elementary matrices you use.