Tutorials › Linear Algebra › Row Reduction for Testing Span Membership

Span and the Column Space View · Tutorial 140 of 1000

Row Reduction for Testing Span Membership

Use the augmented matrix to turn a span-membership question into a consistency test, and interpret the row-reduced result correctly.

Beginner 9 min read

What You'll Learn

  • Arrange the given vectors as the columns of a matrix.
  • Append the target vector as a final column.
  • Use row operations without changing whether the system is consistent.
  • Recognize the row that proves a target is not in the span.
  • Distinguish a consistent augmented system from an inconsistent one.
  • Check a membership conclusion with a linear combination or a contradiction.

From Span Membership to a Row-Reduction Test

To decide whether a target vector can be made from a given list, we need to check whether some choice of coefficients produces it. Row reduction turns that question into a systematic test: a particular row in the reduced augmented matrix can prove that no such coefficients exist. If no such row appears, the system is consistent and the target belongs to the span.

Let \(\mathbf{a}_1,\dots,\mathbf{a}_p\) be vectors in \(\mathbb{R}^m\). Their span is the set of all their linear combinations:

$$ \operatorname{span}\{\mathbf{a}_1,\dots,\mathbf{a}_p\} = \{c_1\mathbf{a}_1+\cdots+c_p\mathbf{a}_p: c_1,\dots,c_p\in\mathbb{R}\}. $$

Put the given vectors in the columns of \(\mathbf{A}\in\mathbb{R}^{m\times p}\), and let the target be \(\mathbf{b}\in\mathbb{R}^m\). A coefficient vector \(\mathbf{x}=(x_1,\dots,x_p)^\top\) satisfies \(\mathbf{A}\mathbf{x}=x_1\mathbf{a}_1+\cdots+x_p\mathbf{a}_p\). Thus membership asks whether some \(\mathbf{x}\) satisfies \(\mathbf{A}\mathbf{x}=\mathbf{b}\). In the augmented matrix \([\mathbf{A}\ \mathbf{b}]\), the target is the final column. The dimensions matter: \(\mathbf{A}\) has one row for each coordinate of a vector and one column for each given vector; the appended target adds one more column.

Theorem (Span membership and solvability): For \(\mathbf{a}_1,\dots,\mathbf{a}_p,\mathbf{b}\in\mathbb{R}^m\), the target \(\mathbf{b}\) belongs to \(\operatorname{span}\{\mathbf{a}_1,\dots,\mathbf{a}_p\}\) if and only if the system \(\mathbf{A}\mathbf{x}=\mathbf{b}\), where \(\mathbf{A}=[\mathbf{a}_1\ \cdots\ \mathbf{a}_p]\), is consistent.

Proof. By the definition of span, \(\mathbf{b}\) belongs to the span exactly when there are real numbers \(c_1,\dots,c_p\) such that \(c_1\mathbf{a}_1+\cdots+c_p\mathbf{a}_p=\mathbf{b}\). The definition of matrix multiplication gives \(\mathbf{A}\mathbf{x}=x_1\mathbf{a}_1+\cdots+x_p\mathbf{a}_p\). Taking \(x_j=c_j\) for each \(j\), the span equation is exactly \(\mathbf{A}\mathbf{x}=\mathbf{b}\). Therefore a suitable linear combination exists exactly when the system has a solution. \(\square\)

What to Look for After Row Reduction

Row reduction applies elementary row operations: swapping two rows, multiplying a row by a nonzero scalar, or adding a multiple of one row to another. Each operation is reversible. A swap can be undone by swapping back; scaling by \(c\ne0\) can be undone by scaling by \(1/c\); and adding a multiple of a row can be undone by subtracting that same multiple. Consequently, these operations preserve the solutions of the system represented by the augmented matrix.

Once the augmented matrix is in reduced row echelon form (RREF), each row represents an equation. A row whose coefficient entries are all zero but whose final, augmented entry is nonzero represents an impossible equation, such as \(0=1\). If there is no such row, the system is consistent: assign zero to any free variables, and the pivot equations determine values for the pivot variables. In RREF, each pivot variable appears with coefficient \(1\) in its pivot row and with coefficient \(0\) in the other pivot rows, so these assignments satisfy the equations.

