Tutorials › Linear Algebra › Finding a Basis from a Given Spanning List

Basis and Dimension · Tutorial 327 of 1000

Finding a Basis from a Given Spanning List

Use pivot columns and dependence relations to select a basis from a given spanning list, while retaining the original vectors.

Intermediate 12 min read

What You'll Learn

  • Turn listed vectors into columns of a coordinate matrix using a fixed basis.
  • Use row reduction to identify which original vectors to retain.
  • Read dependence equations for non-pivot columns from the reduced matrix.
  • Extract bases from lists of coordinate vectors, polynomials, and matrices.
  • Check that the selected vectors are independent and span the same space.
  • Avoid confusing transformed coordinate columns with the original vectors.

From a Spanning List to a Basis

A spanning list may contain more vectors than are needed. Some entries can be expressed using the others, so removing them does not change the set of vectors the list can produce. The practical task is to find a subset that still spans and has no redundancy: that subset is a basis. When the listed vectors are coordinate vectors, polynomials, or matrices, row reduction gives a systematic way to identify which original entries to keep.

Throughout, the examples use real vector spaces. A basis of a vector space is an ordered list that is both linearly independent and spanning. A spanning list for a subspace \(W\) is a list whose linear combinations produce every vector in \(W\). Fix a basis for the space containing the listed vectors, and write each vector as a coordinate column relative to that basis. The resulting matrix has the listed vectors’ coordinate columns in their original order.

Practical rule: Row-reduce the matrix whose columns are the coordinates of the given vectors. Retain the original vectors corresponding to pivot columns of the reduced row echelon form (RREF). If the original list spans \(W\), these retained vectors form a basis of \(W\). Do not replace the original vectors by columns of the RREF.

The distinction between the reduced matrix and the original vectors matters. Row operations transform coordinate columns; they do not, in general, transform the listed vectors into vectors from the original list. Pivot positions tell us which original list entries to keep. They do not tell us to use the columns of the reduced matrix as the basis vectors.

Why the Pivot Rule Works

We first record why row reduction preserves the coefficient relations needed for this method. Let \(\mathbf{A}\) be a coordinate matrix and let \(\mathbf{R}=\operatorname{rref}(\mathbf{A})\). Each row operation is multiplication on the left by an invertible elementary matrix. A sequence of such operations therefore gives an invertible matrix \(\mathbf{E}\) such that \(\mathbf{R}=\mathbf{E}\mathbf{A}\).

Proposition: For every coefficient column \(\mathbf{c}\), \(\mathbf{A}\mathbf{c}=\mathbf{0}\) if and only if \(\mathbf{R}\mathbf{c}=\mathbf{0}\). Thus the coefficient relations among the columns are unchanged by row reduction.

Proof. Since \(\mathbf{R}=\mathbf{E}\mathbf{A}\), the equation \(\mathbf{A}\mathbf{c}=\mathbf{0}\) implies \(\mathbf{R}\mathbf{c}=\mathbf{E}\mathbf{A}\mathbf{c}=\mathbf{E}\mathbf{0}=\mathbf{0}\). Conversely, if \(\mathbf{R}\mathbf{c}=\mathbf{0}\), then \(\mathbf{E}\mathbf{A}\mathbf{c}=\mathbf{0}\). Multiplying by \(\mathbf{E}^{-1}\) gives \(\mathbf{A}\mathbf{c}=\mathbf{0}\). This proves both directions. \(\square\)

Theorem (Pivot-column basis extraction): Let \(V\) be a finite-dimensional vector space over \(\mathbb{R}\), let \(\mathcal{B}\) be a fixed basis of \(V\), and let \(\mathbf{v}_1,\ldots,\mathbf{v}_p\) be a list spanning a subspace \(W\) of \(V\). Put the coordinate columns \([\mathbf{v}_1]_{\mathcal{B}},\ldots,[\mathbf{v}_p]_{\mathcal{B}}\) into a matrix \(\mathbf{A}\). The original vectors \(\mathbf{v}_j\) whose indices \(j\) are pivot-column indices of \(\operatorname{rref}(\mathbf{A})\), kept in their original order, form a basis of \(W\).

Proof. Let \(\mathbf{R}=\operatorname{rref}(\mathbf{A})\). First consider the pivot columns of \(\mathbf{R}\). Each has a \(1\) in its pivot row and \(0\) in every other row, so these columns are linearly independent: in a linear combination equal to zero, the entry in each pivot row forces the coefficient of its pivot column to be zero. By the proposition, the same coefficient equation holds for the corresponding columns of \(\mathbf{A}\). Thus the retained coordinate columns are independent, and so are the original vectors, because coordinate representation relative to a basis is unique.

