Span and Linear Independence
Describe the span of a set of vectors, test vectors for linear independence with row reduction, and spot redundant vectors at a glance.
Welcome back!
Step 1 of 12Learn
What can you reach?
A robot on a flat floor can only drive forward and backward along its wheels' direction, (1, 0), and it can be rotated to drive along (1, 1). Combining moves along these two directions, which points can it reach? Every point on the floor. Given any target (a, b), it drives b units along (1, 1) and a − b units along (1, 0).
The set of all linear combinations of some vectors is their span. The span of (1, 0) and (1, 1) is all of ℝ².
Spans in ℝ³ come in four shapes:
- The span of the zero vector alone is just the origin.
- The span of one nonzero vector is a line through the origin.
- The span of two non-parallel vectors is a plane through the origin.
- The span of three vectors that don't all lie in one plane is all of ℝ³.
Every span passes through the origin, because choosing all weights equal to zero gives the zero vector. So a line or plane that misses the origin is never a span.
To test whether a vector b is in the span of v₁, …, vₖ, you ask whether c₁v₁ + … + cₖvₖ = b has a solution. Put the vᵢ as columns of a matrix A and solve Ax = b. If row reduction finds a solution, b is in the span; if it hits a contradiction, b is not. The question "is b in the span of the columns?" is exactly the question "does Ax = b have a solution?" This is the column picture of a linear system.
Step 2 of 12Practice · Choose one
What is the span of u = (1, 2, 3) and v = (2, 4, 6) in ℝ³?
Step 3 of 12Practice · Diagram
What can a span be in ℝ³?
u = (1, 0, 1), v = (0, 1, 1) and w = (1, 1, 2) = u + v. Tap their span.
Tap the shape that answers the question, then press Check.
- The origin only
Span of the zero vector, or of no vectors at all.
- A line through the origin
One nonzero vector, or several that are all multiples of it.
- A plane through the origin
Two vectors pointing in different directions.
- All of ℝ³
Three independent vectors.
Step 4 of 12Learn
Linear independence
Some sets contain redundancy. In {(1, 0), (0, 1), (2, 3)}, the third vector is 2(1, 0) + 3(0, 1). It adds nothing to the span, because the first two already reach everything it can.
Vectors v₁, …, vₖ are linearly dependent if one of them is a linear combination of the others. Equivalently, some combination with weights not all zero gives the zero vector:
2(1, 0) + 3(0, 1) − 1(2, 3) = (0, 0).
They are linearly independent if the only way to combine them into the zero vector is the trivial one, with every weight equal to 0.
Test by row reduction. Put the vectors as columns of a matrix A and solve Ax = 0. If every column gets a pivot, the only solution is x = 0 and the vectors are independent. If some column has no pivot, there's a free variable, a nontrivial solution exists, and the vectors are dependent.
Example. Are (1, 2, 1), (0, 1, 1) and (2, 5, 3) independent? Row reduce the matrix with these columns:
[1 0 2; 2 1 5; 1 1 3] → R2 − 2R1 and R3 − R1 → [1 0 2; 0 1 1; 0 1 1] → R3 − R2 → [1 0 2; 0 1 1; 0 0 0].
Column 3 has no pivot, so they're dependent. In fact the reduced matrix reveals the relation: column 3 = 2·column 1 + 1·column 2. Check: 2(1, 2, 1) + (0, 1, 1) = (2, 5, 3).
Step 5 of 12Practice · Sort into groups
Are the vectors in each set linearly independent or dependent?
Tap an item, then tap its group (or drag it there).
Step 6 of 12Diagram
Testing independence by row reduction
Tap a shape with to see more.
- Vectors as columns of A
- Row reduce A
- Pivot in every column?
- Yes: independent
Ax = 0 has only the zero solution.
- No: dependent
A free variable gives a nonzero combination equal to 0.
Step 7 of 12Learn
Shortcuts and geometry
You don't always need to row reduce. These facts settle many cases instantly:
- Two vectors are dependent exactly when one is a scalar multiple of the other.
- Any set containing the zero vector is dependent.
- More vectors than entries: k vectors in ℝⁿ with k > n are always dependent. There can be at most n pivots, so some column must be free. Four vectors in ℝ³ are dependent, no matter what they are.
- Square matrices: n vectors in ℝⁿ are independent exactly when the matrix with those columns has a nonzero determinant.
Geometrically, independence means every vector adds a new direction. Two independent vectors in ℝ³ span a plane; adding a third independent vector lifts the span to all of space. A dependent third vector lies in the plane already spanned and adds nothing.
Why care? Independence means no wasted information and unique representations. If v₁, …, vₖ are independent, then each vector in their span can be written as a combination in exactly one way. With dependent vectors, there are infinitely many ways, because you can always add the zero combination.
In data science, dependent columns in a data table (say, height in inches and the same height in centimeters) cause real trouble: a regression model can't decide how much weight to give each, and the computation becomes unstable. Detecting and removing dependence is a routine step in cleaning data.
Step 8 of 12Practice · Work it out
For which value of k are (1, 3) and (2, k) linearly dependent?
Step 9 of 12Compare
Independent vs dependent
| Aspect | Independent | Dependent |
|---|---|---|
| c₁v₁ + … + cₖvₖ = 0 | Only with every c = 0 | Also with some c ≠ 0 |
| Redundancy | Every vector adds a new direction | At least one vector is a combination of the others |
| Square matrix of the vectors | det ≠ 0 | det = 0 |
| Example in ℝ² | (1, 3) and (2, 5) | (1, 3) and (2, 6) |
Step 10 of 12Note
Step 11 of 12Practice · True or false
If {u, v, w} is linearly dependent, then w must be a linear combination of u and v.
Step 12 of 12Practice · Choose one
Five vectors in ℝ⁴ are given. Without computing, what can you say?
Lesson complete!