# Elementary matrix

An elementary matrix is a square matrix that has been obtained by performing an elementary row or column operation on an identity matrix.

## Definition

Remember that there are three types of elementary row operations:

1. interchange two rows;

2. multiply a row by a non-zero constant;

3. add a multiple of one row to another row.

Elementary column operations are defined similarly (interchange, addition and multiplication are performed on columns).

When elementary operations are carried out on identity matrices they give rise to so-called elementary matrices.

Definition A matrix is said to be an elementary matrix if and only if it is obtained by performing an elementary (row or column) operation on the identity matrix .

## Examples

Some examples of elementary matrices follow.

Example If we take the identity matrix and multiply its first row by , we obtain the elementary matrix

Example If we take the identity matrix and add twice its second column to the third, we obtain the elementary matrix

Example If we take the identity matrix and interchange its two columns, we obtain the elementary matrix

## How elementary matrices act on other matrices

As we have already explained, elementary matrices can be used to perform elementary operations on other matrices. The following two procedures are equivalent:

1. perform an elementary operation on a matrix ;

2. perform the same operation on and obtain an elementary matrix ; pre-multiply by if it is a row operation, or post-multiply by if it is a column operation.

## Representation as rank one update

It is possible to represent elementary matrices as rank one updates to the identity matrix.

Proposition Any elementary matrix can be written aswhere and are two column vectors and

Proof

Denote by the columns of the identity matrix (i.e., the vectors of the standard basis). We prove this proposition by showing how to set and in order to obtain all the possible elementary operations. Let us start from row and column interchanges. SetThen, is a matrix whose entries are all zero, except for the following entries:As a consequence, is the result of interchanging the -th and -th row of the identity matrix (or the -th and -th column). Note that , so that . Let us now find how to multiply a row or a column by a non-zero constant . SetThen, is a matrix whose entries are all zero, except for one entry:As a consequence, is the result of multiplying the -th row (or column) by . Note thatwhich is different from zero because was assumed to be. Let us now find how to add a multiple of one row (or column) to another. SetThen, is a matrix whose entries are all zero, except for one entry:Thus, is the result of adding times the -th row to the -th (or adding times the -th column to the -th). In this case, , so that .

## Invertibility

As we have proved in the lecture on Matrix inversion lemmas, when the conditionis satisfied, rank one updates to the identity matrix are invertible and

Therefore, elementary matrices are always invertible.

Furthermore, the inverse of an elementary matrix is also an elementary matrix. As far as row operations are concerned, this can be seen as follows:

1. if has been obtained by multiplying a row of the identity matrix by a non-zero constant, then is computed by multiplying the same row of the identity matrix by the reciprocal of that constant;

2. if has been obtained by adding a multiple of row to row of the identity matrix, then is calculated by subtracting the same multiple of row from row of the identity matrix;

3. if is the result of interchanging rows and of the identity matrix, then is obtained by interchanging the same rows of the identity matrix again.

Similar statements are valid for column operations (we just need to replace rows with columns in the three points above).