Next, every non-pivot column of \(\mathbf{R}\) is a linear combination of its pivot columns. In fact, its entries in the pivot rows give the coefficients: subtracting that combination makes every pivot-row entry zero, and all other rows of an RREF are zero rows. The resulting column is therefore zero. By the proposition, this same coefficient relation holds among the corresponding columns of \(\mathbf{A}\). Consequently, every original vector is in the span of the retained original vectors. The full list spans \(W\), so the retained vectors also span \(W\). They are both independent and spanning, and hence form a basis of \(W\). \(\square\)

This theorem also explains how to find the dependence equations. For a non-pivot column, read its entries in the pivot rows of the RREF; these are the coefficients expressing the corresponding original vector in terms of the original pivot-column vectors. The proposition guarantees that the relation read from the reduced matrix is valid for the original vectors.

Worked Examples in Three Kinds of Spaces

Worked Example: Extracting a Basis from Coordinate Vectors

Find a basis for the span of \(\mathbf{v}_1=(1,0,1)^{\top}\), \(\mathbf{v}_2=(0,1,1)^{\top}\), \(\mathbf{v}_3=(1,1,2)^{\top}\), and \(\mathbf{v}_4=(2,1,3)^{\top}\) in \(\mathbb{R}^3\).

Put the vectors in the columns, then subtract \(R_1\) from \(R_3\), followed by subtracting \(R_2\) from the new \(R_3\):

$$ \begin{bmatrix} 1&0&1&2\\ 0&1&1&1\\ 1&1&2&3 \end{bmatrix} \xrightarrow{R_3\to R_3-R_1} \begin{bmatrix} 1&0&1&2\\ 0&1&1&1\\ 0&1&1&1 \end{bmatrix} \xrightarrow{R_3\to R_3-R_2} \begin{bmatrix} 1&0&1&2\\ 0&1&1&1\\ 0&0&0&0 \end{bmatrix}. $$

This is in RREF, with pivot columns 1 and 2. Retain the corresponding original vectors \(\mathbf{v}_1,\mathbf{v}_2\). The third column of the reduced matrix is the sum of its first and second columns; the fourth is twice the first plus the second. Thus the relations for the original vectors are \(\mathbf{v}_3=\mathbf{v}_1+\mathbf{v}_2\) and \(\mathbf{v}_4=2\mathbf{v}_1+\mathbf{v}_2\).

Check: \((1,0,1)^{\top}+(0,1,1)^{\top}=(1,1,2)^{\top}=\mathbf{v}_3\), and \(2(1,0,1)^{\top}+(0,1,1)^{\top}=(2,1,3)^{\top}=\mathbf{v}_4\). The pivot test gives independence of \(\mathbf{v}_1,\mathbf{v}_2\); the displayed relations show that all four original vectors lie in their span. They form a basis of the given span.

Worked Example: Extracting a Basis of Polynomials

Find a basis for the span in \(P_2\), the real polynomials of degree at most \(2\), of \(p_1=1+x\), \(p_2=x+x^2\), \(p_3=1+2x+x^2\), and \(p_4=1-x^2\).

Use the monomial basis \((1,x,x^2)\), so the coordinate columns are \((1,1,0)^{\top}\), \((0,1,1)^{\top}\), \((1,2,1)^{\top}\), and \((1,0,-1)^{\top}\). Subtract \(R_1\) from \(R_2\), then subtract the new \(R_2\) from \(R_3\):

$$ \begin{bmatrix} 1&0&1&1\\ 1&1&2&0\\ 0&1&1&-1 \end{bmatrix} \xrightarrow{R_2\to R_2-R_1} \begin{bmatrix} 1&0&1&1\\ 0&1&1&-1\\ 0&1&1&-1 \end{bmatrix} \xrightarrow{R_3\to R_3-R_2} \begin{bmatrix} 1&0&1&1\\ 0&1&1&-1\\ 0&0&0&0 \end{bmatrix}. $$

The pivot columns are 1 and 2, so retain \(p_1\) and \(p_2\). Column 3 of the RREF is the sum of columns 1 and 2, and column 4 is column 1 minus column 2. These give \(p_3=p_1+p_2\) and \(p_4=p_1-p_2\).

Check: \((1+x)+(x+x^2)=1+2x+x^2=p_3\), while \((1+x)-(x+x^2)=1-x^2=p_4\). Since the pivot columns show that \(p_1,p_2\) are independent and the equations express both other polynomials using them, \((p_1,p_2)\) is a basis for the span.

