How to Find the Span of a Set of Vectors
The span of a set of vectors is one of the most fundamental ideas in linear algebra, yet it trips up students more than almost any other concept. This guide walks through every practical question you might have about spans: what they are, how to find the dimension of one, how to check whether a particular vector belongs to one, and how to tell whether a set of vectors spans all of R^n.
What the Span of Vectors Actually Means
Given vectors v₁, v₂, ..., vₖ in R^n, their span is the set of all vectors you can build by taking linear combinations:
Span{v₁, v₂, ..., vₖ} = { c₁v₁ + c₂v₂ + ... + cₖvₖ | c₁, c₂, ..., cₖ ∈ ℝ }
Think of it geometrically. Two non-parallel vectors in R^3 span a plane through the origin. One nonzero vector spans a line. Three vectors that all happen to lie in the same plane still only span that plane, not all of R^3. The scalars c₁, c₂, ..., cₖ can be any real numbers, including negative ones and zero.
This is not an abstract definition you can afford to leave vague. Every question about spans reduces to asking: can I write some target vector as a combination of the given ones? Row reduction gives you a direct answer.
Finding the Dimension of the Span
The dimension of Span{v₁, ..., vₖ} equals the number of pivot positions when you put the vectors as columns of a matrix and row-reduce.
Example. Find the dimension of Span{v₁, v₂, v₃} where:
v₁ = [1, 2, 3]
v₂ = [2, 4, 6]
v₃ = [0, 1, 2]
Form the matrix A with these as columns and reduce:
A = | 1 2 0 |
| 2 4 1 |
| 3 6 2 |
Row operations: R2 = R2 - 2R1, R3 = R3 - 3R1:
| 1 2 0 |
| 0 0 1 |
| 0 0 2 |
Then R3 = R3 - 2R2:
| 1 2 0 |
| 0 0 1 |
| 0 0 0 |
Two pivot columns (columns 1 and 3), so the dimension of the span is 2. The span is a plane in R^3, not all of R^3.
Notice that v₂ = 2v₁, which is why it contributed no new pivot. Redundant vectors never increase the dimension of the span. For a fuller treatment of how pivots connect to independence, see RREF and linear independence.
Does a Given Vector Belong to the Span?
To check whether a vector b lies in Span{v₁, ..., vₖ}, form the augmented matrix [A | b] and row-reduce. If the system is consistent, b is in the span. If you get a contradiction row (0 = nonzero), it is not.
Example. Does b = [1, 3, 5] belong to Span{v₁, v₂} where:
v₁ = [1, 0, 2]
v₂ = [0, 1, 1]
Set up the augmented matrix:
| 1 0 | 1 |
| 0 1 | 3 |
| 2 1 | 5 |
R3 = R3 - 2R1:
| 1 0 | 1 |
| 0 1 | 3 |
| 0 1 | 3 |
R3 = R3 - R2:
| 1 0 | 1 |
| 0 1 | 3 |
| 0 0 | 0 |
No contradiction. The system is consistent, so b is in the span. The solution c₁ = 1, c₂ = 3 gives the explicit combination: b = 1·v₁ + 3·v₂.
Now try b = [1, 3, 6] with the same vectors:
| 1 0 | 1 |
| 0 1 | 3 |
| 2 1 | 6 |
R3 = R3 - 2R1, then R3 = R3 - R2:
| 1 0 | 1 |
| 0 1 | 3 |
| 0 0 | 1 |
The last row says 0 = 1. Inconsistent, so b is not in the span. For more on reading consistent versus inconsistent systems from the augmented matrix, see consistent vs inconsistent systems.
Do These Vectors Span All of R^n?
A set of vectors spans all of R^n exactly when the coefficient matrix (vectors as columns) has a pivot in every row after row reduction. With fewer than n vectors, this is impossible regardless of what they are. With n or more vectors, you have to check.
Example. Do the columns of A span R^3?
A = | 1 0 2 |
| 0 1 1 |
| 1 1 3 |
Row reduce:
R3 = R3 - R1:
| 1 0 2 |
| 0 1 1 |
| 0 1 1 |
R3 = R3 - R2:
| 1 0 2 |
| 0 1 1 |
| 0 0 0 |
Only two pivots. Row 3 has no pivot, so the columns do not span R^3. The span is a plane.
Swap out the third column for [2, 1, 4]:
A = | 1 0 2 |
| 0 1 1 |
| 1 1 4 |
R3 = R3 - R1 - R2:
| 1 0 2 |
| 0 1 1 |
| 0 0 2 |
Three pivots, one per row. These columns do span R^3. The connection between pivot count and rank is covered in detail at how to find the rank of a matrix.
Span vs Basis: Trimming Down to Essentials
A spanning set might contain redundant vectors, but a basis strips those out. Starting from a spanning set, you can find a basis for the span by keeping only the original column vectors corresponding to pivot columns in the reduced matrix.
From the first dimension example above, columns 1 and 3 (v₁ and v₃) are pivot columns, so {v₁, v₃} is a basis for the span. Column 2 (v₂ = 2v₁) is redundant. The basis has two vectors, confirming the dimension is 2.
This is exactly the column space basis algorithm. If you want to find a basis for the column space of a matrix from scratch, the process is the same: row-reduce, identify pivot columns, return those original columns. More detail lives in how to find a basis for the column space.
Frequently Asked Questions
Can two different sets of vectors have the same span?
Yes, and this happens constantly. The span depends on which subspace the vectors collectively cover, not on the specific vectors chosen. The sets {[1,0], [0,1]} and {[1,1], [1,-1]} both span all of R^2, even though the vectors look nothing alike. As long as both sets produce the same set of linear combinations, their spans are equal.
What is the span of the empty set?
By convention, the span of the empty set is {0}, the set containing only the zero vector. This might seem like a technicality, but it keeps the theory consistent: a subspace must contain the zero vector, and {0} is the smallest possible subspace.
If I add more vectors to a spanning set, does the span always get bigger?
Not necessarily. Adding a vector that is already in the current span changes nothing. Span{v₁, v₂, v₁+v₂} = Span{v₁, v₂} because v₁+v₂ is already a linear combination of v₁ and v₂. The span only grows when you introduce a vector that is linearly independent from the existing ones.
How many vectors does it take to span R^n?
At minimum, n vectors are required to span R^n, and they must be linearly independent (i.e., they must form a basis). You can use more than n vectors, but at least n of them must be independent for the span to fill R^n. Any set of fewer than n vectors can span at most an (n-1)-dimensional subspace, no matter how carefully you pick them.