Tutorials › Linear Algebra › Finding Column-Space and Row-Space Bases

Fundamental Subspaces and Rank · Tutorial 349 of 1000

Finding Column-Space and Row-Space Bases

Use row reduction to find bases for both fundamental subspaces, and understand why the two bases come from different matrices.

Intermediate 10 min read

What You'll Learn

  • Find pivot-column indices by reducing a matrix to reduced row echelon form.
  • Select the corresponding columns from the original matrix to form a column-space basis.
  • Use the nonzero rows of an echelon form as a row-space basis.
  • Explain why row operations preserve row space but do not generally preserve column space.
  • Verify that proposed basis vectors span the relevant space and are linearly independent.

Two Spaces, Two Ways to Read Row Reduction

Row reduction is a single computation that can help find bases for two different spaces associated with a matrix. The key is that the two bases are read from different places. To find a basis for the column space, use the pivot-column indices but take the columns from the original matrix. To find a basis for the row space, take the nonzero rows of an echelon form of the matrix. These instructions are not interchangeable: row operations preserve row space, but they can change column space.

Throughout, matrices and vectors have real entries, and vectors are columns. For \(\mathbf{A}\in\mathbb{R}^{m\times n}\), its column space \(\operatorname{Col}\mathbf{A}\) is the span of its columns \(\mathbf{a}_1,\dots,\mathbf{a}_n\) in \(\mathbb{R}^m\). Its row space \(\operatorname{Row}\mathbf{A}\) is the span in \(\mathbb{R}^n\) of its rows. A basis for either space is a list that spans that space and is linearly independent.

Definition: A pivot column is a column containing a leading entry in an echelon form of a matrix; its index is the column number in the original matrix. A nonzero row is a row with at least one nonzero entry. In a row echelon form, all zero rows are below the nonzero rows, and the leading entries of successive nonzero rows move strictly to the right.

For the column-space method, reduce \(\mathbf{A}\) to reduced row echelon form (RREF), record the pivot-column indices, and select those same columns from \(\mathbf{A}\). Do not select them from the RREF. For the row-space method, any row echelon form will do: its nonzero rows form a basis for \(\operatorname{Row}\mathbf{A}\). The reason these two procedures work is that row operations preserve row space, while the pivot structure of the reduced matrix records how the original columns relate to one another.

Why the Column-Space Method Works

Theorem: Let \(\mathbf{A}\in\mathbb{R}^{m\times n}\), and let \(\mathbf{R}\) be an RREF of \(\mathbf{A}\). If the pivot columns of \(\mathbf{R}\) have indices \(j_1,\dots,j_r\), then the columns \(\mathbf{a}_{j_1},\dots,\mathbf{a}_{j_r}\) of the original matrix form a basis for \(\operatorname{Col}\mathbf{A}\).

Proof. Each row operation is reversible and is left multiplication by an invertible elementary matrix. Therefore there is an invertible matrix \(\mathbf{E}\) such that \(\mathbf{R}=\mathbf{E}\mathbf{A}\). Write \(\mathbf{r}_j\) for column \(j\) of \(\mathbf{R}\), so \(\mathbf{r}_j=\mathbf{E}\mathbf{a}_j\). In RREF, the pivot columns are standard basis vectors in \(\mathbb{R}^m\), with their \(1\)s in distinct pivot rows. They are linearly independent. Every nonpivot column of \(\mathbf{R}\) is a linear combination of those pivot columns: its entries in the pivot rows give the coefficients, and its entries in all other rows are zero. Thus the pivot columns of \(\mathbf{R}\) span every column of \(\mathbf{R}\). Because \(\mathbf{E}\) is invertible, a relation among selected \(\mathbf{a}_{j_k}\) holds exactly when the same relation holds among \(\mathbf{r}_{j_k}\). The selected original columns are therefore independent. Also, for each column \(\mathbf{a}_j\), the corresponding combination expressing \(\mathbf{r}_j\) in terms of the pivot columns transfers through \(\mathbf{E}^{-1}\) to the same combination expressing \(\mathbf{a}_j\) in terms of \(\mathbf{a}_{j_1},\dots,\mathbf{a}_{j_r}\). So the selected original columns span \(\operatorname{Col}\mathbf{A}\) as well as being independent. They form a basis. \(\square\)

The proof explains why the pivot indices come from the reduced matrix but the basis vectors come from the original one. Row operations act on every column at once, changing the column vectors themselves. They preserve the coefficient relations among corresponding columns, which is what lets us transfer the pivot information back to the original matrix.

