Tutorials › Linear Algebra › Encoding Span Questions With Coefficient Vectors

Span and the Column Space View · Tutorial 137 of 1000

Encoding Span Questions With Coefficient Vectors

Learn how a coefficient vector records a linear combination and how to test whether a target vector belongs to the span by setting up an equation.

Beginner 9 min read

What You'll Learn

  • Arrange a finite list of vectors as the columns of a matrix
  • Interpret the entries of a coefficient vector as the weights in a linear combination
  • Prove the matrix equation that encodes a linear combination
  • Translate a span-membership question into a system with a specified right-hand side
  • Distinguish the target vector from the coefficient vector
  • Interpret solvable, nonunique, and inconsistent coefficient systems

From a Linear Combination to a Coefficient Vector

The span of a list of vectors consists of all the linear combinations that can be formed from that list. To decide whether a particular vector belongs to the span, we need to determine whether some choice of coefficients produces it. A coefficient vector collects those scalar choices into a single column, so the question can be written as a matrix equation.

Work over \(\mathbb{R}\). Let \(\mathbf{v}_1,\dots,\mathbf{v}_p\) be vectors in \(\mathbb{R}^m\), where \(p\) and \(m\) are positive integers. A linear combination of these vectors has the form \(x_1\mathbf{v}_1+\cdots+x_p\mathbf{v}_p\), where each \(x_j\) is a real scalar. The list of coefficients is recorded as the column vector \(\mathbf{x}=(x_1,\dots,x_p)^{\top}\). In particular, \(\mathbf{x}\) has \(p\) entries, one for each vector in the list.

Definition: The span of \(\mathbf{v}_1,\dots,\mathbf{v}_p\) is the set of all vectors \(x_1\mathbf{v}_1+\cdots+x_p\mathbf{v}_p\) as the coefficients \(x_1,\dots,x_p\) range over \(\mathbb{R}\). The vector \(\mathbf{x}=(x_1,\dots,x_p)^{\top}\) is the coefficient vector for that linear combination.

Form a matrix \(\mathbf{A}\) by placing the given vectors, in their listed order, as columns. Then \(\mathbf{A}\) has \(m\) rows and \(p\) columns. The target vector \(\mathbf{b}\), if there is one, belongs to \(\mathbb{R}^m\); the coefficient vector \(\mathbf{x}\) belongs to \(\mathbb{R}^p\). These vectors play different roles, and their lengths need not be equal.

$$ \mathbf{A}= \begin{bmatrix}\mathbf{v}_1&\cdots&\mathbf{v}_p\end{bmatrix}, \qquad \mathbf{x}= \begin{bmatrix}x_1\\ \vdots\\ x_p\end{bmatrix}. $$

The Matrix Equation for a Linear Combination

Theorem: Let \(\mathbf{v}_1,\dots,\mathbf{v}_p\in\mathbb{R}^m\), let \(\mathbf{A}=\begin{bmatrix}\mathbf{v}_1&\cdots&\mathbf{v}_p\end{bmatrix}\), and let \(\mathbf{x}=(x_1,\dots,x_p)^{\top}\in\mathbb{R}^p\). Then \(\mathbf{A}\mathbf{x}=x_1\mathbf{v}_1+\cdots+x_p\mathbf{v}_p\).

Proof. By the definition of matrix-vector multiplication, the product of a matrix by a column vector is the sum of the matrix's columns multiplied by the corresponding entries of that vector. The columns of \(\mathbf{A}\) are \(\mathbf{v}_1,\dots,\mathbf{v}_p\), and the corresponding entries of \(\mathbf{x}\) are \(x_1,\dots,x_p\). Therefore \(\mathbf{A}\mathbf{x}=x_1\mathbf{v}_1+\cdots+x_p\mathbf{v}_p\), as required. \(\square\)

This identity explains why a single matrix records all combinations of the list: changing \(\mathbf{x}\) changes the weights, while the columns of \(\mathbf{A}\) remain the vectors being combined. For example, setting \(x_1=1\) and all other entries to \(0\) produces \(\mathbf{v}_1\); choosing different coefficients produces other combinations.

Theorem (Span membership as solvability): Let \(\mathbf{v}_1,\dots,\mathbf{v}_p\in\mathbb{R}^m\), let \(\mathbf{A}=\begin{bmatrix}\mathbf{v}_1&\cdots&\mathbf{v}_p\end{bmatrix}\), and let \(\mathbf{b}\in\mathbb{R}^m\). Then \(\mathbf{b}\in\operatorname{span}\{\mathbf{v}_1,\dots,\mathbf{v}_p\}\) if and only if the equation \(\mathbf{A}\mathbf{x}=\mathbf{b}\) has at least one solution \(\mathbf{x}\in\mathbb{R}^p\).

