The rank of a matrix is the dimension of its row or column space (both will be the same). Now, you could find a basis for the row space, and then the number of elements in the basis will be the rank of the matrix. To find a basis for the row space, you can use the fact that the nonzero rows of a matrix in row-echelon that is row-equivalent to another matrix A will actually form a basis for the row space of A.

So, for example:

Put A in row echelon form to get:

Now, since has two nonzero rows, you can conclude that .

However, once you know the nullspace of a matrix, you usually don't need to go through the above process to find the rank.

To find the nullspace of A, simply solve the system .

For example, using the same matrix:

Augment this matrix with the 0 column vector and reduce:

So,

The dimension of the nullspace is called the nullity. Knowing the nullity of a matrix allows you to find the rank very easily, without finding the row or column space: For any matrix, .

For our matrix, we see that , which agrees with what we found earlier.

I hope that helped!