By definition, a square matrix derived by applying an elementary row operation to the identity matrix is an elementary matrix. Since elementary matrices are very useful tools in matrix computations, we dedicate a post to this kind of special matrices.

Elementary matrices have the following interesting property:

Let \(E\) be an \(m \times m\) elementary matrix obtained from the performance of an elementary row operation \(O\) on the identity matrix \(I_m\). The result of performing the elementary row operation \(O\) on an \(m \times n\) matrix \(A\) is the same the matrix \(EA\). We review this result using some examples.

#### Examples of elementary matrices

We explain the above comment by some \(3 \times 3\) matrix examples.

- Permutation row operation: consider the elementary row operation which permutes the first row and the second row of a \(3 \times 3\) matrix. The elementary matrix obtained from this elementary row operation is as follows: $$ E = \begin{pmatrix} 0 & 1 & 0\\ 1 & 0 & 0 \\ 0 & 0 & 1 \end{pmatrix}.$$ Let $$ A = \begin{pmatrix} a & b & c\\ d & e & f \\ g & h & i \end{pmatrix}$$ be an arbitrary \(3 \times 3\) real matrix. It is easy to see that $$EA = \begin{pmatrix} d & e & f\\ a & b & c \\ g & h & i \end{pmatrix}.$$
- Scaling row operation: let \(r\) be a nonzero real number and multiply the first row of the identity matrix by \(r\). The obtained matrix is: $$E’ = \begin{pmatrix} r & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix}.$$ Now, if we multiply \(E’\) by \(A\), we have $$E’A = \begin{pmatrix} ra & rb & rc\\ d & e & f \\ g & h & i \end{pmatrix}.$$
- Replacement row operation: add to the first row of a \(3 \times 3\) matrix, the second row and replace by the first. If we do this operation on the identity matrix \(I_3\), the resulting matrix is: $$ E^{\prime\prime} = \begin{pmatrix} 1 & 1 & 0\\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix}.$$ Multiply \(E^{\prime\prime}\) by \(A\): $$E^{\prime\prime} A = \begin{pmatrix} a+d & b+e & c+f\\ d & e & f \\ g & h & i \end{pmatrix}.$$

**Remark**. For a refresher on the elementary row operations, refer to the post on Gaussian elimination.

#### A property of elementary matrices: each elementary matrix is invertible

Note that each elementary row operation is reversible (see Gaussian elimination). From this, the reader may deduce that each elementary matrix is invertible (prove it!). Now, with the help of this result we show the following:

**Result**. Assume that we have applied a sequence of elementary row operations to reach from an \(n \times n\) matrix \(A\) to the identity matrix \(I_n\). Then,

- The matrix \(A\) is invertible.
- Exactly the same sequence of elementary row operations will help us to reach from \(I_n\) to the inverse of \(A\).

The proof is as follows:

Suppose that there are some elementary row operations applied to the matrix \(A\) to reach the identity matrix \(I\). This means that there are, say \(m\) elementary matrices $$E_1, E_2, \dots, E_m$$ such that the following statements hold:

(1): \(A\) is row equivalent to \(E_1 A\).

(2): \(E_1 A\) is row equivalent to \(E_2 E_1 A\).

(m): \(E_{m-1} \dots E_2 E_1A\) is row equivalent to $$(E_m \dots E_2 E_1)A = I.$$

Observe that each elementary matrix is invertible. Therefore, $$E = E_m \dots E_2 E_1$$ is also invertible. From \(EA = I\) and invertibility of \(E\), we see that $$E^{-1} = E^{-1} I = E^{-1} EA = A.$$ So, \(A\) is invertible. Now, observe that $$A^{-1} = (E^{-1})^{-1} = E = E I = $$ $$E_m \dots E_2 E_1 I.$$ This says that the inverse of \(A\) can be obtained by applying the elementary row operations \(E_i\)s successively on \(I\).