Tutorials › Linear Algebra › Membership in a Span Versus Spanning the Whole Space

Span and the Column Space View · Tutorial 158 of 1000

Membership in a Span Versus Spanning the Whole Space

Use consistency to test one target, and test the standard basis vectors to decide whether columns span the whole space.

Beginner 9 min read

What You'll Learn

  • Translate membership of one target in a column space into consistency of a linear system.
  • Read consistency or inconsistency from the reduced augmented matrix.
  • Distinguish a successful test for one target from spanning the entire ambient space.
  • Use the standard basis vectors to test whether columns span all of the space.
  • Check several targets with one matrix equation while allowing separate coefficients for each target.

One Target or Every Target?

Given a collection of vectors, two questions can sound similar: does their span contain a particular target, and do they span the entire ambient space? The first asks about one vector. The second asks whether every vector in that space can be formed from the collection. A successful answer to the first question does not, by itself, settle the second.

Let \(\mathbf{A}\in\mathbb{R}^{m\times n}\) have columns \(\mathbf{a}_1,\dots,\mathbf{a}_n\). The column space is the set of all linear combinations of those columns. A system is consistent if it has at least one solution. These definitions turn the two questions into tests about systems of equations.

Definition: The column space of \(\mathbf{A}\) is \(\operatorname{Col}\mathbf{A}=\operatorname{span}\{\mathbf{a}_1,\dots,\mathbf{a}_n\}\), the set of vectors \(c_1\mathbf{a}_1+\cdots+c_n\mathbf{a}_n\) with real scalars \(c_1,\dots,c_n\). The columns of \(\mathbf{A}\) span \(\mathbb{R}^m\) if \(\operatorname{Col}\mathbf{A}=\mathbb{R}^m\).

For a single target \(\mathbf{b}\in\mathbb{R}^m\), membership means that some choice of coefficients produces exactly \(\mathbf{b}\). Collecting those coefficients into \(\mathbf{x}\in\mathbb{R}^n\) gives the equation \(\mathbf{A}\mathbf{x}=\mathbf{b}\). The right-hand side is important: it is part of the particular question being tested.

Theorem (Single-target membership test): For \(\mathbf{A}\in\mathbb{R}^{m\times n}\) and \(\mathbf{b}\in\mathbb{R}^m\), \(\mathbf{b}\in\operatorname{Col}\mathbf{A}\) if and only if \(\mathbf{A}\mathbf{x}=\mathbf{b}\) is consistent. Equivalently, the augmented matrix \([\mathbf{A}\mid\mathbf{b}]\) is consistent exactly when its reduced row echelon form has no row of the form \([0\ \cdots\ 0\mid c]\) with \(c\ne0\).

Proof. By definition, \(\mathbf{b}\in\operatorname{Col}\mathbf{A}\) means there are real numbers \(x_1,\dots,x_n\) such that \(\mathbf{b}=x_1\mathbf{a}_1+\cdots+x_n\mathbf{a}_n\). The definition of matrix multiplication gives \(\mathbf{A}\mathbf{x}=x_1\mathbf{a}_1+\cdots+x_n\mathbf{a}_n\), so such coefficients exist exactly when \(\mathbf{A}\mathbf{x}=\mathbf{b}\) has a solution. For the row-reduction test, row operations preserve the solution set of the augmented system, as established in the earlier material on augmented systems. A row \([0\ \cdots\ 0\mid c]\) with \(c\ne0\) represents the impossible equation \(0=c\), so it rules out a solution. If there is no such row, every nonzero row gives an equation with a leading variable. Assign zero to each free variable, then solve the pivot equations from the last nonzero row upward. Each pivot variable is determined by an equation whose right-hand side is a real number, so this produces a solution. Thus the reduced augmented matrix has a solution exactly when it has no contradictory row. \(\square\)

Testing One Target by Row Reduction

Worked Example: One Target Belongs, Another Does Not

Let the columns of \(\mathbf{A}\) be \(\mathbf{a}_1=(1,0,1)\) and \(\mathbf{a}_2=(0,1,1)\). Test whether \(\mathbf{b}=(2,3,5)\) and \(\mathbf{c}=(1,1,0)\) belong to \(\operatorname{Col}\mathbf{A}\).

For \(\mathbf{b}\), form the augmented matrix and subtract row 1 from row 3, then subtract row 2 from row 3:

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

There is no contradictory row. The equations give \(x_1=2\) and \(x_2=3\), so \(\mathbf{b}\) belongs to the column space.

Check: \(2\mathbf{a}_1+3\mathbf{a}_2=2(1,0,1)+3(0,1,1)=(2,3,5)=\mathbf{b}\).

