# 3.8 Elementary matrices

## 3.8.1 Definition of an elementary matrix

An elementary matrix is one you can get 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}$.

## 3.8.2 Doing a row operation is the same as multiplying by an elementary matrix

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 $A$ an $m\times n$ matrix. Then $r(A)=r(I_{m})A$.

###### Proof.

We will use the fact that matrix multiplication happens rowwise. Specifically, we use Proposition 3.2.5 which says that if the rows of $A$ are $\mathbf{s}_{1},\ldots,\mathbf{s}_{m}$ and if $\mathbf{r}=\begin{pmatrix}a_{1}&\cdots&a_{m}\end{pmatrix}$ is a row vector then

 $\mathbf{r}A=a_{1}\mathbf{s}_{1}+\cdots+a_{m}\mathbf{s}_{m}$

and Theorem 3.2.6, which tells us that the rows of $r(I_{m})A$ are $\mathbf{r}_{1}A$, …, $\mathbf{r}_{m}A$ where $\mathbf{r}_{j}$ is the $j$th row of $r(I_{m})$. We deal with each row operation separately.

1. 1.

Let $r$ be $\textbf{r}_{j}\mapsto\textbf{r}_{j}+\lambda\textbf{r}_{i}$. Row $j$ of $r(I_{m})$ has a 1 in position $j$, a $\lambda$ in position $i$, and zero everywhere else, so by the Proposition mentioned above

 $\mathbf{r}_{j}A=\mathbf{s}_{j}+\lambda\mathbf{s}_{i}.$

For $j^{\prime}\neq j$, row $j^{\prime}$ of $r(I_{m})$ has a 1 at position $j^{\prime}$ and zeroes elsewhere, so

 $\mathbf{r}_{j^{\prime}}A=\mathbf{s}_{j^{\prime}}.$

The theorem mentioned above tells us that these are the rows of $r(I_{m})A$, but they are exactly the result of doing $r$ to $A$.

2. 2.

Let $r$ be $\textbf{r}_{j}\mapsto\lambda\textbf{r}_{j}$. Row $j$ of $r(I_{m})$ has a $\lambda$ in position $j$ and zero everywhere else, so

 $\mathbf{r}_{j}A=\lambda\mathbf{s}_{j}.$

For $j^{\prime}\neq j$, row $j^{\prime}$ of $r(I_{m})$ has a 1 at position $j^{\prime}$ and zeroes elsewhere, so

 $\mathbf{r}_{j^{\prime}}A=\mathbf{s}_{j^{\prime}}.$

As before, these are the rows of $r(I_{m})A$ and they show that this is the same as the result of doing $r$ to $A$.

3. 3.

Let $r$ be $\textbf{r}_{i}\leftrightarrow\textbf{r}_{j}$. Row $i$ of $r(I_{m})$ has a 1 in position $j$ and zeroes elsewhere, and row $j$ of $r(I_{m})$ has a 1 in position $i$ and zeroes elsewhere, so rows $i$ and $j$ of $r(I_{m})A$ are given by

 $\displaystyle\mathbf{r}_{i}A$ $\displaystyle=\mathbf{s}_{j}$ $\displaystyle\mathbf{r}_{j}A$ $\displaystyle=\mathbf{s}_{i}.$

As in the previous two cases, all other rows of $r(I_{m})A$ are the same as the corresponding row of $A$. The result follows.

###### 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}$ 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 is $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})$. ∎