Proof. Suppose first that \(\mathbf{b}\in\operatorname{span}\{\mathbf{v}_1,\dots,\mathbf{v}_p\}\). By the definition of span, there are real numbers \(x_1,\dots,x_p\) such that \(\mathbf{b}=x_1\mathbf{v}_1+\cdots+x_p\mathbf{v}_p\). Put those numbers into \(\mathbf{x}=(x_1,\dots,x_p)^{\top}\). The first theorem gives \(\mathbf{A}\mathbf{x}=x_1\mathbf{v}_1+\cdots+x_p\mathbf{v}_p=\mathbf{b}\), so the equation has a solution. Conversely, suppose \(\mathbf{A}\mathbf{x}=\mathbf{b}\) for some \(\mathbf{x}=(x_1,\dots,x_p)^{\top}\in\mathbb{R}^p\). By the first theorem, \(\mathbf{b}=\mathbf{A}\mathbf{x}=x_1\mathbf{v}_1+\cdots+x_p\mathbf{v}_p\). This is a linear combination of the given vectors, so \(\mathbf{b}\) belongs to their span. Both implications hold, proving the equivalence. \(\square\)

The practical translation is direct: to ask whether \(\mathbf{b}\) is in the span, put the spanning vectors into the columns of \(\mathbf{A}\) and ask whether \(\mathbf{A}\mathbf{x}=\mathbf{b}\) is solvable. The unknowns are the coefficients, not the entries of the target vector. The next examples show how this translation works in different situations.

Worked Examples: Encoding and Solving

Worked Example: Encoding a Given Combination

Let \(\mathbf{v}_1=(1,2,0)^{\top}\), \(\mathbf{v}_2=(0,1,1)^{\top}\), and \(\mathbf{v}_3=(1,0,1)^{\top}\). Encode the combination \(2\mathbf{v}_1-\mathbf{v}_2+3\mathbf{v}_3\) as a matrix-vector product and calculate the result.

The vectors become the columns of \(\mathbf{A}\), and the coefficients \(2,-1,3\), in the same order as the vectors, become the entries of \(\mathbf{x}\):

$$ \mathbf{A}= \begin{bmatrix} 1&0&1\\ 2&1&0\\ 0&1&1 \end{bmatrix}, \qquad \mathbf{x}= \begin{bmatrix}2\\-1\\3\end{bmatrix}. $$

Using the columns, \(\mathbf{A}\mathbf{x}=2\mathbf{v}_1-1\mathbf{v}_2+3\mathbf{v}_3\). Computing the rows gives

$$ \mathbf{A}\mathbf{x} = \begin{bmatrix} 1(2)+0(-1)+1(3)\\ 2(2)+1(-1)+0(3)\\ 0(2)+1(-1)+1(3) \end{bmatrix} = \begin{bmatrix}5\\3\\2\end{bmatrix}. $$

Check: \(2\mathbf{v}_1=(2,4,0)^{\top}\), \(-\mathbf{v}_2=(0,-1,-1)^{\top}\), and \(3\mathbf{v}_3=(3,0,3)^{\top}\). Adding gives \((2+0+3,4-1+0,0-1+3)^{\top}=(5,3,2)^{\top}\), agreeing with the matrix product.

Worked Example: Finding Coefficients for a Target

Determine whether \(\mathbf{b}=(4,5)^{\top}\) belongs to the span of \(\mathbf{v}_1=(1,0)^{\top}\), \(\mathbf{v}_2=(0,1)^{\top}\), and \(\mathbf{v}_3=(1,1)^{\top}\). If it does, find all coefficient vectors that produce it.

Set \(\mathbf{A}=\begin{bmatrix}1&0&1\\0&1&1\end{bmatrix}\). The question becomes whether there is an \(\mathbf{x}=(x_1,x_2,x_3)^{\top}\) satisfying \(\mathbf{A}\mathbf{x}=\mathbf{b}\), or equivalently

$$ x_1+x_3=4, \qquad x_2+x_3=5. $$

Let the free choice \(x_3=t\), where \(t\in\mathbb{R}\). The first equation gives \(x_1=4-t\), and the second gives \(x_2=5-t\). Thus all the coefficient vectors are

$$ \mathbf{x}= \begin{bmatrix}4-t\\5-t\\t\end{bmatrix}, \qquad t\in\mathbb{R}. $$

There are solutions, so the target belongs to the span. For instance, choosing \(t=1\) gives \(\mathbf{x}=(3,4,1)^{\top}\). Check: \(3\mathbf{v}_1+4\mathbf{v}_2+\mathbf{v}_3=(3,0)^{\top}+(0,4)^{\top}+(1,1)^{\top}=(4,5)^{\top}\). In fact, substituting the full family into the product gives \((4-t+t,5-t+t)^{\top}=(4,5)^{\top}\) for every real \(t\).

Worked Example: A Target Outside the Span

