Reduced Row Echelon FormA matrix can be reduced to a row echelon form by a combination of row operations that start with a pivot position at the topleft element and subtract multiples of the pivot row from following rows so that all entries in the column below the pivot are zero. The next pivot is chosen by going to the next row and column. If this pivot is zero and any nonzero entries are in the column beneath, the rows are exchanged and the process is repeated. The process finishes when the last row or column is reached. A matrix is in row echelon form if any row that consists entirely of zeros is followed only by other zero rows and if the first nonzero entry in row is in the column , then elements in columns from 1 to in all rows below are zero. The row echelon form is not unique but its form (in the sense of the positions of the pivots) is unique. It also gives a way to determine the rank of a matrix as the number of nonzero rows. A matrix is in reduced row echelon form if it is in row echelon form, each pivot is one, and all the entries above (and below) each pivot are zero. It can be formed by a procedure similar to the procedure for the row echelon form, also taking steps to reduce the pivot to one (by division) and reduce entries in the column above each pivot to zero (by subtracting multiples of the current pivot row). The reduced row echelon form of a matrix is unique. The reduced row echelon form (and row echelon form) give a way to determine the rank of a matrix as the number of nonzero rows. In Mathematica the reduced row echelon form of a matrix can be computed by the function RowReduce. The reduced row echelon form of this matrix only has one nonzero row. This means that the rank is 1. In[11]:= 
Out[12]//MatrixForm=

This is a 32 random matrix whose columns are linearly independent. In[13]:= 
Out[14]//MatrixForm=

The reduced row echelon form has two nonzero rows, thus its rank should be 2. In[15]:= 
Out[15]//MatrixForm=

MatrixRank also computes the rank as 2. In[16]:= 
Out[16]=

The reduced row echelon form of the transpose of the matrix also has two nonzero rows. This is consistent with the fact that the rank of a matrix is equal to the rank of its transpose, even when the matrix is rectangular. In[17]:= 
Out[17]//MatrixForm=

