# Elementary Row Operation/Examples/Swap r1 and r2

## Examples of Elementary Row Operations

Consider the elementary row operation $e$ defined as:

$e := r_1 \leftrightarrow r_2$

acting on a matrix space $\map \MM {3, n}$ for some $n \in \Z_{>0}$.

The elementary row matrix corresponding to $e$ is:

$\begin {pmatrix} 0 & 1 & 0 \\ 1 & 0 & 0 \\ 0 & 0 & 1 \end {pmatrix}$

## Proof

By definition, the elementary row matrix corresponding to $e$ is found by applying $e$ to the unit matrix.

By definition of unit matrix:

$\mathbf I = \begin {pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end {pmatrix}$

Let $\mathbf E$ denote the elementary row matrix corresponding to $e$.

$\mathbf E$ is constructed by exchanging row $1$ with row $2$.

$\blacksquare$