Span
The span of a set of vectors is every point you can reach by scaling and adding them.
Definition
The span of vectors v1, ..., vk is the set of all their linear combinations, c1 v1 + ... + ck vk, as the coefficients range over all scalars. It is the smallest subspace containing those vectors. Geometrically, the span of one nonzero vector is a line, the span of two independent vectors is a plane, and so on.
Span and the column space
The column space of a matrix is precisely the span of its columns. Solving Ax = b asks whether b lies in the span of A's columns; if it does, the entries of x are the combination coefficients. This is why span connects directly to the solvability of linear systems.
Spanning sets versus bases
A set that spans a space may contain redundancy. If a spanning set is also linearly independent, it is a basis, the most economical description of the space. Any spanning set can be trimmed to a basis by discarding vectors that are combinations of the others, and any independent set can be extended to a basis by adding vectors.
Dimension
The dimension of a subspace is the number of vectors in any of its bases; all bases have the same size. The span of k vectors has dimension at most k, with equality exactly when the vectors are independent. Adding a vector already in the span does not increase the dimension.
import numpy as np
# Does b lie in the span of the columns of A?
A = np.array([[1.0, 1.0], [0.0, 1.0], [1.0, 2.0]])
b = np.array([2.0, 1.0, 3.0])
x, res, rank, sv = np.linalg.lstsq(A, b, rcond=None)
print(np.allclose(A @ x, b)) # True means b is in the span
In reduced-order modeling, engineers seek a small set of modes whose span captures the dominant behavior of a full simulation, trading exactness for a far smaller state description.