Worked Example: A Column-Space Basis from Pivot Indices

Find bases for the column space and row space of

$$ \mathbf{A}= \begin{bmatrix} 1&2&0&3\\ 2&4&1&7\\ 1&2&1&4 \end{bmatrix}. $$

Subtract \(2R_1\) from \(R_2\) and \(R_1\) from \(R_3\), then subtract the new \(R_2\) from \(R_3\):

$$ \begin{bmatrix} 1&2&0&3\\ 2&4&1&7\\ 1&2&1&4 \end{bmatrix} \sim \begin{bmatrix} 1&2&0&3\\ 0&0&1&1\\ 0&0&1&1 \end{bmatrix} \sim \begin{bmatrix} 1&2&0&3\\ 0&0&1&1\\ 0&0&0&0 \end{bmatrix}. $$

The pivot columns are columns 1 and 3. Take columns 1 and 3 of the original matrix: \(\mathbf{a}_1=(1,2,1)^{\top}\) and \(\mathbf{a}_3=(0,1,1)^{\top}\). Thus a column-space basis is \((\mathbf{a}_1,\mathbf{a}_3)\). The other columns verify the spanning: \(\mathbf{a}_2=2\mathbf{a}_1\), and \(\mathbf{a}_4=3\mathbf{a}_1+\mathbf{a}_3\). In coordinates, these give \((2,4,2)^{\top}=(2,4,2)^{\top}\) and \((3,7,4)^{\top}=(3,7,4)^{\top}\). For independence, suppose \(x\mathbf{a}_1+y\mathbf{a}_3=\mathbf{0}\). The first coordinate gives \(x=0\), and the second then gives \(y=0\).

The two nonzero rows of the echelon form are \((1,2,0,3)\) and \((0,0,1,1)\). They form a row-space basis, as justified below.

Why the Nonzero Echelon Rows Work

Theorem: Let \(\mathbf{A}\in\mathbb{R}^{m\times n}\), and let \(\mathbf{E}\) be any row echelon form of \(\mathbf{A}\). The nonzero rows of \(\mathbf{E}\) form a basis for \(\operatorname{Row}\mathbf{A}\).

Proof. A row swap does not change the span of the rows. Multiplying a row by a nonzero scalar preserves that span, since the operation can be reversed by multiplying by the reciprocal. Replacing a row by itself plus a multiple of another row also preserves the span: the new row is a combination of old rows, and the old row is recovered by subtracting the same multiple of the other row. Applying these facts through the finite sequence of row operations shows that \(\mathbf{A}\) and \(\mathbf{E}\) have the same row space. The rows of \(\mathbf{E}\) span this space by the definition of row space, and its zero rows add nothing to the span. It remains to show that the nonzero rows are independent. Suppose a linear combination of them is zero and at least one coefficient is nonzero. Choose the first nonzero row, in echelon order, whose coefficient is nonzero. In the column containing that row’s leading entry, every later row has a zero, and every earlier row has coefficient zero in the proposed combination. The combination’s entry in this column is therefore the chosen coefficient multiplied by the nonzero leading entry, so it cannot be zero. This contradicts the assumed zero combination. Hence all coefficients are zero, the nonzero rows are independent, and they form a basis. \(\square\)

Worked Example: Pivot Columns Need Not Be the First Columns

Find a column-space basis and a row-space basis for

$$ \mathbf{B}= \begin{bmatrix} 1&2&1\\ 2&4&3\\ 3&6&4 \end{bmatrix}. $$

Subtract \(2R_1\) from \(R_2\) and \(3R_1\) from \(R_3\), then subtract \(R_2\) from \(R_3\):

$$ \begin{bmatrix} 1&2&1\\ 2&4&3\\ 3&6&4 \end{bmatrix} \sim \begin{bmatrix} 1&2&1\\ 0&0&1\\ 0&0&1 \end{bmatrix} \sim \begin{bmatrix} 1&2&1\\ 0&0&1\\ 0&0&0 \end{bmatrix}. $$

The pivot columns are 1 and 3, so select the first and third columns of \(\mathbf{B}\): \(\mathbf{b}_1=(1,2,3)^{\top}\) and \(\mathbf{b}_3=(1,3,4)^{\top}\). The second original column is \(\mathbf{b}_2=2\mathbf{b}_1\), so the selected columns span all three. If \(x\mathbf{b}_1+y\mathbf{b}_3=\mathbf{0}\), the first two coordinates give \(x+y=0\) and \(2x+3y=0\). Subtracting twice the first equation from the second gives \(y=0\), and then \(x=0\). The selected columns are independent and hence are a basis for \(\operatorname{Col}\mathbf{B}\).

