Rank
The rank of a matrix is the number of pivots and the number of dimensions that the column space of a matrix occupies.
Rank and Dimension
A matrix with n dimensions exists in Rn space. However, the column space of that same matrix does not necessarily exist in the same number of dimensions.
Consider a matrix A like:
┌ ┐ │ 1 2 3│ │ 1 3 4│ │ 1 4 5│ └ ┘
The third column vector can be trivially shown to not be independent; it is a sum of the first and second column vectors. Correspondingly, the eliminated form of the matrix has two pivots and a free variable. As a direct consequence of this being a square matrix (n x n), this also means that there are two pivot rows and a zero row.
┌ ┐ │ [1] 2 3│ │ 0 [1] 1│ │ 0 0 0│ └ ┘
A is not a basis for R3 space. The requirements for a basis are that each column be independent and that the matrix span all dimensions.
However, this matrix does contain two independent columns. If those are split off like:
┌ ┐ │ 1 2│ │ 1 3│ │ 1 4│ └ ┘
Then this new matrix is a basis for the column space of A (sometimes notated as C(A)), which happens to be 2 dimensional.
Effectively, this matrix expresses a 2-dimensional plane that exists within a 3-dimensional space, but it is bound to that plane and cannot vary across the third dimension.
Categories for Solutions
If a matrix has a pivot in each column, it is said to be full column rank. The only null space is the zero vector (i.e. [0 ...]). Ax = b either has one solution or is not solvable. Incidentally, the reduced row echelon form (R) looks like the identity matrix (I) with some number of zero rows.
If a matrix has a pivot in each row, it is said to be full row rank. This only means that Ax = b can be solved for any b.
If a square matrix has full rank, the reduced row echelon form (R) of the matrix is the identity matrix (I). The only null space is the zero vector; Ax = b can be solved for any b; there is exactly one solution for any given b.
If a matrix is none of the above, Ax = b either can be solved for any b or is not solvable.