Determine whether \(\mathbf{b}=(1,0)^{\top}\) belongs to the span of \(\mathbf{v}_1=(1,2)^{\top}\) and \(\mathbf{v}_2=(2,4)^{\top}\).

Use the vectors as columns, so that \(\mathbf{A}=\begin{bmatrix}1&2\\2&4\end{bmatrix}\). The coefficient equation is \(\mathbf{A}\mathbf{x}=\mathbf{b}\), with \(\mathbf{x}=(x_1,x_2)^{\top}\). Its augmented matrix reduces as follows:

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

The last row requires \(0=1\), which is impossible. Therefore there is no coefficient vector solving the equation, and the span-membership equivalence shows that \(\mathbf{b}\) is not in the span. Check: every combination is \(x_1(1,2)^{\top}+x_2(2,4)^{\top}=(x_1+2x_2,2x_1+4x_2)^{\top}\). Its second entry is twice its first, but the entries of \((1,0)^{\top}\) do not satisfy that relation. This confirms the conclusion independently.

What the Solution Set Tells You

A solution of \(\mathbf{A}\mathbf{x}=\mathbf{b}\) is a coefficient vector that expresses \(\mathbf{b}\) using the columns of \(\mathbf{A}\). If the equation is inconsistent, no such expression exists. If there is exactly one solution, there is exactly one coefficient vector for this ordered list that produces \(\mathbf{b}\). If there are multiple solutions, distinct coefficient choices produce the same target. The equivalence proved above connects each of these outcomes to span membership: membership requires at least one solution, not necessarily exactly one.

The distinction between the target and the coefficients is especially important when \(\mathbf{A}\) is not square. If there are \(p\) given vectors in \(\mathbb{R}^m\), then \(\mathbf{x}\) has \(p\) entries while \(\mathbf{b}\) has \(m\) entries. The matrix product \(\mathbf{A}\mathbf{x}\) is defined because \(\mathbf{A}\) is \(m\times p\) and \(\mathbf{x}\) is \(p\times1\); the result has \(m\) entries, as required to compare it with \(\mathbf{b}\). Checking these dimensions before calculating prevents a common setup error.

The order of the columns matters for reading the coefficients. If the list is \(\mathbf{v}_1,\mathbf{v}_2,\mathbf{v}_3\), then \(x_1\) multiplies the first column, \(x_2\) the second, and \(x_3\) the third. Changing the column order without changing the coefficient order changes the combination. A coefficient vector is meaningful only in relation to the chosen ordered list.

Common Mistake: Confusing the Coefficients with the Combination

A coefficient vector is not usually the vector produced by combining the spanning vectors. For example, take \(\mathbf{v}_1=(1,2)^{\top}\), \(\mathbf{v}_2=(3,1)^{\top}\), and coefficients \(\mathbf{x}=(2,-1)^{\top}\). A tempting but incorrect calculation is to report the combination as \((2,-1)^{\top}\), simply copying the coefficients. Instead, form the columns and multiply:

$$ \begin{bmatrix}1&3\\2&1\end{bmatrix} \begin{bmatrix}2\\-1\end{bmatrix} = \begin{bmatrix}1(2)+3(-1)\\2(2)+1(-1)\end{bmatrix} = \begin{bmatrix}-1\\3\end{bmatrix}. $$

The correct combination is \(2\mathbf{v}_1-\mathbf{v}_2=(2,4)^{\top}-(3,1)^{\top}=(-1,3)^{\top}\). The entries of \(\mathbf{x}\) are weights; the entries of \(\mathbf{A}\mathbf{x}\) are coordinates of the resulting vector in \(\mathbb{R}^2\). Checking the product by adding the weighted columns catches this mistake.

When setting up a span question, use the same sequence each time: put the given vectors into the columns, put unknown coefficients into a column vector, and set the matrix product equal to the target. Then solve the resulting equation and check any proposed coefficient vector by multiplying it back.

Check Your Understanding

For each question, identify the coefficient vector and verify any claimed combination by substitution into the matrix equation.

  1. Write \(3(1,0,2)^{\top}-2(0,1,1)^{\top}\) as a matrix-vector product and calculate the resulting vector.
  2. Set up \(\mathbf{A}\mathbf{x}=\mathbf{b}\) to test whether \((2,3)^{\top}\) belongs to the span of \((1,1)^{\top}\) and \((1,2)^{\top}\).
  3. For the vectors \((1,0)^{\top}\), \((0,1)^{\top}\), and \((1,1)^{\top}\), find all coefficient vectors that produce \((2,2)^{\top}\).
  4. Explain why solving \(\mathbf{A}\mathbf{x}=\mathbf{b}\) tests membership in the span of the columns of \(\mathbf{A}\).
  5. For \(\mathbf{v}_1=(1,2)^{\top}\) and \(\mathbf{v}_2=(2,4)^{\top}\), can a linear combination equal \((0,1)^{\top}\)? Set up the coefficient equation and justify your conclusion.

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