By using *pivot positions* and basic
row operations,
the following procedure produces a *reduced echelon form (REF)*.

- Work downward and to the right to reach an echelon form.
- Work upward and to the left to yield a reduced echelon form.

The size of pivot positions used in the above procedure is called the rank of , denoted by rank.

EXAMPLE 1. Apply row operations to reduce the following matrix to an echelon form.

EXAMPLE 2. Apply row operations to transform the following matrix first into an echelon form, and then reduce it into the reduced echelon form.

Matlab comes with a `rref` function for row reducing matrices.
For Octave you can download
`rref.m`
from our web site,
and place it into your working directory.
Provided an augmented matrix `A`, type

> rref(A)which produces a REF.

In Matlab/Octave
the function `rank(A)` can be called to
compute the rank of matrix `A`.

Department of Mathematics