Logo
Span & Span solutions

Span & Span solutions

Chara Chara
October 3, 2025
2 min read
index
Note (Extra Reading)

3Blue1Brown’s linear algebra series for Linear combinations, span, and basis vectors. Start with this episode:

Vector Equation

Given vectors {a1,a2,,an,b}\{\vec{a}_1,\vec{a}_2,\dots,\vec{a}_n,\vec{b}\} in Rm\mathbb{R}^m, determine if b\vec{b} is a linear combination of a1,,an\vec{a}_1,\dots,\vec{a}_n

This is equivalent to solving the vector equation:

x1a1++xnan=bx_1\vec{a}_1+\cdots+x_n\vec{a}_n=\vec{b}

Which is the same as checking if the augmented matrix

[a1  a2    an    b]\left[\vec{a}_1\;\vec{a}_2\;\cdots\;\vec{a}_n\;|\;\vec{b}\right]

has a solution (via EROS).


Review

  • b\vec{b} is a linear combination of a1,,an\vec{a}_1,\dots,\vec{a}_n
  • The vector equation x1a1++xnan=bx_1\vec{a}_1+\cdots+x_n\vec{a}_n=\vec{b} has a solution.
  • We answer this by reducing the augmented matrix to (reduced) echelon form.

Example

Suppose

a1=[0248],    a2=[0248],    a3=[6111],    a4=[061026],    b=[1241323]\vec{a}_1=\begin{bmatrix}0\\2\\4\\8\end{bmatrix},\;\; \vec{a}_2=\begin{bmatrix}0\\2\\4\\8\end{bmatrix},\;\; \vec{a}_3=\begin{bmatrix}6\\-1\\1\\-1\end{bmatrix},\;\; \vec{a}_4=\begin{bmatrix}0\\6\\10\\26\end{bmatrix},\;\; \vec{b}=\begin{bmatrix}12\\4\\13\\23\end{bmatrix}

We want x1a1+x2a2+x3a3+x4a4=bx_1\vec{a}_1+x_2\vec{a}_2+x_3\vec{a}_3+x_4\vec{a}_4=\vec{b}

Augmented matrix:

[0060122216444110138812623]\begin{bmatrix} 0&0&6&0&|&12\\ 2&2&-1&6&|&4\\ 4&4&1&10&|&13\\ 8&8&-1&26&|&23 \end{bmatrix}

Row-reduce (EROS) to:

[11003/20010200011/200000]\begin{bmatrix} 1&1&0&0&|&3/2\\ 0&0&1&0&|&2\\ 0&0&0&1&|&1/2\\ 0&0&0&0&|&0 \end{bmatrix}

The solution is a one-dimensional general solution

x1=32s,    x2=s,    x3=2,    x4=12x_1=\tfrac{3}{2}-s,\;\;x_2=s,\;\;x_3=2,\;\;x_4=\tfrac{1}{2}

From Vectors to Span

  • Linear combinations involve adding vectors.
  • This is how we visualize addition of vectors:

Vector addition Figure 1: Vector addition visualization

We often have to consider all possible linear combinations of a given collection of vectors.

In solving systems with infinitely many solutions, the solutions involve

s[11000]+t[π0e10]s\begin{bmatrix}-1\\1\\0\\0\\0\end{bmatrix} +t\begin{bmatrix}-\pi\\0\\-e\\1\\0\end{bmatrix}

for any choices of s,ts,t


Span

Definition (Span)

Given {v1,v2,,vk}\{\vec{v}_1,\vec{v}_2,\dots,\vec{v}_k\}, the set of all linear combinations:

c1v1++ckvk,ciRc_1\vec{v}_1+\cdots+c_k\vec{v}_k,\quad c_i\in\mathbb{R}

is called the span of {v1,,vk}\{\vec{v}_1,\dots,\vec{v}_k\}, denoted

Span{v1,,vk}\text{Span}\{\vec{v}_1,\dots,\vec{v}_k\}

If k=1k=1 so there’s only one vector, then Span{v}\text{Span}\{\vec{v}\} is just all vectors that are multiples of v\vec{v}

i.e., {cvcR}\{c\vec{v}\mid c\in\mathbb{R}\} (a line through 0\vec{0} and v\vec{v}).

Example The collection of vectors

s[11000]+t[π0e10]s\begin{bmatrix}-1\\1\\0\\0\\0\end{bmatrix} +t\begin{bmatrix}-\pi\\0\\-e\\1\\0\end{bmatrix}

for all possible choices of s,ts, t form the span

Span{[11000],[π0e10]}\text{Span}\left\{ \begin{bmatrix}-1\\1\\0\\0\\0\end{bmatrix}, \begin{bmatrix}-\pi\\0\\-e\\1\\0\end{bmatrix} \right\}

Visualization

Picture this span when k=1,2k=1,2:

  • k=1k=1: span is a line through 0\vec{0} and v\vec{v}Span{v}={cv}\text{Span}\{\vec{v}\}=\{c\vec{v}\}
  • k=2k=2: span is Span{u,v}={c1u+c2v}\text{Span}\{\vec{u},\vec{v}\}=\{c_1\vec{u}+c_2\vec{v}\} (Figure 2)

Span as plane Figure 2: when k=2k=2, Span = entire plane, ci>0c_i > 0 highlighted

Spanning Solutions

Back to example above:

[0060122216444110138812623]        [11003/20010200011/200000]\begin{bmatrix} \begin{array}{cccc|c} 0&0&6&0&&12\\ 2&2&-1&6&&4\\ 4&4&1&10&&13\\ 8&8&-1&26&&23 \end{array} \end{bmatrix} \;\;\Rightarrow\;\; \begin{bmatrix} \begin{array}{cccc|c} 1&1&0&0&&3/2\\ 0&0&1&0&&2\\ 0&0&0&1&&1/2\\ 0&0&0&0&&0 \end{array} \end{bmatrix}

General solution was

x1=32t,    x2=t,    x3=2,    x4=12x_1=\tfrac{3}{2}-t,\;\;x_2=t,\;\;x_3=2,\;\;x_4=\tfrac{1}{2}

We can rewrite this as

[c1c2c3c4]=[3/2021/2]+t[1100]\begin{bmatrix}c_1\\c_2\\c_3\\c_4\end{bmatrix} = \begin{bmatrix}3/2\\0\\2\\1/2\end{bmatrix} +t\begin{bmatrix}-1\\1\\0\\0\end{bmatrix}

So we can think of the set of all solutions as

[3/2021/2]+Span{[1100]}\begin{bmatrix}3/2\\0\\2\\1/2\end{bmatrix} +\text{Span}\left\{\begin{bmatrix}-1\\1\\0\\0\end{bmatrix}\right\}

where p=[3/2021/2]\vec{p}=\begin{bmatrix}3/2\\0\\2\\1/2\end{bmatrix} is a point, and d=[1100]\vec{d}=\begin{bmatrix}-1\\1\\0\\0\end{bmatrix} is the direction.

We can picture the solution as a line in the direction of the second vector, going through the point given by the first vector (In R4\mathbb{R}^4)

Span as line *Figure 3: Visualization of spanning solutoin