Row Space, Column Space, and Null Space: The Big Picture

Every matrix carries three fundamental subspaces baked into its structure. Understanding what those subspaces are, where they live, and how their dimensions connect is one of the most clarifying moments in a first linear algebra course.

What These Three Subspaces Are

A matrix A with m rows and n columns defines three vector spaces simultaneously. They describe, in different ways, what the matrix does as a linear transformation.

Row space is the span of A's row vectors. It lives in R^n (the same dimension as the columns of A, since each row has n entries). Any linear combination of the rows belongs to the row space.

Column space (sometimes called the range or image) is the span of A's column vectors. It lives in R^m (the same dimension as the rows of A, since each column has m entries). The column space answers a practical question: for which vectors b does the system Ax = b have a solution? Exactly those b that lie in the column space.

Null space (also called the kernel) is the set of all vectors x satisfying Ax = 0. It lives in R^n, the same space as the row space. Every solution to the homogeneous system belongs to the null space.

Dimensions and the Rank-Nullity Theorem

Here is where the three subspaces click together. Define the rank of A as the number of pivot positions in its RREF. Then:

That last equation is the rank-nullity theorem: rank + nullity = n. The rank counts how many "independent directions" the matrix captures; the nullity counts how many are lost (collapsed to zero).

One fact surprises many students: the row space and column space always have the same dimension, even though they live in completely different ambient spaces (R^n vs R^m). The rank is a single number that describes both.

SubspaceLives inDimensionBasis from RREF
Row spaceR^nrankNonzero rows of RREF
Column spaceR^mrankPivot columns of original A
Null spaceR^nn - rankParametric solution vectors

Finding All Three from RREF: A Worked Example

Take the matrix:

A = [ 1  2  0  1 ]
    [ 2  4  1  3 ]
    [ 0  0  1  1 ]

This is a 3x4 matrix, so m = 3 and n = 4.

Step 1: Row-reduce to RREF.

Subtract 2 times row 1 from row 2:

[ 1  2  0  1 ]
[ 0  0  1  1 ]
[ 0  0  1  1 ]

Subtract row 2 from row 3:

[ 1  2  0  1 ]
[ 0  0  1  1 ]
[ 0  0  0  0 ]

This is already RREF. Pivots sit in columns 1 and 3. Rank = 2. Nullity = 4 - 2 = 2.

Row space basis: Take the nonzero rows of the RREF directly:

v1 = [1, 2, 0, 1]
v2 = [0, 0, 1, 1]

These two vectors span the row space in R^4. A common mistake is reading the row space basis from the original matrix instead of the RREF. Row operations preserve the row space, so the RREF rows are correct. They are not a basis for the original rows, but they are a valid basis for the same subspace.

Column space basis: Pivot columns are columns 1 and 3. Pull those from the original matrix A (not the RREF):

c1 = [1, 2, 0]
c3 = [0, 1, 1]

These live in R^3. This is the critical rule: find a basis for the column space by looking at which columns are pivot columns in the RREF, then taking those columns from the original matrix. The RREF column vectors themselves are not generally valid column space bases for A.

Null space basis: Solve Ax = 0 using the RREF. Variables x1 and x3 are pivot (basic) variables; x2 and x4 are free. Set x2 = s and x4 = t.

From row 2: x3 + x4 = 0, so x3 = -t. From row 1: x1 + 2x2 + x4 = 0, so x1 = -2s - t.

The general solution:

x = s[-2, 1, 0, 0] + t[-1, 0, -1, 1]

The null space basis is:

n1 = [-2, 1,  0, 0]
n2 = [-1, 0, -1, 1]

Both live in R^4. Dimension check: 2 + 2 = 4 = n. The rank-nullity theorem holds.

Why the Column Basis Comes from the Original Matrix

This trips people up consistently. After row reduction, the column relationships are preserved but the actual column vectors change. The RREF tells you which columns are linearly independent (the pivot ones), but the actual basis vectors for the column space of A must come from A itself.

To put it concretely: the column space of the RREF is not the same subspace as the column space of A. Row operations change column spaces. They do not change row spaces or null spaces.

Orthogonality Between the Subspaces

There is a deeper geometric structure here. The row space and null space of A are orthogonal complements in R^n. Every vector in the null space is perpendicular to every vector in the row space, and together they span all of R^n. The same relationship holds between the column space and the left null space (null space of A^T) in R^m. These four subspaces, two pairs of orthogonal complements, are the fundamental theorem of linear algebra as Gilbert Strang frames it.

For the example above, you can verify: dot n1 = [-2, 1, 0, 0] with v1 = [1, 2, 0, 1]: (-2)(1) + (1)(2) + (0)(0) + (0)(1) = 0. Same with n2 and v2. Orthogonality confirmed.

Knowing the Rank Tells You Almost Everything

Finding the rank is the central computation. Once you have the rank r and the matrix dimensions m and n, you know the dimension of every fundamental subspace without any further work. The RREF then hands you explicit bases, not just dimensions. That combination, dimensions from rank, basis vectors from RREF, is what makes row reduction such a powerful single procedure.

Frequently asked questions

Do the row space and column space always have the same dimension?

Yes. Both dimensions equal the rank of the matrix, regardless of whether the matrix is square, tall, or wide. A 3x7 matrix with rank 2 has a 2-dimensional row space in R^7 and a 2-dimensional column space in R^3.

Can the null space ever be just the zero vector?

Yes. When the rank equals n (the number of columns), the nullity is n - n = 0. The null space contains only the zero vector. This happens exactly when Ax = b has at most one solution for any b, which is the condition for A to have linearly independent columns.

Why do we use the original matrix to find the column space basis?

Row operations alter the individual column vectors while preserving which ones are linearly dependent. The pivot positions found in the RREF tell you the indices of a maximal linearly independent set of columns in A. Those same-indexed columns from A form the basis. Taking them from the RREF would give a basis for the RREF's column space, a different subspace.

How does the null space relate to solving Ax = b?

If Ax = b has one particular solution p, then every solution has the form x = p + h where h is any vector in the null space. The null space parametrizes the non-uniqueness. A unique solution exists only when the null space is trivial (dimension zero).