The two nonzero echelon rows, \((1,2,1)\) and \((0,0,1)\), form a basis for \(\operatorname{Row}\mathbf{B}\). Notice that these rows are vectors in \(\mathbb{R}^3\), whereas the column-space basis vectors are also in \(\mathbb{R}^3\) here only because the matrix is square; they play different roles and were obtained by different rules.

Using a Different Echelon Form

The column-space method uses pivot indices, which are read from the reduced form, while the row-space method can use the nonzero rows of an echelon form that is not reduced. For instance, reducing all the way to RREF may produce simpler rows, but it is not necessary for a row-space basis. Whatever echelon form is used, the zero rows must be omitted, since a list containing the zero vector is dependent and cannot be a basis.

Worked Example: A Matrix with a Zero First Column

Find bases for the column space and row space of

$$ \mathbf{C}= \begin{bmatrix} 0&1&2\\ 0&2&5\\ 0&1&3 \end{bmatrix}. $$

Subtract \(2R_1\) from \(R_2\) and \(R_1\) from \(R_3\), then subtract the new \(R_2\) from \(R_3\):

$$ \begin{bmatrix} 0&1&2\\ 0&2&5\\ 0&1&3 \end{bmatrix} \sim \begin{bmatrix} 0&1&2\\ 0&0&1\\ 0&0&1 \end{bmatrix} \sim \begin{bmatrix} 0&1&2\\ 0&0&1\\ 0&0&0 \end{bmatrix}. $$

The pivot columns have indices 2 and 3. The corresponding original columns are \(\mathbf{c}_2=(1,2,1)^{\top}\) and \(\mathbf{c}_3=(2,5,3)^{\top}\). The first column is zero, so it adds nothing to the column space. To check independence, \(x\mathbf{c}_2+y\mathbf{c}_3=\mathbf{0}\) gives \(x+2y=0\) and \(2x+5y=0\). Substituting \(x=-2y\) into the second equation gives \(y=0\), then \(x=0\). Thus the two selected columns are a basis for \(\operatorname{Col}\mathbf{C}\).

The nonzero rows of the displayed echelon form, \((0,1,2)\) and \((0,0,1)\), form a basis for \(\operatorname{Row}\mathbf{C}\). The first entry of every row is zero; the pivot positions are in columns 2 and 3, not columns 1 and 2.

A Reliable Procedure and a Common Mistake

1
Reduce the matrix.
Use row operations to reach RREF when finding pivot indices. Keep track of the column numbers containing pivots.
2
Build the column-space basis.
Return to the original matrix and take the columns at those pivot indices. The result is a basis for its column space.
3
Build the row-space basis.
Use the nonzero rows of an echelon form of the matrix. They span the original row space and are independent.

Common mistake: taking pivot columns from the reduced matrix. In the first example, the pivot columns of the echelon matrix are \((1,0,0)^{\top}\) and \((0,1,0)^{\top}\). These are not a basis for the original column space. In fact, \((1,0,0)^{\top}\) is not even in that space: every vector in it has the form \(s(1,2,1)^{\top}+t(0,1,1)^{\top}=(s,2s+t,s+t)^{\top}\). To obtain \((1,0,0)^{\top}\), the first coordinate requires \(s=1\), and the second requires \(t=-2\); then the third coordinate is \(-1\), not \(0\). The correction is to keep the pivot indices 1 and 3, then select columns 1 and 3 from the original matrix.

Another distinction is that a spanning list need not be a basis. The original rows of the first example span its row space, but they are dependent: its third row equals its second row minus its first row. The nonzero echelon rows avoid this redundancy and, by the theorem, form a basis. The two procedures provide efficient ways to extract bases, while the proofs explain why they work and what each calculation preserves.

Check Your Understanding

For each matrix problem, keep the column-space and row-space procedures separate.

  1. For \(\begin{bmatrix}1&0&2\\2&1&5\\0&1&1\end{bmatrix}\), find the pivot indices and use them to give a column-space basis from the original matrix.
  2. Find a row-space basis for \(\begin{bmatrix}1&2&0\\2&4&1\\3&6&1\end{bmatrix}\) by row reduction.
  3. Why does applying an invertible sequence of row operations preserve linear relations among corresponding columns?
  4. Give a reason the nonzero rows of an echelon form are linearly independent.
  5. Explain why the zero rows of an echelon form must be left out of a row-space basis.

Test yourself: Linear Algebra final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon