Skip to content
VidiMaster it, module by module
Module 1/Vector Spaces & Subspaces

Is a Vector in the Span?

Deciding whether a vector bb lies in span{v1,…,vk}\text{span}\{v_1,\ldots,v_k\} comes down to one question: is the linear system [ v1 ⋯ vk∣b ][\,v_1\ \cdots\ v_k\mid b\,] consistent? This lesson shows how to set it up, read the answer from row reduction, and recover the coefficients when bb is in the span.

Before you start — give these a try

Attempting first primes your brain for the lesson — even if you miss. Nothing is graded or saved; it's just a warm-up.

True or False: [35]∈span{[12],[24]}.\begin{bmatrix} 3 \\ 5 \end{bmatrix} \in \text{span}\left\{ \begin{bmatrix} 1 \\ 2 \end{bmatrix}, \begin{bmatrix} 2 \\ 4 \end{bmatrix} \right\}.

You row reduce [A∣b][A \mid b] and reach [12∣000∣3]\begin{bmatrix} 1 & 2 & \mid & 0 \\ 0 & 0 & \mid & 3 \end{bmatrix}. What does this tell you?

What you’ll be able to do

  • Translate the question "is bb in span{v1,…,vk}\text{span}\{v_1,\ldots,v_k\}?" into the linear system with augmented matrix [ v1 ⋯ vk∣b ][\,v_1\ \cdots\ v_k\mid b\,].
  • Use row reduction and the consistency criterion to decide whether bb is in the span.
  • Find the coefficient vector xx that writes bb as a linear combination x1v1+⋯+xkvkx_1v_1+\cdots+x_kv_k when bb is in the span.
  • Distinguish a unique solution from infinitely many, and recognize inconsistency (a pivot in the augmented column) as "not in the span".
  • Connect the algebra to its geometry: spans as lines and planes through the origin.

In your course

· MATH2015 · Linear Algebra & Probability
§2.2 Linear Combinations and Span
  • Definition 2.4Span — membership reduces to solving a1u1+⋯+akuk=ba_1u_1+\dots+a_ku_k=b
The course solves span-membership as a linear system; the systematic method (Gauss elimination) is Chapter 5.
1

From a question about vectors to a question about equations

A linear combination of vectors v1,…,vkv_1,\ldots,v_k (each in Rn\mathbb{R}^n) is any sum x1v1+x2v2+⋯+xkvk,x_1v_1 + x_2v_2 + \cdots + x_kv_k, where the weights (coefficients) x1,…,xkx_1,\ldots,x_k are real numbers. The span, written span{v1,…,vk}\text{span}\{v_1,\ldots,v_k\}, is the set of all such combinations.

So the question "is bb in span{v1,…,vk}\text{span}\{v_1,\ldots,v_k\}?" really asks: can I choose weights x1,…,xkx_1,\ldots,x_k so that x1v1+x2v2+⋯+xkvk=b ?x_1v_1 + x_2v_2 + \cdots + x_kv_k = b\ ?

  • If yes, then bb is in the span, and those weights tell you exactly how to build bb out of the given vectors.
  • If no choice of weights works, then bb is not in the span.

Geometrically, span{v}\text{span}\{v\} (one nonzero vector) is a line through the origin, span{u,v}\text{span}\{u,v\} (two non-parallel vectors) is a plane through the origin, and so on. Asking whether bb is in the span is asking whether bb sits on that line/plane.

2

Setting up the augmented matrix $[A\mid b]$

The vector equation x1v1+⋯+xkvk=bx_1v_1 + \cdots + x_kv_k = b is a linear system in disguise. Stack the vectors as the columns of a matrix A=[v1v2⋯vk],A = \begin{bmatrix} v_1 & v_2 & \cdots & v_k \end{bmatrix}, so AA is n×kn\times k (here nn is the number of entries in each vector and kk is the number of vectors). The equation becomes the matrix equation Ax=b,x=[x1⋮xk].Ax = b, \qquad x = \begin{bmatrix} x_1 \\ \vdots \\ x_k \end{bmatrix}.

To solve it, build the augmented matrix by placing bb as one extra column on the right: [A∣b]=[v1⋯vkb].[A \mid b] = \left[\begin{array}{ccc|c} v_1 & \cdots & v_k & b \end{array}\right].

Each original vector is a column on the left of the bar; bb is the single column to the right. Row reducing this matrix solves the system — and the answer to "is bb in the span?" is read directly off the result.

3

The consistency criterion: reading the row-reduced form

A system is consistent if it has at least one solution and inconsistent if it has none. Span membership is exactly consistency: b∈span{v1,…,vk}  ⟺  Ax=b is consistent.b \in \text{span}\{v_1,\ldots,v_k\} \iff Ax=b \text{ is consistent.}

To check, row reduce [A∣b][A\mid b] to echelon form and inspect the last column:

  • If some row has the form [00⋯0∣c]\begin{bmatrix} 0 & 0 & \cdots & 0 & \mid & c \end{bmatrix} with c≠0c \neq 0 — a pivot in the augmented column — that row asserts 0=c0 = c, a contradiction. The system is inconsistent, so bb is not in the span.
  • If no such row appears, the system is consistent, so bb is in the span.

Equivalently, in rank language: the system is consistent iff rank⁡(A)=rank⁡([A∣b])\operatorname{rank}(A) = \operatorname{rank}([A\mid b]) — that is, adjoining bb created no new pivot.

4

Finding the coefficients — and how many there are

When the system is consistent, finishing the row reduction hands you the weights.

  • Unique solution — a pivot in every coefficient column, i.e. no free variables. There is exactly one weight vector xx. This occurs precisely when v1,…,vkv_1,\ldots,v_k are linearly independent. For example, reducing to [10∣201∣1]\begin{bmatrix} 1 & 0 & \mid & 2 \\ 0 & 1 & \mid & 1 \end{bmatrix} gives x1=2, x2=1x_1=2,\ x_2=1.
  • Infinitely many solutions — at least one free variable (a coefficient column with no pivot). Then bb is still in the span, but it can be written as a combination in infinitely many ways. This happens when the spanning vectors are linearly dependent.

To read off a solution, set any free variables to a convenient value (often 00) and back-substitute. Always sanity-check: plug the weights back in and confirm x1v1+⋯+xkvk=bx_1v_1 + \cdots + x_kv_k = b.

Span and Linear Combination (Definition)

For vectors v1,…,vk∈Rnv_1,\ldots,v_k \in \mathbb{R}^n,   span{v1,…,vk}={ x1v1+⋯+xkvk:x1,…,xk∈R }\;\text{span}\{v_1,\ldots,v_k\} = \{\, x_1v_1 + \cdots + x_kv_k : x_1,\ldots,x_k \in \mathbb{R} \,\}, the set of all linear combinations of the viv_i. A vector bb is in the span iff b=x1v1+⋯+xkvkb = x_1v_1 + \cdots + x_kv_k for some scalars xix_i.

Intuition. The span is everything you can reach by scaling the given vectors and adding them up. Membership just asks whether bb is one of those reachable points.
Span Membership as System Consistency

Let A=[ v1 ⋯ vk ]A = [\,v_1\ \cdots\ v_k\,] be the matrix whose columns are the spanning vectors. Then b∈span{v1,…,vk}b \in \text{span}\{v_1,\ldots,v_k\} if and only if the linear system Ax=bAx = b (augmented matrix [A∣b][A\mid b]) is consistent.

Intuition. Writing bb as a combination of the columns is literally solving Ax=bAx=b; the entries of any solution xx are the coefficients. So "in the span" and "the system has a solution" are the same statement.
Consistency Criterion

A linear system with augmented matrix [A∣b][A\mid b] is consistent if and only if, after row reduction, there is no row of the form [ 0 ⋯ 0∣c ][\,0\ \cdots\ 0\mid c\,] with c≠0c \neq 0 — equivalently, no pivot in the augmented column, equivalently rank⁡(A)=rank⁡([A∣b])\operatorname{rank}(A) = \operatorname{rank}([A\mid b]).

