stylistic:style_transfer
Rank from row echelon forms

A common approach to finding the rank of a matrix is to reduce it to a simpler form, generally row echelon form, by elementary row operations. Row operations do not change the row space (hence do not change the row rank), and, being invertible, map the column space to an isomorphic space (hence do not change the column rank). Once in row echelon form, the rank is clearly the same for both row rank and column rank, and equals the number of pivots (or basic columns) and also the number of non-zero rows.

For example, the matrix A given by

can be put in reduced row-echelon form by using the following elementary row operations:

The final matrix (in reduced row echelon form) has two non-zero rows and thus the rank of matrix A is 2.