Theorem (Augmented-matrix consistency test): Let \(\mathbf{A}\in\mathbb{R}^{m\times p}\) and \(\mathbf{b}\in\mathbb{R}^m\). The target \(\mathbf{b}\) belongs to the span of the columns of \(\mathbf{A}\) if and only if \(\operatorname{rref}([\mathbf{A}\ \mathbf{b}])\) has no row of the form \([0\ \cdots\ 0\mid d]\) with \(d\ne0\).

Proof. By the preceding theorem, membership is equivalent to consistency of \(\mathbf{A}\mathbf{x}=\mathbf{b}\). The reversible row operations used to reduce the augmented matrix preserve its solution set, so the original system is consistent exactly when the reduced system is consistent. A row \([0\ \cdots\ 0\mid d]\), with \(d\ne0\), says \(0=d\), which has no solution; therefore its presence implies inconsistency. Conversely, suppose no such row occurs. Every zero coefficient row then has zero on the right as well, so it gives the valid equation \(0=0\). In each remaining row, the pivot variable equals the right-hand entry minus a sum of terms involving free variables. Set every free variable to zero; each pivot variable can then be assigned the right-hand entry in its row. These assignments satisfy every nonzero row, and the zero rows are already satisfied. The reduced system, and hence the original system, is consistent. Combining this with the membership-solvability equivalence proves the criterion in both directions. \(\square\)

In practice, row-reduce the whole augmented matrix, including the target column. Do not decide membership merely by counting pivots in \(\mathbf{A}\), or by reducing \(\mathbf{A}\) while ignoring \(\mathbf{b}\). The target determines the right-hand side of the equations, and a contradiction can appear only when that column is included.

Worked Membership Tests

Worked Example: A Target in the Span

Test whether \(\mathbf{b}=(2,-1,1)^\top\) belongs to the span of \(\mathbf{a}_1=(1,0,1)^\top\) and \(\mathbf{a}_2=(0,1,1)^\top\). Append the target column to the matrix of given vectors:

$$ \left[\begin{array}{cc|c} 1&0&2\\ 0&1&-1\\ 1&1&1 \end{array}\right]. $$

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

$$ \left[\begin{array}{cc|c} 1&0&2\\ 0&1&-1\\ 1&1&1 \end{array}\right] \xrightarrow{R_3\to R_3-R_1} \left[\begin{array}{cc|c} 1&0&2\\ 0&1&-1\\ 0&1&-1 \end{array}\right] \xrightarrow{R_3\to R_3-R_2} \left[\begin{array}{cc|c} 1&0&2\\ 0&1&-1\\ 0&0&0 \end{array}\right]. $$

There is no row with zero coefficients and a nonzero right-hand entry, so the system is consistent and \(\mathbf{b}\) is in the span. As a check, the coefficients \(2\) and \(-1\) give

$$ 2\mathbf{a}_1-\mathbf{a}_2 = 2\begin{bmatrix}1\\0\\1\end{bmatrix} -\begin{bmatrix}0\\1\\1\end{bmatrix} = \begin{bmatrix}2\\-1\\1\end{bmatrix} =\mathbf{b}. $$

The multiplication checks the membership conclusion directly.

Worked Example: A Target Not in the Span

Keep the same two given vectors, but test \(\mathbf{b}=(1,1,3)^\top\). The augmented matrix and row operations are

$$ \left[\begin{array}{cc|c} 1&0&1\\ 0&1&1\\ 1&1&3 \end{array}\right] \xrightarrow{R_3\to R_3-R_1} \left[\begin{array}{cc|c} 1&0&1\\ 0&1&1\\ 0&1&2 \end{array}\right] \xrightarrow{R_3\to R_3-R_2} \left[\begin{array}{cc|c} 1&0&1\\ 0&1&1\\ 0&0&1 \end{array}\right]. $$

The last row represents \(0=1\), so the system is inconsistent and the target is not in the span. To check the contradiction directly, the first two equations require \(x_1=1\) and \(x_2=1\), while the third requires \(x_1+x_2=3\). The first two give \(x_1+x_2=2\), not \(3\). Thus no choice of coefficients can produce the target.