Intuition. A pivot in the last column encodes the impossible equation 0=c0 = c. If that never appears, the equations are compatible and at least one solution exists.

Worked examples

Example 1

Determine whether b=[55]b = \begin{bmatrix} 5 \\ 5 \end{bmatrix} lies in span{[12],[31]}\text{span}\left\{ \begin{bmatrix} 1 \\ 2 \end{bmatrix}, \begin{bmatrix} 3 \\ 1 \end{bmatrix} \right\}. If it does, find the coefficients.

  1. 1

    Set up the vector equation. We seek scalars x1,x2x_1, x_2 with x1[12]+x2[31]=[55]x_1\begin{bmatrix} 1 \\ 2 \end{bmatrix} + x_2\begin{bmatrix} 3 \\ 1 \end{bmatrix} = \begin{bmatrix} 5 \\ 5 \end{bmatrix}. This is exactly the question of whether bb is a linear combination of the two given vectors.

  2. 2

    Write it as a system by matching components: x1+3x2=5x_1 + 3x_2 = 5 (top entries) and 2x1+x2=52x_1 + x_2 = 5 (bottom entries).

  3. 3

    Form the augmented matrix [A∣b]=[13∣521∣5][A\mid b] = \begin{bmatrix} 1 & 3 & \mid & 5 \\ 2 & 1 & \mid & 5 \end{bmatrix}, where column 1 is v1v_1, column 2 is v2v_2, and the last column is bb.

  4. 4

    Eliminate below the first pivot: R2→R2−2R1R_2 \to R_2 - 2R_1 gives [13∣50−5∣−5]\begin{bmatrix} 1 & 3 & \mid & 5 \\ 0 & -5 & \mid & -5 \end{bmatrix}.

  5. 5

    Scale the second row: R2→−15R2R_2 \to -\tfrac{1}{5}R_2 gives [13∣501∣1]\begin{bmatrix} 1 & 3 & \mid & 5 \\ 0 & 1 & \mid & 1 \end{bmatrix}, so x2=1x_2 = 1.

  6. 6

    Clear above the second pivot: R1→R1−3R2R_1 \to R_1 - 3R_2 gives [10∣201∣1]\begin{bmatrix} 1 & 0 & \mid & 2 \\ 0 & 1 & \mid & 1 \end{bmatrix}, so x1=2x_1 = 2.

  7. 7

    Apply the consistency criterion. There is no row [ 0 0∣c ][\,0\ 0\mid c\,] with c≠0c\neq0, so the system is consistent: bb is in the span. A pivot sits in each coefficient column, so the solution is unique.

  8. 8

    Verify: 2[12]+1[31]=[2+34+1]=[55].2\begin{bmatrix} 1 \\ 2 \end{bmatrix} + 1\begin{bmatrix} 3 \\ 1 \end{bmatrix} = \begin{bmatrix} 2+3 \\ 4+1 \end{bmatrix} = \begin{bmatrix} 5 \\ 5 \end{bmatrix}. ✓

Answer. Yes, b∈spanb \in \text{span}. The unique coefficients are x1=2, x2=1x_1 = 2,\ x_2 = 1, i.e. x=[21]x = \begin{bmatrix} 2 \\ 1 \end{bmatrix}.
Example 2

Is b=[11]b = \begin{bmatrix} 1 \\ 1 \end{bmatrix} in span{[12],[24]}\text{span}\left\{ \begin{bmatrix} 1 \\ 2 \end{bmatrix}, \begin{bmatrix} 2 \\ 4 \end{bmatrix} \right\}?

Example 3

Find scalars x1,x2,x3x_1, x_2, x_3 with x1[101]+x2[011]+x3[110]=[233]x_1\begin{bmatrix} 1 \\ 0 \\ 1 \end{bmatrix} + x_2\begin{bmatrix} 0 \\ 1 \\ 1 \end{bmatrix} + x_3\begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix} = \begin{bmatrix} 2 \\ 3 \\ 3 \end{bmatrix}, or show none exist.