# 3.8 Elementary matrices

###### Definition 3.8.1.

An elementary matrix is one obtained by doing a single row operation to an identity matrix.

###### Example 3.8.1.
• The elementary matrix $\begin{pmatrix}0&1\\ 1&0\end{pmatrix}$ results from doing the row operation $\textbf{r}_{1}\leftrightarrow\textbf{r}_{2}$ to $I_{2}$.

• The elementary matrix $\begin{pmatrix}1&2&0\\ 0&1&0\\ 0&0&1\end{pmatrix}$ results from doing the row operation $\textbf{r}_{1}\mapsto\textbf{r}_{1}+2\textbf{r}_{2}$ to $I_{3}$.

• The elementary matrix $\begin{pmatrix}-1&0\\ 0&1\end{pmatrix}$ results from doing the row operation $\textbf{r}_{1}\mapsto(-1)\textbf{r}_{1}$ to $I_{2}$.

Doing a row operation $r$ to a matrix has the same effect as multiplying that matrix on the left by the elementary matrix corresponding to $r$.

###### Theorem 3.8.1.

Let $r$ be a row operation and $B$ an $m\times n$ matrix. Then $r(B)=r(I_{m})B$.

###### Proof.

Any row operation $r$ changes $B$ to a matrix $r(B)$ whose rows are linear combinations (Definition 3.2.2) of the rows of $B$. Proposition 3.2.5 and Theorem 3.2.6 show that we can choose an $m\times m$ matrix $A$ such that $r(B)=AB$. By putting $B=I_{m}$ we see that $A=r(I_{m})$. ∎

###### Example 3.8.2.

The theorem tells you that doing the row operation $\mathbf{r}_{1}\mapsto\mathbf{r}_{1}+2\mathbf{r}_{2}$ to a matrix with three rows is the same as left-multiplying by the $3\times 3$ elementary matrix $\begin{pmatrix}1&2&0\\ 0&1&0\\ 0&0&1\end{pmatrix}$. For example, if we do this row operation to $\begin{pmatrix}a\\ b\\ c\end{pmatrix}$ we get $\begin{pmatrix}a+2b\\ b\\ c\end{pmatrix}$ which is the same as

 $\begin{pmatrix}1&2&0\\ 0&1&0\\ 0&0&1\end{pmatrix}\begin{pmatrix}a\\ b\\ c\end{pmatrix}=\begin{pmatrix}a+2b\\ b\\ c\end{pmatrix}.$
###### Corollary 3.8.2.

Elementary matrices are invertible.

###### Proof.

Let $r$ be a row operation, $s$ be the inverse row operation to $r$, and let $I_{n}$ be an identity matrix. By Theorem 3.8.1, $r(I_{n})s(I_{n})=r(s(I_{n}))$. Because $s$ is inverse to $r$, this equals $I_{n}$. Similarly, $s(I_{n})r(I_{n})=s(r(I_{n}))=I_{n}$. It follows that $r(I_{n})$ is invertible with inverse $s(I_{n})$. ∎

Theorem 3.8.1 combined with Corollary 3.8.2 shows that if $A$ results from doing a row operation to $B$, then $A=EB$ for some invertible matrix $E$. What about if $A$ results from doing a sequence of row operations?

###### Theorem 3.8.3.

Suppose that $A$ is a matrix obtained by doing a sequence of row operations to another matrix $B$. Then $A=EB$ for some invertible matrix $E$.

###### Proof.

If the row operations are $r_{1},\ldots,r_{k}$ and if $E_{i}$ is the elementary matrix corresponding to $r_{i}$ then using Theorem 3.8.1 repeatedly gives

 $A=E_{k}E_{k-1}\cdots E_{2}E_{1}B.$

Let $E=E_{k}E_{k-1}\cdots E_{2}E_{1}$, so $A=EB$. The matrix $E$ is a product of invertible matrices, by Corollary 3.8.2, so it is invertible by Theorem 3.5.3. ∎