latex.matrix_delimiters(left='[', right=']')
latex.matrix_column_alignment('c')
$\newcommand{\la}{\langle}$ $\newcommand{\ra}{\rangle}$ $\newcommand{\vu}{\mathbf{u}}$ $\newcommand{\vv}{\mathbf{v}}$ $\newcommand{\vw}{\mathbf{w}}$ $\newcommand{\vzz}{\mathbf{z}}$ $\newcommand{\nc}{\newcommand}$ $\nc{\Cc}{\mathbb{C}}$ $\nc{\Rr}{\mathbb{R}}$ $\nc{\Qq}{\mathbb{Q}}$ $\nc{\Nn}{\mathbb{N}}$ $\nc{\cB}{\mathcal{B}}$ $\nc{\cE}{\mathcal{E}}$ $\nc{\cC}{\mathcal{C}}$ $\nc{\cD}{\mathcal{D}}$ $\nc{\mi}{\mathbf{i}}$ $\nc{\span}[1]{\langle #1 \rangle}$ $\nc{\ol}[1]{\overline{#1} }$ $\nc{\norm}[1]{\left\| #1 \right\|}$ $\nc{\abs}[1]{\left| #1 \right|}$ $\nc{\vz}{\mathbf{0}}$ $\nc{\vo}{\mathbf{1}}$ $\nc{\DMO}{\DeclareMathOperator}$ $\DMO{\tr}{tr}$ $\DMO{\nullsp}{nullsp}$ $\nc{\va}{\mathbf{a}}$ $\nc{\vb}{\mathbf{b}}$ $\nc{\vx}{\mathbf{x}}$ $\nc{\ve}{\mathbf{e}}$ $\nc{\vd}{\mathbf{d}}$ $\nc{\vh}{\mathbf{h}}$ $\nc{\ds}{\displaystyle}$ $\nc{\bm}[1]{\begin{bmatrix} #1 \end{bmatrix}}$ $\nc{\gm}[2]{\bm{\mid & \cdots & \mid \\ #1 & \cdots & #2 \\ \mid & \cdots & \mid}}$ $\nc{\MN}{M_{m \times n}(K)}$ $\nc{\NM}{M_{n \times m}(K)}$ $\nc{\NP}{M_{n \times p}(K)}$ $\nc{\MP}{M_{m \times p}(K)}$ $\nc{\PN}{M_{p \times n}(K)}$ $\nc{\NN}{M_n(K)}$ $\nc{\im}{\mathrm{Im\ }}$ $\nc{\ev}{\mathrm{ev}}$ $\nc{\Hom}{\mathrm{Hom}}$ $\nc{\com}[1]{[\phantom{a}]^{#1}}$ $\nc{\rBD}[1]{ [#1]_{\cB}^{\cD}}$ $\DMO{\id}{id}$ $\DMO{\rk}{rk}$ $\DMO{\nullity}{nullity}$ $\DMO{\End}{End}$ $\DMO{\proj}{proj}$ $\nc{\GL}{\mathrm{GL}}$
ERO can be carried out by matrix multiplication.
The $m \times m$ elementary matrix associated to an ERO $\rho$, denoted by $E_{\rho}(m)$ (or simply $E_{\rho}$ if $m$ is understood), is the matrix obtained by applying $\rho$ to $I_m$.
Example. Let $\rho$ be the ERO $R_2 \leftrightarrow R_3$ (so in order for it to be applicable to $I_m$, $m \ge 3$). Then
$$ E_{\rho}(3) = \bm{1 & 0 & 0 \\ 0 & 0 & 1\\ 0 & 1 & 0} \quad \text{and} \quad E_{\rho}(4) = \bm{ 1& 0 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1}.$$Checkpoint. Find $E_\rho \in M_3(K)$ for
For each $\rho$, verify that $E_{\rho}A$ is the matrix obtained by applying $\rho$ to $A = \left[\begin{array}{rrrr} -2 & 0 & 2 & -1 \\ 0 & 1 & -1 & 2 \\ -1 & 0 & -1 & 0 \end{array}\right] $.
For any $A$, it is clear that $E_{\rho^{-1}}E_{\rho}A = A$. In particular, when $A$ is an identity matrix, $E_{\rho^{-1}}E_{\rho} = E_{\rho^{-1}}E_{\rho}I = I$.
Therefore,
Proposition. Every elementary matrix is invertible and its inverse is also elementary. More precisely, $E^{-1}_{\rho} = E_{\rho^{-1}}$ for every ERO $\rho$.
Checkpoint. For each $\rho$ in the above checkpoint, verify that $E_{\rho}^{-1} = E_{\rho^{-1}}$.
Since every matrix $A$ is row equivalent to its rref $R_A$, that means $A \stackrel{\rho_1}{\to} \cdots \stackrel{\rho_k}{\to} R_A$ for some EROs $\rho_1, \rho_2, \ldots, \rho_k$. Thus for some elementary matrices $E_1, \ldots, E_k$, $$ E_k E_{k-1}\cdots E_1 A = R_A. \tag{1} $$
We distinguish two cases:
When $A$ is a square matrix then $R_A = I_n$ in the first case. It now follows from Equation (1) that $A$ must be the inverse of $E_k\ldots E_1$ (which we already know that is invertible). Consequently, $A$ itself is invertible.
In the second case the last row of $R_A$ is zero and $A$ were invertible, then so is the last row of
$$R_AA^{-1} = (E_k \cdots E_1A)A^{-1} = E_k \cdots E_1(AA^{-1}) = E_k \cdots E_1I = E_k\cdots E_1.$$But this contradicts the fact that $E_k\cdots E_1$ is invertible. Thus we have just proved:
Theorem 1. A square matrix is invertible if and only if it is row equivalent to an identity matrix.
Moreover, if $B$ is invertible, so is $B^{-1}$. Thus,
$$ E_k \cdots E_1 B^{-1} = I_n$$for some sequence of elementary matrices $E_1, \ldots, E_k$. Multiply by $B$ on both sides, we get $E_k\cdots E_1 = B$. Therefore,
Theorem 2. Every invertible matrix is a product of elementary matrices.
In the language of group, that means in particular, the $n \times n$ elementary matrices over $K$ generate the group $\GL_n(K)$.