For any matrix, we have seen that we can associate several subspaces — the null space (Theorem NSMS), the column space (Theorem CSMS), row space (Theorem RSMS) and the left null space (Theorem LNSMS). As vector spaces, each of these has a dimension, and for the null space and column space, they are important enough to warrant names.
Suppose that $A$ is an $m\times n$ matrix. Then the nullity of $A$ is the dimension of the null space of $A$, $\nullity{A}=\dimension{\nsp{A}}$.
Suppose that $A$ is an $m\times n$ matrix. Then the rank of $A$ is the dimension of the column space of $A$, $\rank{A}=\dimension{\csp{A}}$.
There were no accidents or coincidences in the previous example — with the row-reduced version of a matrix in hand, the rank and nullity are easy to compute.
Suppose that $A$ is an $m\times n$ matrix and $B$ is a row-equivalent matrix in reduced row-echelon form. Let $r$ denote the number of pivot columns (or the number of nonzero rows). Then $\rank{A}=r$ and $\nullity{A}=n-r$.
Every archetype (Archetypes) that involves a matrix lists its rank and nullity. You may have noticed as you studied the archetypes that the larger the column space is the smaller the null space is. A simple corollary states this trade-off succinctly. (See Proof Technique LC.)
Suppose that $A$ is an $m\times n$ matrix. Then $\rank{A}+\nullity{A}=n$.
When we first introduced $r$ as our standard notation for the number of nonzero rows in a matrix in reduced row-echelon form you might have thought $r$ stood for “rows.” Not really — it stands for “rank”!