For \(\mathbf{c}\), the augmented matrix reduces as follows. First subtract row 1 from row 3, then subtract row 2 from row 3:

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

The last row says \(0=-2\), so the system is inconsistent and \(\mathbf{c}\notin\operatorname{Col}\mathbf{A}\). The first target’s membership did not imply the second target’s membership.

A useful discipline is to keep the target attached to the coefficient matrix throughout row reduction. The question is not whether a reduced matrix has a column equal to the target. It is whether the augmented system, with the target on its right-hand side, is consistent.

When Do the Columns Span the Whole Space?

To span \(\mathbb{R}^m\), the columns must be able to produce every right-hand side in \(\mathbb{R}^m\). That is a universal requirement, not a test of one selected target. There is a finite set of targets that captures this requirement: the standard basis vectors \(\mathbf{e}_1,\dots,\mathbf{e}_m\), where \(\mathbf{e}_i\) has a \(1\) in position \(i\) and zeros elsewhere.

Theorem (Standard-basis test for spanning): For \(\mathbf{A}\in\mathbb{R}^{m\times n}\), the columns of \(\mathbf{A}\) span \(\mathbb{R}^m\) if and only if each of the \(m\) systems \(\mathbf{A}\mathbf{x}=\mathbf{e}_i\), for \(i=1,\dots,m\), is consistent.

Proof. Suppose first that the columns span \(\mathbb{R}^m\). Each standard basis vector \(\mathbf{e}_i\) is in \(\mathbb{R}^m\), so it is a linear combination of the columns. The single-target membership test then says \(\mathbf{A}\mathbf{x}=\mathbf{e}_i\) is consistent for every \(i\). Conversely, suppose each of these systems is consistent. For every \(i\), choose a vector \(\mathbf{x}_i\) such that \(\mathbf{A}\mathbf{x}_i=\mathbf{e}_i\). Any \(\mathbf{b}\in\mathbb{R}^m\) has the standard-coordinate expression \(\mathbf{b}=b_1\mathbf{e}_1+\cdots+b_m\mathbf{e}_m\). Therefore, by linearity of matrix multiplication, \(\mathbf{A}(b_1\mathbf{x}_1+\cdots+b_m\mathbf{x}_m)=b_1\mathbf{e}_1+\cdots+b_m\mathbf{e}_m=\mathbf{b}\). Thus every \(\mathbf{b}\in\mathbb{R}^m\) belongs to \(\operatorname{Col}\mathbf{A}\), which means the columns span \(\mathbb{R}^m\). \(\square\)

This is the consistency form of the every-right-hand-side criterion: spanning the whole codomain means that \(\mathbf{A}\mathbf{x}=\mathbf{b}\) is consistent for every \(\mathbf{b}\in\mathbb{R}^m\). The standard-basis test replaces infinitely many possible targets with \(m\) particular systems. The criterion concerns consistency, not uniqueness: it does not require each target to have only one coefficient vector.

Worked Example: Showing That Three Columns Span \(\mathbb{R}^3\)

Consider the columns of \(\mathbf{A}=\begin{bmatrix}1&1&0\\0&1&1\\0&0&1\end{bmatrix}\). Instead of checking only one target, solve \(\mathbf{A}\mathbf{x}=\mathbf{b}\) for an arbitrary \(\mathbf{b}=(b_1,b_2,b_3)\in\mathbb{R}^3\).

The equations are \(x_1+x_2=b_1\), \(x_2+x_3=b_2\), and \(x_3=b_3\). Starting with the last equation gives \(x_3=b_3\). Substituting into the second gives \(x_2=b_2-b_3\), and substituting that into the first gives \(x_1=b_1-b_2+b_3\). Thus a solution exists for every choice of \(b_1,b_2,b_3\).

$$ \mathbf{x}= \begin{bmatrix} b_1-b_2+b_3\\ b_2-b_3\\ b_3 \end{bmatrix}, \qquad \mathbf{A}\mathbf{x} = \begin{bmatrix} (b_1-b_2+b_3)+(b_2-b_3)\\ (b_2-b_3)+b_3\\ b_3 \end{bmatrix} = \begin{bmatrix} b_1\\b_2\\b_3 \end{bmatrix}. $$

The displayed multiplication verifies the solution for an arbitrary right-hand side, so the columns span \(\mathbb{R}^3\). In particular, the standard-basis targets are all consistent.

Several Targets and Separate Coefficients

Sometimes the task is to test several targets against the same column space. Put the targets into a matrix \(\mathbf{B}=[\mathbf{b}_1\ \cdots\ \mathbf{b}_k]\). Then \(\mathbf{A}\mathbf{X}=\mathbf{B}\) asks for one coefficient vector for each target: the \(j\)-th column of \(\mathbf{X}\) supplies the coefficients used to form \(\mathbf{b}_j\). The coefficients for one target need not equal the coefficients for another.