Worked Example: Membership with Dependent Given Vectors

Test whether \(\mathbf{b}=(3,1,4)^\top\) belongs to the span of \(\mathbf{a}_1=(1,0,1)^\top\), \(\mathbf{a}_2=(2,0,2)^\top\), and \(\mathbf{a}_3=(0,1,1)^\top\). The first two given vectors are multiples of each other, but this does not prevent the membership test:

$$ \left[\begin{array}{ccc|c} 1&2&0&3\\ 0&0&1&1\\ 1&2&1&4 \end{array}\right] \xrightarrow{R_3\to R_3-R_1} \left[\begin{array}{ccc|c} 1&2&0&3\\ 0&0&1&1\\ 0&0&1&1 \end{array}\right] \xrightarrow{R_3\to R_3-R_2} \left[\begin{array}{ccc|c} 1&2&0&3\\ 0&0&1&1\\ 0&0&0&0 \end{array}\right]. $$

The reduced augmented matrix has no contradictory row, so the target belongs to the span. For a direct check, choose coefficients \(1,1,1\):

$$ \mathbf{a}_1+\mathbf{a}_2+\mathbf{a}_3 = \begin{bmatrix}1\\0\\1\end{bmatrix} +\begin{bmatrix}2\\0\\2\end{bmatrix} +\begin{bmatrix}0\\1\\1\end{bmatrix} = \begin{bmatrix}3\\1\\4\end{bmatrix} =\mathbf{b}. $$

This example shows why the test concerns consistency, not whether the given columns are independent. Redundant columns may give more than one way to express a target; the presence or absence of a contradiction still decides membership.

Common Mistake: Reducing Only the Given-Vector Matrix

A tempting but incorrect argument is: “The matrix of given vectors has two pivot columns, so every target in \(\mathbb{R}^3\) is in their span.” The second worked example disproves this claim. Its two columns each give a pivot, but the augmented reduction for \((1,1,3)^\top\) produces the row \([0\ 0\mid1]\). Two pivots in the coefficient matrix do not make every possible right-hand side consistent. For the specific target, the augmented matrix—not the pivot count of \(\mathbf{A}\) alone—provides the test.

Another construction error is to append the target as a row rather than as a column. If \(\mathbf{A}\) is \(m\times p\), then \(\mathbf{b}\) has \(m\) entries and must be appended as a final column, producing an \(m\times(p+1)\) matrix. Appending it as a row changes the equation being represented and may not even give a matrix with matching row lengths.

Why the Test Is Useful

Span membership is a yes-or-no question about whether a target can be produced by a specified set of vectors. The augmented matrix makes the relationship between the vectors and the target explicit in one calculation. A contradictory row gives a precise reason for a negative answer; in its absence, consistency establishes a positive answer. In later problems, the reduced system can also be used to determine coefficients, but the test here needs only the presence or absence of a contradictory row.

Keep the direction of the conclusion tied to the system: consistent means that at least one coefficient choice produces the target, so it is in the span. Inconsistent means that no coefficient choice works, so it is not in the span. A row \([0\ \cdots\ 0\mid0]\) is not a contradiction; only a zero coefficient row with a nonzero final entry rules out membership.

Check Your Understanding

For each question, connect the augmented row reduction to the corresponding statement about span membership.

  1. What are the dimensions of \([\mathbf{A}\ \mathbf{b}]\) if \(\mathbf{A}\in\mathbb{R}^{4\times 3}\) and \(\mathbf{b}\in\mathbb{R}^4\)?
  2. What conclusion follows if the RREF of an augmented matrix contains \([0\ 0\ 0\mid -2]\)?
  3. For \(\mathbf{a}_1=(1,0)^\top\), \(\mathbf{a}_2=(1,1)^\top\), and \(\mathbf{b}=(2,1)^\top\), form the augmented matrix and determine whether \(\mathbf{b}\) is in the span.
  4. Explain why a row \([0\ 0\mid0]\) does not prove that a system is inconsistent.
  5. Give the equivalence between membership in the span of the columns of \(\mathbf{A}\) and the system \(\mathbf{A}\mathbf{x}=\mathbf{b}\).

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