Rank Counts Dimensions in Two Different Ambient Spaces
An \(m\times n\) matrix acts on vectors in \(\mathbb{R}^n\) and produces vectors in \(\mathbb{R}^m\). Its four fundamental subspaces therefore live in two different spaces: the column space and left null space are subspaces of \(\mathbb{R}^m\), while the row space and null space are subspaces of \(\mathbb{R}^n\). Rank determines the dimensions of all four, but the relevant ambient dimension depends on which subspace is being considered.
Throughout, let \(\mathbf{A}\in\mathbb{R}^{m\times n}\), and let \(r=\operatorname{rank}\mathbf{A}\). The rank is the dimension of the column space. The column space consists of all linear combinations of the columns of \(\mathbf{A}\). The row space consists of all linear combinations of its rows, viewed as vectors in \(\mathbb{R}^n\). The null space is the set of vectors \(\mathbf{x}\in\mathbb{R}^n\) satisfying \(\mathbf{A}\mathbf{x}=\mathbf{0}\). The left null space is the set of vectors \(\mathbf{y}\in\mathbb{R}^m\) satisfying \(\mathbf{A}^{\top}\mathbf{y}=\mathbf{0}\).
The two null-space formulas have different ambient dimensions because their vectors have different lengths. A vector in \(\operatorname{Nul}\mathbf{A}\) has \(n\) entries; one in the left null space has \(m\) entries. The theorem’s proof uses the Matrix Rank-Nullity Theorem and the result that a matrix and its transpose have the same rank, established in the earlier material on rank and transpose.
Why Each Dimension Formula Holds
Proof. By the definition of rank, \(\dim(\operatorname{Col}\mathbf{A})=\operatorname{rank}\mathbf{A}=r\). To obtain the row-space dimension, observe that the columns of \(\mathbf{A}^{\top}\) are the transposes of the rows of \(\mathbf{A}\). Transposing a row vector to a column vector preserves linear combinations and linear independence: a linear combination of the rows is zero exactly when the same coefficients give a zero combination of their transposes. Thus the row space and \(\operatorname{Col}\mathbf{A}^{\top}\) have the same dimension. By the previously established equality \(\operatorname{rank}\mathbf{A}^{\top}=\operatorname{rank}\mathbf{A}=r\), this dimension is \(r\).
Next apply the Matrix Rank-Nullity Theorem to the linear map \(\mathbf{x}\mapsto\mathbf{A}\mathbf{x}\) from \(\mathbb{R}^n\) to \(\mathbb{R}^m\). It states that the dimension of the kernel plus the dimension of the image equals the dimension of the domain. Here the kernel is \(\operatorname{Nul}\mathbf{A}\), the image is \(\operatorname{Col}\mathbf{A}\), and the domain has dimension \(n\). Therefore \(\dim(\operatorname{Nul}\mathbf{A})+r=n\), so \(\dim(\operatorname{Nul}\mathbf{A})=n-r\). Apply the same theorem to \(\mathbf{A}^{\top}\), whose domain is \(\mathbb{R}^m\), whose image has dimension \(\operatorname{rank}\mathbf{A}^{\top}=r\), and whose kernel is the left null space. This gives \(\dim(\operatorname{Nul}\mathbf{A}^{\top})+r=m\), hence \(\dim(\operatorname{Nul}\mathbf{A}^{\top})=m-r\). \(\square\)
This proof uses rank-nullity twice, once for each domain. It does not assume that \(\mathbf{A}\) is square or invertible. In particular, \(r\) is bounded above by both \(m\) and \(n\), so both null-space dimensions are nonnegative. The formulas also show that the dimensions add in pairs: the column-space and left-null dimensions sum to \(m\), while the row-space and null-space dimensions sum to \(n\).
Worked Example: A Wide Matrix with Rank Two
Find bases for the four fundamental subspaces of \(\mathbf{A}=\begin{bmatrix}1&2&0&1\\0&1&1&1\\1&3&1&2\end{bmatrix}\), and check their dimensions.
Write the columns as \(\mathbf{a}_1,\mathbf{a}_2,\mathbf{a}_3,\mathbf{a}_4\). They are \(\mathbf{a}_1=(1,0,1)^{\top}\), \(\mathbf{a}_2=(2,1,3)^{\top}\), \(\mathbf{a}_3=(0,1,1)^{\top}\), and \(\mathbf{a}_4=(1,1,2)^{\top}\). Directly, \(\mathbf{a}_3=\mathbf{a}_2-2\mathbf{a}_1\) and \(\mathbf{a}_4=\mathbf{a}_2-\mathbf{a}_1\). The first two columns are independent: if \(c_1\mathbf{a}_1+c_2\mathbf{a}_2=\mathbf{0}\), the second coordinate gives \(c_2=0\), and then the first gives \(c_1=0\). Thus they form a basis for the column space, \(r=2\), and \(\dim(\operatorname{Col}\mathbf{A})=2\).
The rows are \(\mathbf{r}_1=(1,2,0,1)\), \(\mathbf{r}_2=(0,1,1,1)\), and \(\mathbf{r}_3=(1,3,1,2)\), with \(\mathbf{r}_3=\mathbf{r}_1+\mathbf{r}_2\). The first two are independent: in \(c_1\mathbf{r}_1+c_2\mathbf{r}_2=\mathbf{0}\), coordinate 1 forces \(c_1=0\), and coordinate 3 then forces \(c_2=0\). Hence \(\{\mathbf{r}_1,\mathbf{r}_2\}\) is a row-space basis, and its dimension is \(2\).
For the null space, the equation \(\mathbf{A}\mathbf{x}=\mathbf{0}\) reduces to \(x_1+2x_2+x_4=0\) and \(x_2+x_3+x_4=0\); the third row gives the sum of these equations. Put \(x_3=s\) and \(x_4=t\). Then \(x_2=-s-t\) and \(x_1=2s+t\), so \(\mathbf{x}=s(2,-1,1,0)^{\top}+t(1,-1,0,1)^{\top}\). The two displayed vectors are independent because their third and fourth coordinates force the respective coefficients to be zero in any zero combination. They form a basis, so the nullity is \(2=4-2\).
For the left null space, solve \(\mathbf{A}^{\top}\mathbf{y}=\mathbf{0}\), where \(\mathbf{y}=(y_1,y_2,y_3)^{\top}\). The equations include \(y_1+y_3=0\) and \(2y_1+y_2+3y_3=0\); substituting \(y_3=-y_1\) gives \(y_2=y_1\). The remaining equations are then satisfied, so \(\mathbf{y}=y_1(1,1,-1)^{\top}\). The vector is nonzero and directly satisfies the system, so it is a basis for the left null space, which has dimension \(1=3-2\).
Check: Multiplying the proposed null-space vectors by \(\mathbf{A}\) gives \(\mathbf{A}(2,-1,1,0)^{\top}=(0,0,0)^{\top}\) and \(\mathbf{A}(1,-1,0,1)^{\top}=(0,0,0)^{\top}\). Also \(\mathbf{A}^{\top}(1,1,-1)^{\top}=(0,0,0,0)^{\top}\). The four dimensions are \(2,2,2,1\), in column-space, row-space, null-space, and left-null-space order.
Orthogonality Explains the Pairings
The dimensions pair naturally because the null space is orthogonal to the row space, and the left null space is orthogonal to the column space. Here orthogonal means that the dot product of every vector from one subspace with every vector from the other is zero. The following statements identify these relationships directly, without needing to compare their dimensions.
Proof. Let \(\mathbf{x}\in\mathbb{R}^n\), and let \(\mathbf{r}_i\) be row \(i\) of \(\mathbf{A}\), viewed as a vector in \(\mathbb{R}^n\). The \(i\)th entry of \(\mathbf{A}\mathbf{x}\) is \(\mathbf{r}_i\cdot\mathbf{x}\). Thus \(\mathbf{A}\mathbf{x}=\mathbf{0}\) exactly when \(\mathbf{x}\) is orthogonal to every row. Being orthogonal to every row is equivalent to being orthogonal to every linear combination of the rows, which is exactly membership in \((\operatorname{Row}\mathbf{A})^{\perp}\). This proves the first equality in both directions. Now let \(\mathbf{y}\in\mathbb{R}^m\). The \(j\)th entry of \(\mathbf{A}^{\top}\mathbf{y}\) is the dot product of \(\mathbf{y}\) with column \(j\) of \(\mathbf{A}\). Therefore \(\mathbf{A}^{\top}\mathbf{y}=\mathbf{0}\) exactly when \(\mathbf{y}\) is orthogonal to every column, and hence to every linear combination of columns. This is precisely membership in \((\operatorname{Col}\mathbf{A})^{\perp}\), proving the second equality in both directions. \(\square\)
These equalities help interpret the dimension formulas: vectors in the null space satisfy all the equations imposed by the rows, while vectors in the left null space give zero dot product with every reachable output \(\mathbf{A}\mathbf{x}\). They are also a useful independent check on calculations, since a proposed null-space basis must be orthogonal to each row, and a proposed left-null basis must be orthogonal to each column.
Worked Example: A Tall Matrix with Full Column Rank
Consider \(\mathbf{B}=\begin{bmatrix}1&0\\0&1\\1&1\end{bmatrix}\), an element of \(\mathbb{R}^{3\times2}\). Its columns are \(\mathbf{b}_1=(1,0,1)^{\top}\) and \(\mathbf{b}_2=(0,1,1)^{\top}\). If \(c_1\mathbf{b}_1+c_2\mathbf{b}_2=\mathbf{0}\), the first coordinate gives \(c_1=0\), and the second gives \(c_2=0\). The columns are independent, so \(r=2\) and they form a column-space basis.
The rows \((1,0)\) and \((0,1)\) already span \(\mathbb{R}^2\), and the third row \((1,1)\) is their sum. Thus the row space has basis \(\{(1,0),(0,1)\}\) and dimension \(2\). Solve \(\mathbf{B}\mathbf{x}=\mathbf{0}\): its first two equations are \(x_1=0\) and \(x_2=0\), so the null space is \(\{\mathbf{0}\}\) and has dimension \(0=2-2\).
For the left null space, write \(\mathbf{y}=(y_1,y_2,y_3)^{\top}\). Then \(\mathbf{B}^{\top}\mathbf{y}=(y_1+y_3,y_2+y_3)^{\top}\). Setting this to zero gives \(y_1=-y_3\) and \(y_2=-y_3\), so the left null space has basis \(\{(-1,-1,1)^{\top}\}\) and dimension \(1=3-2\).
Check: \(\mathbf{B}^{\top}(-1,-1,1)^{\top}=(0,0)^{\top}\). The four dimensions are \(2,2,0,1\); the zero nullity is consistent with the two independent columns.
A Rank-Deficient Matrix with Two Null Directions
Worked Example: A Matrix with Proportional Rows
Let \(\mathbf{C}=\begin{bmatrix}1&2&3\\2&4&6\end{bmatrix}\). Its columns are \((1,2)^{\top}\), \((2,4)^{\top}\), and \((3,6)^{\top}\), all multiples of the first nonzero column. Thus the column space has basis \(\{(1,2)^{\top}\}\) and rank \(r=1\). Its two rows are also proportional, so the row space has basis \(\{(1,2,3)\}\), of dimension \(1\).
The equation \(\mathbf{C}\mathbf{x}=\mathbf{0}\) is the single independent equation \(x_1+2x_2+3x_3=0\). Taking \(x_2=s\) and \(x_3=t\) gives \(x_1=-2s-3t\), hence \(\mathbf{x}=s(-2,1,0)^{\top}+t(-3,0,1)^{\top}\). The two vectors are independent, since their second and third coordinates force \(s=t=0\) in a zero combination. They form a null-space basis, giving dimension \(2=3-1\).
For the left null space, \(\mathbf{C}^{\top}\mathbf{y}=\mathbf{0}\) gives \(y_1+2y_2=0\), with the other two equations equal to twice and three times this one. Therefore its basis is \(\{(-2,1)^{\top}\}\), and its dimension is \(1=2-1\).
Check: \(\mathbf{C}(-2,1,0)^{\top}=(0,0)^{\top}\) and \(\mathbf{C}(-3,0,1)^{\top}=(0,0)^{\top}\). Also \(\mathbf{C}^{\top}(-2,1)^{\top}=(0,0,0)^{\top}\), as required.
Common Mistake: Using the Wrong Ambient Dimension
A frequent error is to subtract rank from the wrong matrix size. For the \(3\times4\) matrix in the first example, \(m=3\), \(n=4\), and \(r=2\). The incorrect calculation “nullity \(=m-r=3-2=1\)” confuses the null space with the left null space. The correction is to check the domain: \(\mathbf{A}\mathbf{x}=\mathbf{0}\) has four-entry unknown vectors, so its nullity is \(n-r=4-2=2\). The transposed system has three-entry unknown vectors, so its left nullity is \(m-r=3-2=1\).
Another useful check is that the dimensions of the row space and null space must add to \(n\), while those of the column space and left null space must add to \(m\). For this matrix, \(2+2=4\) and \(2+1=3\). If a calculation does not satisfy these sums, first check which space the vectors belong to and whether \(m\) or \(n\) is the relevant ambient dimension.
Check Your Understanding
Use the dimensions and definitions above to answer each question. When a basis is requested, verify its vectors by substitution.
- An \(m\times n\) matrix has rank \(r\). State the dimensions of its row space and null space, and identify the ambient space for each.
- A \(4\times3\) matrix has rank \(2\). What are the dimensions of its column space, row space, null space, and left null space, in that order?
- For \(\mathbf{D}=\begin{bmatrix}1&0\\0&1\\2&1\end{bmatrix}\), find a basis for the left null space and check it by multiplying by \(\mathbf{D}^{\top}\).
- Explain why \(\dim(\operatorname{Row}\mathbf{A})=\operatorname{rank}\mathbf{A}\) follows from the transpose and the equality of the ranks of \(\mathbf{A}\) and \(\mathbf{A}^{\top}\).
- For a \(2\times5\) matrix of rank \(2\), calculate both nullities and explain why they need not be equal.