Linear Independence & Span
2438 words
12 min read
Visual companion
Python
Type and operator map
Python Week 1: the first filter for runtime behavior
View
Revision summary
What this note is really saying
Short form
# Linear Independence & Span ## ๐ฏ Learning Objectives After this topic you will be able to: - Define the span of a set of vectors - Determine whether a set of vectors is linearly independent or dependent - Find whether a given vector lies in the span of a set of vectors - Use Gaussian elimination to test linear ind...

Linear Independence & Span
๐ฏ Learning Objectives
After this topic you will be able to:
- Define the span of a set of vectors
- Determine whether a set of vectors is linearly independent or dependent
- Find whether a given vector lies in the span of a set of vectors
- Use Gaussian elimination to test linear independence
- Describe the geometric meaning of dependence/independence in R2 and R3
- Prove basic facts about independence
๐ Prerequisites
- Vector Spaces and Subspaces (this week) โ context for where vectors live
- Gaussian Elimination (Week 2) โ the computational tool for testing independence
- Solving homogeneous systems (Week 2) โ Ax=0 is the key equation
1. Intuition: Redundant vs. Essential Vectors
1.1 What Does "Independent" Mean?
Imagine you're packing for a trip. You have a set of items:
- A shirt
- Pants
- Shoes
- A jacket These are all independent โ none can be made from the others. Now imagine you also pack:
- A shirt that's exactly like the first one (redundant)
- An outfit that's just shirt + pants (composite) These are dependent โ they add nothing new to your wardrobe. Linear independence captures this same idea for vectors: a set of vectors is independent if no vector can be expressed as a combination of the others. Every vector contributes a new "direction." (Diagram)
1.2 Span: The Set of All Combinations
The span of a set of vectors is everything you can reach by taking linear combinations of them.
- If you have one vector in R2, its span is a line through the origin
- If you have two linearly independent vectors in R2, their span is the entire plane
- If you have three or more vectors in R2, their span is still just the plane (the extra vectors are redundant)
2. Span
>span{v1โ,โฆ,vkโ}={i=1โkโciโviโโciโโR}>Definition (Span). The span of a set of vectors {v1โ,v2โ,โฆ,vkโ} in a vector space V is:
>span{v1โ,v2โ}={c1โ(1,0,1)+c2โ(0,1,1)โฃc1โ,c2โโR}>It is the set of all linear combinations of the vectors. Key fact: The span of any set of vectors is always a subspace of V. Example 1: Span of two vectors in โยณv1โ=(1,0,1), v2โ=(0,1,1)
This is the plane xโy+z=0 (check: x=c1โ, y=c2โ, z=c1โ+c2โ, so xโy+z=c1โโc2โ+c1โ+c2โ=2c1โ, wait... let me recheck). Actually: span{v1โ,v2โ}={(c1โ,c2โ,c1โ+c2โ)โฃc1โ,c2โโR}. This is the plane through origin with equation x+yโz=0 (since x+yโz=c1โ+c2โโ(c1โ+c2โ)=0).
3. Linear Independence
3.1 Definition
>c1โv1โ+c2โv2โ+โฏ+ckโvkโ=0>Definition (Linear Independence). A set of vectors {v1โ,v2โ,โฆ,vkโ} is linearly independent if the only solution to:
viโ=โciโc1โโv1โโโฏโciโciโ1โโviโ1โโciโci+1โโvi+1โโโฏis the trivial solution c1โ=c2โ=โฏ=ckโ=0.If there exists a non-trivial solution (at least one ciโ๎ =0), the set is linearly dependent. Intuition: A set is dependent if some vector can be written as a combination of the others. In that case, we have:
3.2 Geometric Interpretation
| Dimension | Independent | Dependent |
|---|---|---|
| R2 : 2 vectors | Not collinear (span a parallelogram) | Collinear (one is scalar multiple of other) |
| R3 : 2 vectors | Not collinear (span a plane) | Collinear (lie on same line) |
| R3 : 3 vectors | Not coplanar (span a parallelepiped) | Coplanar (all lie in some plane) |
3.3 Testing Independence with Gaussian Elimination
To test if {v1โ,v2โ,โฆ,vkโ} in Rn are independent:
- Form matrix A with viโ as columns
- Solve Ac=0 (row reduce to RREF)
- If the only solution is c=0, the vectors are independent
- If there are free variables, they are dependent Alternatively: form a matrix with vectors as rows and compute the rank. The vectors are independent iff the number of vectors equals the rank.
>A=โ121โ012โ101โโ>Example 2: Independent vectors in โยณTest v1โ=(1,2,1), v2โ=(0,1,2), v3โ=(1,0,1).
>โ121โ012โ101โโฃโฃโฃโ000โโR2โโ2R1โ,R3โโR1โโโ100โ012โ1โ20โโฃโฃโฃโ000โโ>Row reduce Ac=0:
>R3โโ2R2โโโ100โ010โ1โ24โโฃโฃโฃโ000โโ>
>A=โ123โ456โ789โโ>All columns are pivot columns, so only trivial solution. Independent. Example 3: Dependent vectors in โยณTest v1โ=(1,2,3), v2โ=(4,5,6), v3โ=(7,8,9).
>R2โโ2R1โ,R3โโ3R1โโโ100โ4โ3โ6โ7โ6โ12โโR3โโ2R2โโโ100โ4โ30โ7โ60โโ>Row reduce:
Column 3 has no pivot (free variable). Dependent. Indeed, v3โ=2v2โโv1โ (check: 7=2(4)โ1, 8=2(5)โ2, 9=2(6)โ3).
3.4 Important Facts
| Fact | Explanation |
|---|---|
| Any set containing 0 is dependent | 1โ 0+0โ v2โ+โฏ=0 is non-trivial |
| A single non-zero vector is independent | cv=0โc=0 |
| Two vectors are dependent iff one is a scalar multiple of the other | c1โv1โ+c2โv2โ=0 with c1โ๎ =0 gives v1โ=โ(c2โ/c1โ)v2โ |
| In Rn , any set of more than n vectors is dependent | Any n+1 vectors in Rn are linearly dependent |
| If a set is independent, every subset is also independent | Removing vectors preserves independence |
| If a set is dependent, every superset is also dependent | Adding vectors preserves dependence |
4. Wronskian Test for Functions
For function spaces, the Wronskian tests independence of differentiable functions:
>W(f1โ,โฆ,fnโ)(x)=detโf1โ(x)f1โฒโ(x)โฎf1(nโ1)โ(x)โf2โ(x)f2โฒโ(x)โฎf2(nโ1)โ(x)โโฆโฆโฑโฆโfnโ(x)fnโฒโ(x)โฎfn(nโ1)โ(x)โโ>
If W๎ =0 at some point, the functions are linearly independent.
>W(1,x,x2)=detโ100โx10โx22x2โโ=1โ 1โ 2=2๎ =0>Example 4: Wronskian of {1,x,x2}
So {1,x,x2} is independent. (This makes sense โ no polynomial of degree 2 is a combination of lower-degree polynomials.)
5. Edge Cases & Gotchas
| Situation | What Happens |
|---|---|
| Empty set | Convention: the empty set is linearly independent |
| Single non-zero vector | Always independent |
| Infinite set | A set is independent if every finite subset is independent |
| Vectors with different numbers of components | Cannot be compared directly; they live in different spaces |
6. Common Pitfalls
โ Pitfall 1: Thinking "independent" means "orthogonal"
Independence does not require orthogonality. (1,0) and (1,1) are independent but not orthogonal (dot product = 1).
โ Pitfall 2: Testing independence by looking at rows vs. columns
If you put vectors as rows of a matrix, the non-zero rows of RREF are independent. If you put them as columns, the pivot columns pick out independent vectors. Both methods work, but they give different independent subsets!
โ Pitfall 3: Assuming more vectors than the dimension are independent
In R3, any 4 vectors are automatically dependent, but students sometimes try to check anyway.
โ Pitfall 4: Forgetting the zero vector case
A set containing 0 is always dependent โ you don't need to check further.
7. Formula Summary Table
| Concept | Definition/Test |
|---|---|
| Span | span{v1โ,โฆ,vkโ}={โciโviโโฃciโโR} |
| Linear independence | โciโviโ=0โallย ciโ=0 |
| Test using matrix | Form columns A=[v1โโฆvkโ] , solve Ac=0 |
| Test using rank | Rank of matrix with vectors as rows = number of vectors โ independent |
| Key inequality | In Rn , โคn vectors can be independent |
| Wronskian | For functions, W๎ =0 at some point โ independent |
8. ๐ Practice Questions
>โฉโจโงโc1โ+c3โ=0c2โ+c3โ=0c1โ+2c2โ+c3โ=0โ>Q1: Span descriptionDescribe span{(1,2),(2,4)}.Solution: The second vector is 2 times the first, so they are collinear. span{(1,2),(2,4)}=span{(1,2)}={(c,2c)โฃcโR}, a line through origin. Q2: Independence test in โยฒAre v1โ=(1,3) and v2โ=(2,โ1) linearly independent?Solution: Check if one is a scalar multiple of the other. If v2โ=cv1โ, then 2=c(1) and โ1=c(3) โ c=2 and c=โ1/3, impossible. They are independent. Q3: Independence test in โยณAre v1โ=(1,0,1), v2โ=(0,1,2), v3โ=(1,1,1) independent?Solution: Solve c1โ(1,0,1)+c2โ(0,1,2)+c3โ(1,1,1)=(0,0,0):
>โ121โ234โ355โโR2โโ2R1โ,R3โโR1โโโ100โ2โ12โ3โ12โโR3โ+2R2โโโ100โ2โ10โ3โ10โโ>From first two: c1โ=โc3โ, c2โ=โc3โ. Substitute into third: (โc3โ)+2(โc3โ)+c3โ=โ2c3โ=0โc3โ=0, then c1โ=0, c2โ=0.Only trivial solution. Independent. Q4: Finding a dependency relationFind a dependency relation among v1โ=(1,2,1), v2โ=(2,3,4), v3โ=(3,5,5).Solution: Solve Ac=0:
>โฉโจโงโc1โ+c3โ=0c1โ+c2โ=0c2โโc3โ=0โ>c2โ=โc3โ, c1โ=โ2c2โโ3c3โ=2c3โโ3c3โ=โc3โ. Choose c3โ=1: c1โ=โ1, c2โ=โ1, c3โ=1.Dependency: โv1โโv2โ+v3โ=0, i.e., v3โ=v1โ+v2โ.Check: (3,5,5)=(1,2,1)+(2,3,4)=(3,5,5) โ Q5: Zero vector setIs {(1,2),(0,0),(3,4)} linearly independent?Solution: No, because it contains the zero vector. A non-trivial combination is 0(1,2)+1(0,0)+0(3,4)=(0,0). Q6: Independence of polynomialsAre p1โ(x)=1+x, p2โ(x)=x+x2, p3โ(x)=1โx2 linearly independent in P2โ?Solution: Set c1โ(1+x)+c2โ(x+x2)+c3โ(1โx2)=0 (the zero polynomial).Group like powers: (c1โ+c3โ)+(c1โ+c2โ)x+(c2โโc3โ)x2=0.For this to be the zero polynomial, all coefficients must be zero:
>W(sinx,cosx)=det[sinxcosxโcosxโsinxโ]=โsin2xโcos2x=โ1๎ =0>From first: c3โ=โc1โ. From third: c2โ=c3โ=โc1โ. From second: c1โ+(โc1โ)=0 (satisfied automatically).So c1โ is free; pick c1โ=1, then c2โ=โ1, c3โ=โ1.p1โโp2โโp3โ=(1+x)โ(x+x2)โ(1โx2)=1+xโxโx2โ1+x2=0.Dependent. Q7: Maximum independent setWhat is the maximum number of linearly independent vectors in R4?Solution: At most 4 (the dimension of R4). Any 5 vectors in R4 are linearly dependent. Q8: Wronskian testAre f(x)=sinx and g(x)=cosx linearly independent?Solution: Compute the Wronskian:
>โฉโจโงโc1โ+c2โ+c3โ=0c2โ+c3โ=0c3โ=0โ>Independent. Q9: Span and independenceIf {v1โ,v2โ,v3โ} is linearly independent in R3, what is span{v1โ,v2โ,v3โ}?Solution: Since R3 has dimension 3 and we have 3 independent vectors, they span the entire space: span{v1โ,v2โ,v3โ}=R3. Q10: Proving a propertyProve: If {v1โ,v2โ,v3โ} is independent, then {v1โ,v1โ+v2โ,v1โ+v2โ+v3โ} is also independent.Proof: Suppose c1โv1โ+c2โ(v1โ+v2โ)+c3โ(v1โ+v2โ+v3โ)=0. Group terms: (c1โ+c2โ+c3โ)v1โ+(c2โ+c3โ)v2โ+c3โv3โ=0.Since {v1โ,v2โ,v3โ} is independent:
Back-substitute: c3โ=0โc2โ=0โc1โ=0. Only trivial solution, so the new set is independent. โ
๐ Cross-References
- Next topic: Basis & Dimension
- Week 4: A basis is a spanning set that is linearly independent
- Week 1 (Vectors): Dot products provide another way to test independence (orthogonal โ independent)
- Week 8 (Gram-Schmidt): Builds orthogonal/orthonormal independent sets
- BSCS2004 (ML Foundations): Independent features are non-redundant predictors Join Discord Previous3.2 SubspacesNext4.1 Basis & Dimension