**Elementary matrices:** Let e denote an elementary row operation and let e(A) denote the result of applying the operation e to matrix. Now let *E* be the matrix obtained by applying to the identity matrix I, that is,

*E = e(I*)

Then E is called the elementary matrix corresponding to the elementary row operation *e. *

Note that E is always a square matrix.

Application to finding the inverse of an *n×n *matrix

The following algorithm finds the inverse of a matrix

**Algorithm:** The input is a square matrix A. The output is the inverse of A or that the inverse does not exist.

Step 1: From the *n×2n *(block) matrix *M= [A,I], *where A is the left half of *M* and the identity matrix *I* is the right half of *M.*

Step 2: Row reduce* M *to echelon form. If the process generate a zero row in the *A *half of *M*, then

STOP

A has no inverse.( Otherwise A is an triangular form).

Step 3: Further row reduce to *M* to its canonical form *M**~[I,B]*

Where the identity matrix *I *has replaced* A *in the left half of *M.*

Step 4: Set *A ^{-1}=B, *the matrix that is now in the right half of

*M.*

The justification for the above algorithm is as follows. Suppose A is invertible and, say, the sequence of elementary row operations *e _{1}, e_{2}, —-, e_{q}* applied to

*M = [A,I]*reduce the left half of

*M*, which is

*A*, to the identity matrix

*I*. Let

*E*be the elementary matrix corresponding to the operation

_{i}*e*Then, by applying

_{i}.[“ Let e be an elementary row operation and let E be the corresponding m×n elementary matrix. Thene(A) = EA;whereAis anym×nmatrix”.]

and we get

*E _{q}, ———-, E_{2}, E_{1}A = I or, (E_{q}, ———-, E_{2}, E_{1}I) A=I,*

so *A ^{‑1}= E_{q}, ———-, E_{2}, E_{1}I*

that is, A^{-1} can be obtained by applying the elementary row operations

*e _{1}, e_{2}, —-, e_{q} *to the identity matrix

*I,*which appears in the right half of

*M*. Thus

*B= A*as claimed.

^{-1},**Elementary column operations:** Now let *A* be a matrix with columns *C _{1}, C_{2}, ….., C_{n}. *The following operation on

*A,*analogous to the elementary row operations, are called elementary column operations:

_{1}] (Column interchange): Interchange column

*C*and

_{i}*C*. [F

_{j}_{1}] (Column scaling): Replace

*C*by

_{i}*kC*(where

_{i}*k≠0)*[F

_{1}] (Column addition): Replace

*C*by

_{j}*kC*

_{i}+C_{j}We may indicate each of the column operations by writing, respectively,

*(1) C _{i}*

*⟷*

*C*

_{j}(2) k*C*

_{i}*⟶*

*C*

_{j}(3) (k*C*

_{i}*+C*

_{j})*⟶*

*C*

_{j}Moreover each column operation has an inverse operation of the same type, just like the corresponding row operation.

Now let *f *denote an elementary column operation, and let F be the matrix obtained by applying *f* to the identity matrix *I,* that is,

*F = f(I)*

Then *F* is called the elementary matrix corresponding to the elementary column operation *f*. Note that* F *is always a square matrix.