Mathwords logoMathwords

Span — Definition, Formula & Examples

The span of a set of vectors is every vector you can build by scaling those vectors and adding the results. For example, the span of one nonzero vector in the plane is a line through the origin.

Let v1,…,vk\mathbf{v}_1, \dots, \mathbf{v}_k be vectors in a vector space VV over R\mathbb{R}. Their span, written span⁡{v1,…,vk}\operatorname{span}\{\mathbf{v}_1, \dots, \mathbf{v}_k\}, is the set of all linear combinations c1v1+⋯+ckvkc_1\mathbf{v}_1 + \cdots + c_k\mathbf{v}_k with real scalars cic_i. It is the smallest subspace of VV that contains every vi\mathbf{v}_i. For an infinite set SS, the span is the set of all finite linear combinations of vectors in SS. By convention, span⁡(∅)={0}\operatorname{span}(\varnothing) = \{\mathbf{0}\}.

Key Formula

span⁡{v1,…,vk}={ c1v1+c2v2+⋯+ckvk  :  c1,…,ck∈R }\operatorname{span}\{\mathbf{v}_1,\dots,\mathbf{v}_k\} = \{\,c_1\mathbf{v}_1 + c_2\mathbf{v}_2 + \cdots + c_k\mathbf{v}_k \;:\; c_1,\dots,c_k \in \mathbb{R}\,\}
Where:
  • vi\mathbf{v}_i = The given vectors, all in the same vector space (for example Rn\mathbb{R}^n)
  • cic_i = Real scalars, called weights. Any real value is allowed, including zero and negatives.
  • kk = The number of vectors in the set

How It Works

To decide whether a vector b\mathbf{b} lies in a span, write b=c1v1+⋯+ckvk\mathbf{b} = c_1\mathbf{v}_1 + \cdots + c_k\mathbf{v}_k and solve for the weights cic_i. This is a linear system whose augmented matrix is [ v1 ⋯ vk∣b ][\,\mathbf{v}_1 \ \cdots \ \mathbf{v}_k \mid \mathbf{b}\,]. If the system is consistent, b\mathbf{b} is in the span. If it is inconsistent, b\mathbf{b} is not. The vectors span all of Rn\mathbb{R}^n exactly when the matrix with those vectors as columns has a pivot in every row.

Worked Example

Problem: Let v1=(1,1,0)\mathbf{v}_1 = (1, 1, 0) and v2=(0,1,2)\mathbf{v}_2 = (0, 1, 2). Is b=(3,5,4)\mathbf{b} = (3, 5, 4) in span⁡{v1,v2}\operatorname{span}\{\mathbf{v}_1, \mathbf{v}_2\}?
Step 1: Set b\mathbf{b} equal to a linear combination of the vectors. Then match components to get a system of equations.
c1(1,1,0)+c2(0,1,2)=(3,5,4)  ⟹  {c1=3c1+c2=52c2=4c_1(1,1,0) + c_2(0,1,2) = (3,5,4) \;\Longrightarrow\; \begin{cases} c_1 = 3 \\ c_1 + c_2 = 5 \\ 2c_2 = 4 \end{cases}
Step 2: The first equation gives c1=3c_1 = 3. Substitute this value into the second equation and solve for c2c_2.
3+c2=5  ⟹  c2=23 + c_2 = 5 \;\Longrightarrow\; c_2 = 2
Step 3: Check the third equation using c2=2c_2 = 2. It holds, so the system is consistent.
2c2=2(2)=4  ✓2c_2 = 2(2) = 4 \;\checkmark
Answer: Yes. b=3v1+2v2\mathbf{b} = 3\mathbf{v}_1 + 2\mathbf{v}_2, so b\mathbf{b} is in the span. Geometrically, the span is a plane through the origin in R3\mathbb{R}^3, and b\mathbf{b} lies on that plane.

Another Example

Problem: Do u=(1,2)\mathbf{u} = (1, 2) and w=(3,1)\mathbf{w} = (3, 1) span all of R2\mathbb{R}^2?
Step 1: Take an arbitrary target (x,y)(x, y) and set up the system c1u+c2w=(x,y)c_1\mathbf{u} + c_2\mathbf{w} = (x, y).
{c1+3c2=x2c1+c2=y\begin{cases} c_1 + 3c_2 = x \\ 2c_1 + c_2 = y \end{cases}
Step 2: The coefficient matrix has a nonzero determinant. So the system has a unique solution for every (x,y)(x, y).
det⁡[1321]=1−6=−5≠0\det\begin{bmatrix} 1 & 3 \\ 2 & 1 \end{bmatrix} = 1 - 6 = -5 \neq 0
Step 3: Solving gives explicit weights. You can substitute them back into both equations to confirm they work.
c1=3y−x5,c2=2x−y5c_1 = \frac{3y - x}{5}, \qquad c_2 = \frac{2x - y}{5}
Answer: Yes. Every vector (x,y)(x, y) in R2\mathbb{R}^2 is a linear combination of u\mathbf{u} and w\mathbf{w}, so span⁡{u,w}=R2\operatorname{span}\{\mathbf{u}, \mathbf{w}\} = \mathbb{R}^2.

Why It Matters

In a first college linear algebra course, span is the building block for column space, basis, and dimension. The system Ax=bA\mathbf{x} = \mathbf{b} has a solution exactly when b\mathbf{b} lies in the span of the columns of AA. In statistics and data science, least-squares regression finds the vector in the span of the predictor columns that is closest to the data vector.

Common Mistakes

Mistake: Assuming that more vectors always give a bigger span, or that kk vectors always span a kk-dimensional space.
Correction: Redundant vectors add nothing. The vectors (1,2)(1,2) and (2,4)(2,4) span only a line, because (2,4)=2(1,2)(2,4) = 2(1,2). Check for linear independence, or count the pivots, to find the true dimension of the span.
Mistake: Allowing only positive or whole-number weights, and so forgetting that the zero vector and negative multiples are in the span.
Correction: The weights cic_i can be any real numbers. Setting every ci=0c_i = 0 shows that 0\mathbf{0} is always in the span. Negative weights mean the span of one nonzero vector is a full line through the origin, not just a ray.

Related Terms