Spans

Motivation

Given a few vectors, what are all the vectors you can build from them using addition and scaling? The collection of all such combinations is called the span of the original vectors (Strang 2016). The span captures the reach of a set of vectors: which points lie inside it and which lie outside, which equations can be solved using only those vectors, and which directions remain inaccessible.

Spans are the bridge between a finite list of vectors and the (typically infinite) geometric object they generate — a line, a plane, or a higher-dimensional subspace. They are the natural target for bases, the kernels and ranges studied through matrix rank, and the building blocks of vector spaces.

Definition

The span of a set of vectors \(\mathbf{v}_1, \ldots, \mathbf{v}_k \in \mathbb{R}^n\) is the set of all of their linear combinations:

\[ \operatorname{span}(\mathbf{v}_1, \ldots, \mathbf{v}_k) = \left\{ c_1 \mathbf{v}_1 + c_2 \mathbf{v}_2 + \cdots + c_k \mathbf{v}_k : c_i \in \mathbb{R} \right\}. \]

A vector \(\mathbf{w}\) lies in the span if and only if there exist scalars \(c_1, \ldots, c_k\) such that \(\mathbf{w} = c_1 \mathbf{v}_1 + \cdots + c_k \mathbf{v}_k\). Equivalently, the linear system \(V \mathbf{c} = \mathbf{w}\) has a solution, where \(V = [\mathbf{v}_1 \;\cdots\; \mathbf{v}_k]\).

By convention \(\operatorname{span}(\emptyset) = \{\mathbf{0}\}\).

One vector

A single nonzero vector \(\mathbf{v}\) spans the line through the origin in the direction of \(\mathbf{v}\):

\[ \operatorname{span}(\mathbf{v}) = \{c \mathbf{v} : c \in \mathbb{R}\}. \]

For \(\mathbf{v} = (1, 2)^\top\) this is the line \(y = 2x\) in \(\mathbb{R}^2\).

Two vectors

Two linearly independent vectors in \(\mathbb{R}^3\) span the plane through the origin containing both. For

\[ \mathbf{v}_1 = \begin{pmatrix} 1 \\ 0 \\ 0 \end{pmatrix}, \quad \mathbf{v}_2 = \begin{pmatrix} 0 \\ 1 \\ 0 \end{pmatrix}, \]

the span is the \(xy\)-plane. If instead \(\mathbf{v}_2 = 2\mathbf{v}_1\), both vectors lie on the same line and the span collapses to that line.

Spans Are Subspaces

The span of any set of vectors in \(\mathbb{R}^n\) is a subspace: it contains the zero vector, and it is closed under addition and scalar multiplication.

  • Contains zero: taking \(c_1 = \cdots = c_k = 0\) gives \(\mathbf{0}\).
  • Closed under addition: \((c_1 \mathbf{v}_1 + \cdots) + (d_1 \mathbf{v}_1 + \cdots) = (c_1 + d_1) \mathbf{v}_1 + \cdots\) is again a linear combination.
  • Closed under scalar multiplication: \(\alpha (c_1 \mathbf{v}_1 + \cdots) = (\alpha c_1) \mathbf{v}_1 + \cdots\) is again a linear combination.

Conversely, every subspace of \(\mathbb{R}^n\) is the span of some finite set of vectors — this is one direction of why “span” and “subspace of \(\mathbb{R}^n\)” are essentially interchangeable concepts.

Spanning Sets

A set of vectors \(S = \{\mathbf{v}_1, \ldots, \mathbf{v}_k\}\) is said to span a subspace \(W\) if \(\operatorname{span}(S) = W\). The vectors are then called a spanning set for \(W\).

Spanning sets are not unique. The \(xy\)-plane in \(\mathbb{R}^3\) is spanned by \(\{\mathbf{e}_1, \mathbf{e}_2\}\), by \(\{\mathbf{e}_1, \mathbf{e}_1 + \mathbf{e}_2\}\), and by \(\{\mathbf{e}_1, \mathbf{e}_2, \mathbf{e}_1 - \mathbf{e}_2\}\) — the last is redundant but still spans the same plane.

A spanning set is minimal when no vector can be removed without shrinking the span. Minimal spanning sets are exactly bases, and minimality is equivalent to linear independence.

Column Space and Row Space

Two spans associated with a matrix \(A \in \mathbb{R}^{m \times n}\) appear constantly in linear algebra:

  • Column space \(\operatorname{Col}(A) \subseteq \mathbb{R}^m\) — the span of the columns of \(A\). A vector \(\mathbf{b}\) lies in \(\operatorname{Col}(A)\) if and only if \(A\mathbf{x} = \mathbf{b}\) has a solution.
  • Row space \(\operatorname{Row}(A) \subseteq \mathbb{R}^n\) — the span of the rows of \(A\), equivalently the column space of \(A^\top\).

The column space describes which right-hand sides \(\mathbf{b}\) make \(A\mathbf{x} = \mathbf{b}\) solvable. The row space describes the directions in input space that \(A\) “sees.” Both have dimension equal to the rank of \(A\).

Example

Is \(\mathbf{w} = (3, 5, 7)^\top\) in the span of

\[ \mathbf{v}_1 = \begin{pmatrix} 1 \\ 1 \\ 1 \end{pmatrix}, \quad \mathbf{v}_2 = \begin{pmatrix} 1 \\ 2 \\ 3 \end{pmatrix}? \]

Solve \(c_1 \mathbf{v}_1 + c_2 \mathbf{v}_2 = \mathbf{w}\). From the first two coordinates,

\[ c_1 + c_2 = 3, \qquad c_1 + 2c_2 = 5. \]

Subtracting gives \(c_2 = 2\) and then \(c_1 = 1\). Check the third coordinate: \(c_1 + 3c_2 = 1 + 6 = 7\). ✓

So \(\mathbf{w} = \mathbf{v}_1 + 2\mathbf{v}_2\) is in the span. The two vectors \(\mathbf{v}_1, \mathbf{v}_2\) are linearly independent, so they span a 2-dimensional plane in \(\mathbb{R}^3\), and \(\mathbf{w}\) happens to lie on it.

If instead \(\mathbf{w} = (3, 5, 8)^\top\), the system becomes inconsistent on the third coordinate (\(1 + 6 \neq 8\)), so \(\mathbf{w}\) lies outside the plane \(\operatorname{span}(\mathbf{v}_1, \mathbf{v}_2)\).

References

Strang, Gilbert. 2016. Introduction to Linear Algebra. 5th ed. Wellesley-Cambridge Press.