Row and Column Spaces

Basis
Last updated: Tags: Linear Algebra

Prerequisites

Every matrix stores two natural families of vectors: its rows and its columns. The span of the rows and the span of the columns are both important subspaces, and they encode which linear systems are solvable and how much “reach” the matrix has. The surprising fact — not obvious at first glance — is that these two spans, living in completely different spaces, always have the same dimension.

Row space and column space

For an m×nm \times n matrix AA over a field FF, write r1,,rmFnr_1, \ldots, r_m \in F^n for its row vectors and c1,,cnFmc_1, \ldots, c_n \in F^m for its column vectors.

  • The row space of AA is row(A)span(r1,,rm)Fn\text{row}(A) \coloneqq \text{span}(r_1, \ldots, r_m) \subseteq F^n.
  • The column space of AA is col(A)span(c1,,cn)Fm\text{col}(A) \coloneqq \text{span}(c_1, \ldots, c_n) \subseteq F^m.

Both are linear subspaces of their respective ambient spaces, because the span of any set of vectors is always a subspace. Note the different homes: the row space lives in FnF^n (as many coordinates as columns), while the column space lives in FmF^m (as many coordinates as rows).

What the column space tells you

The product AxAx is a linear combination of the columns of AA:

Ax=x1c1+x2c2++xncn.Ax = x_1\,c_1 + x_2\,c_2 + \cdots + x_n\,c_n.

So as xx ranges over all of FnF^n, AxAx ranges over all of col(A)\text{col}(A). This gives a clean solvability criterion:

Ax=b has a solution    bcol(A).Ax = b \text{ has a solution} \iff b \in \text{col}(A).

If bb is outside the column space, the system is inconsistent — no combination of the columns can produce bb.

Row operations preserve the row space

The key tool for computing with row and column spaces is Gauss-Jordan elimination. Here is how it interacts with each space.

Every elementary row operation (swap two rows; multiply a row by a nonzero scalar; add a multiple of one row to another) replaces the set of rows with a new set whose spans are identical. Why? Because each operation is invertible and produces rows that are linear combinations of the old rows — and the old rows are recoverable as linear combinations of the new ones. Since the span only depends on what linear combinations are achievable, the span does not change.

Consequence: The row space is invariant under row operations. In particular, the nonzero rows of the reduced row echelon form (RREF) of AA form a basis for row(A)\text{row}(A) — they span the same space and are clearly linearly independent (each has a leading 1 in a column where all other nonzero rows have 0).

Row operations do not preserve the column space

Row operations do change the column vectors. Adding cc times row ii to row jj changes all entries in row jj, which changes every column simultaneously. So you cannot read off a basis for col(A)\text{col}(A) from the RREF columns.

What row operations do preserve is the linear dependence relations among columns: if a column is a linear combination of others before reduction, the same relation holds after, and vice versa. This means the positions of pivot columns are reliable — the pivot columns of AA are a basis for col(A)\text{col}(A) — but you must take those columns from the original matrix AA, not from the RREF.

Worked example

Find bases for the row space and column space of

A=(123246112).A = \begin{pmatrix} 1 & 2 & 3 \\ 2 & 4 & 6 \\ 1 & 1 & 2 \end{pmatrix}.

Apply Gauss-Jordan elimination. R2R22R1R_2 \leftarrow R_2 - 2R_1, R3R3R1R_3 \leftarrow R_3 - R_1:

(123000011).\begin{pmatrix} 1 & 2 & 3 \\ 0 & 0 & 0 \\ 0 & -1 & -1 \end{pmatrix}.

Swap R2R_2 and R3R_3, then R2R2R_2 \leftarrow -R_2:

(123011000).\begin{pmatrix} 1 & 2 & 3 \\ 0 & 1 & 1 \\ 0 & 0 & 0 \end{pmatrix}.

Back-substitute: R1R12R2R_1 \leftarrow R_1 - 2R_2:

(101011000).\begin{pmatrix} 1 & 0 & 1 \\ 0 & 1 & 1 \\ 0 & 0 & 0 \end{pmatrix}.

Row space: The nonzero rows of the RREF are (1,0,1)(1, 0, 1) and (0,1,1)(0, 1, 1). These form a basis for row(A)F3\text{row}(A) \subseteq F^3.

Column space: Pivot columns are columns 1 and 2 (where the leading 1s appear). Take those columns from the original AA:

col(A)=span ⁣{(121), (241)}F3.\text{col}(A) = \text{span}\!\left\{\begin{pmatrix}1\\2\\1\end{pmatrix},\ \begin{pmatrix}2\\4\\1\end{pmatrix}\right\} \subseteq F^3.

Row rank equals column rank

In the example, both the row space and the column space have dimension 2. This is not a coincidence.

Theorem: dim(row(A))=dim(col(A))\dim(\text{row}(A)) = \dim(\text{col}(A)) for any matrix AA.

Proof: In the RREF of AA, every pivot corresponds to a nonzero row (contributing to the row space) and a pivot column (contributing to the column space). The number of pivots is the same count in both cases. Since the nonzero rows of the RREF are a basis for row(A)\text{row}(A) and the pivot columns of AA are a basis for col(A)\text{col}(A), both dimensions equal the number of pivots. \square

Rank

This common dimension is the rank of AA:

\text{rank}(A) \coloneqq \dim(\text{row}(A)) = \dim(\text{col}(A)) = \text{(number of pivots in the RREF of } A). \tag{1}

The rank measures how much of the matrix is genuinely independent — how many linearly independent rows (equivalently, columns) AA has. For an m×nm \times n matrix, rank(A)min(m,n)\text{rank}(A) \le \min(m, n), since neither the row space (dimension m\le m) nor the column space (dimension n\le n) can exceed its ambient space.

The relationship between rank, nullity, and the structure of solutions is made precise in the Rank-Nullity Theorem.

Summary

  • The row space row(A)=span(r1,,rm)Fn\text{row}(A) = \text{span}(r_1, \ldots, r_m) \subseteq F^n and the column space col(A)=span(c1,,cn)Fm\text{col}(A) = \text{span}(c_1, \ldots, c_n) \subseteq F^m are both linear subspaces.
  • The system Ax=bAx = b is consistent if and only if bcol(A)b \in \text{col}(A).
  • Row operations preserve the row space: a basis is given by the nonzero rows of the RREF.
  • Row operations do not preserve the column space: a basis uses the pivot columns of the original matrix AA.
  • Row rank equals column rank: dim(row(A))=dim(col(A))\dim(\text{row}(A)) = \dim(\text{col}(A)).
  • The rank rank(A)\text{rank}(A) is this common value, equal to the number of pivots in the RREF.