Dimension and rank

Every basis of a subspace has the same number of vectors, its dimension, and since each column of $A$ either has a pivot or gives a free variable, the rank plus the nullity is the number of columns.

From Linear Algebra.