Worked Example: Checking Two Targets Together

Use \(\mathbf{A}=\begin{bmatrix}1&0\\0&1\\1&1\end{bmatrix}\) to test whether \(\mathbf{b}_1=(2,3,5)\) and \(\mathbf{b}_2=(-1,4,3)\) belong to its column space. The two coefficient columns are allowed to differ.

For the first target, coefficients \(2\) and \(3\) give \((2,3,5)\). For the second, coefficients \(-1\) and \(4\) give \((-1,4,3)\). Put these coefficient choices into the columns of \(\mathbf{X}\):

$$ \mathbf{X}= \begin{bmatrix} 2&-1\\ 3&4 \end{bmatrix}, \qquad \mathbf{A}\mathbf{X} = \begin{bmatrix} 1&0\\ 0&1\\ 1&1 \end{bmatrix} \begin{bmatrix} 2&-1\\ 3&4 \end{bmatrix} = \begin{bmatrix} 2&-1\\ 3&4\\ 5&3 \end{bmatrix} = \begin{bmatrix}\mathbf{b}_1&\mathbf{b}_2\end{bmatrix}. $$

The multiplication verifies both memberships. In the first column of \(\mathbf{X}\), the coefficients are \(2,3\); in the second they are \(-1,4\). Requiring one shared coefficient vector would ask a different question and would not test membership of each target separately.

Common Pitfall: Row-Reducing Only the Columns

Row operations preserve solutions only when they are applied to the entire augmented matrix. They do not preserve the original column space as a subset of the original coordinate space. For example, let \(\mathbf{A}=\begin{bmatrix}1\\0\end{bmatrix}\). Its column space consists of vectors \((t,0)\), so \(\mathbf{b}=(0,1)\) is not in that space.

A wrong calculation swaps the two rows of \(\mathbf{A}\) to obtain \(\begin{bmatrix}0\\1\end{bmatrix}\), then concludes that \(\mathbf{b}\) is a column of the new matrix and so belongs to the original column space. This conclusion confuses the transformed columns with the original ones. The correct test row-reduces the augmented matrix:

$$ \left[ \begin{array}{c|c} 1&0\\ 0&1 \end{array} \right] \xrightarrow{R_1\leftrightarrow R_2} \left[ \begin{array}{c|c} 0&1\\ 1&0 \end{array} \right]. $$

The first row of the final augmented matrix represents \(0=1\), so the system is inconsistent. The target is not in the original column space. The correct rule is to place the target in the augmented column before row reduction, then use consistency to answer the membership question.

QuestionWhat is tested?Consistency condition
Does one \(\mathbf{b}\) belong to \(\operatorname{Col}\mathbf{A}\)?One target\(\mathbf{A}\mathbf{x}=\mathbf{b}\) is consistent
Do the columns span \(\mathbb{R}^m\)?Every target in \(\mathbb{R}^m\)\(\mathbf{A}\mathbf{x}=\mathbf{b}\) is consistent for every \(\mathbf{b}\)
Do the columns span \(\mathbb{R}^m\), using a finite test?The \(m\) standard basis targetsEach \(\mathbf{A}\mathbf{x}=\mathbf{e}_i\) is consistent
Do several targets belong to the column space?Each column of \(\mathbf{B}\)There is an \(\mathbf{X}\) with \(\mathbf{A}\mathbf{X}=\mathbf{B}\)

The distinction is useful whenever a calculation gives a particular solution. A solution for one target certifies membership of that target only. To conclude that the columns span the whole space, the test must cover every right-hand side, or equivalently the standard basis targets. Keeping those quantifiers separate prevents a single successful system from being mistaken for a general spanning result.

Check Your Understanding

For each question, identify whether it asks about one target or the whole ambient space before choosing a consistency test.

  1. State the matrix equation equivalent to \(\mathbf{b}\in\operatorname{Col}\mathbf{A}\).
  2. What row in a reduced augmented matrix certifies inconsistency?
  3. How many standard-basis systems must be consistent to conclude that the columns of \(\mathbf{A}\in\mathbb{R}^{m\times n}\) span \(\mathbb{R}^m\)?
  4. Explain why finding a solution to \(\mathbf{A}\mathbf{x}=\mathbf{b}\) for one particular \(\mathbf{b}\) does not establish that the columns span \(\mathbb{R}^m\).
  5. If \(\mathbf{A}\mathbf{X}=\mathbf{B}\), what does each column of \(\mathbf{X}\) represent?

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