Worked Example: Extracting a Basis of Matrices

Find a basis for the span in \(\mathbb{R}^{2\times2}\) of \(\mathbf{M}_1=\begin{bmatrix}1&0\\0&1\end{bmatrix}\), \(\mathbf{M}_2=\begin{bmatrix}0&1\\1&0\end{bmatrix}\), \(\mathbf{M}_3=\begin{bmatrix}1&1\\1&1\end{bmatrix}\), and \(\mathbf{M}_4=\begin{bmatrix}2&-1\\-1&2\end{bmatrix}\).

Use the natural basis \((\mathbf{E}_{11},\mathbf{E}_{12},\mathbf{E}_{21},\mathbf{E}_{22})\), where \(\mathbf{E}_{ij}\) has a \(1\) in position \((i,j)\) and zeros elsewhere. In this order, the coordinate columns are \((a_{11},a_{12},a_{21},a_{22})^{\top}\). Thus the coordinate matrix is:

$$ \begin{bmatrix} 1&0&1&2\\ 0&1&1&-1\\ 0&1&1&-1\\ 1&0&1&2 \end{bmatrix}. $$

Apply \(R_3\to R_3-R_2\) and \(R_4\to R_4-R_1\):

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

The pivot columns are 1 and 2, so retain \(\mathbf{M}_1,\mathbf{M}_2\). The third column is the sum of the first two, and the fourth is twice the first minus the second. Hence \(\mathbf{M}_3=\mathbf{M}_1+\mathbf{M}_2\) and \(\mathbf{M}_4=2\mathbf{M}_1-\mathbf{M}_2\).

Check: \(\mathbf{M}_1+\mathbf{M}_2=\begin{bmatrix}1&1\\1&1\end{bmatrix}=\mathbf{M}_3\), and \(2\mathbf{M}_1-\mathbf{M}_2=\begin{bmatrix}2&-1\\-1&2\end{bmatrix}=\mathbf{M}_4\). The two retained matrices are independent because their coordinate columns are pivot columns; the equations show they span all four listed matrices. Thus they form a basis of the span.

A Reliable Workflow and a Common Pitfall

1
Choose coordinates.
For coordinate vectors, use their given coordinates. For polynomials or matrices, specify a basis and write each object’s coordinate column in that basis.
2
Place listed objects in columns.
Keep the columns in the same order as the given list. Each column must represent one listed object.
3
Row-reduce and mark pivot indices.
Use the pivot positions in the RREF to identify the list entries to retain.
4
Return to the original list and check.
Keep the original objects at the pivot indices, then verify that the other listed objects can be expressed using them.

Common pitfall: using RREF columns as the basis objects. In the polynomial example, the first column of the RREF is \((1,0,0)^{\top}\), but the coordinate column of \(p_1=1+x\) is \((1,1,0)^{\top}\). Claiming that the RREF’s first column represents \(p_1\) is therefore incorrect. The RREF column is a transformed coordinate column; its pivot position tells us to retain the original first polynomial. The basis is \((p_1,p_2)\), not a list formed by treating the columns of the reduced matrix as the original polynomials.

There is also a useful check on the final selection. The number of retained vectors must match the number of pivots, and the selected vectors must be members of the given list. To establish that the selection is a basis, connect both parts of the definition to the computation: pivot columns give independence, while the dependence equations for non-pivot columns show that the retained vectors still span the original list. If the original list spans a subspace, the retained list then spans that same subspace.

Check Your Understanding

For each problem, identify the coordinates or coordinate matrix, then explain why the selected original vectors form a basis of the stated span.

  1. Use row reduction to extract a basis from \((1,0,1)^{\top}\), \((1,1,0)^{\top}\), and \((2,1,1)^{\top}\) in \(\mathbb{R}^3\). Find a relation for any non-pivot column.
  2. In \(P_2\), use the basis \((1,x,x^2)\) to find a basis for the span of \(1+x\), \(1-x\), and \(2\).
  3. For the matrices \(\begin{bmatrix}1&0\\0&0\end{bmatrix}\), \(\begin{bmatrix}0&1\\0&0\end{bmatrix}\), and \(\begin{bmatrix}1&1\\0&0\end{bmatrix}\), write the coordinate matrix in the natural matrix basis and identify a basis for their span.
  4. Why does a pivot index tell you which original object to retain, rather than instructing you to use the corresponding column of the RREF?
  5. State how pivot columns establish independence and how non-pivot columns establish that the retained vectors span the original list.

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