Level 0: Foundation
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.What can you reach?
A toy robot knows only two moves: “one step east” and “one step north”. By repeating them (and going backwards), it can reach every square on the floor. Its moves span the whole floor.
Now imagine a robot whose two moves are “one step east” and “two steps east”. Both point the same way, so no matter how it combines them, it can never leave its row. The second move adds nothing new. It’s redundant.
Mixing paints
With red and blue paint you can mix many purples. If someone gives you a third pot that is already “half red, half blue”, it doesn’t let you make any new colour. In maths, that third pot is linearly dependent on the other two.
Try it below. Make u and v point the same way and watch the reachable area shrink from the whole plane to a single line:
- 1. A robot's moves are 'east' and 'west'. Can it reach a square to the north?
- 2. Red, blue, and a pot of 'red + blue'. How many truly different base colours?
- 3. Moves 'east' and 'north'. Which squares can the robot reach?
Level 1: Beginner
★★☆☆☆ Basic⏱ 15 minSecondary-school mathematics: arithmetic and elementary algebra.Linear combinations and span
A linear combination of is for any numbers . The span is the set of all such combinations:
- The span of one non-zero vector in is a line through the origin.
- The span of two non-parallel vectors in is the whole plane.
- The span of two non-parallel vectors in is a plane through the origin.
Worked example. Is in the span of and ? Solve . That gives and , so . Yes.
Linear independence
Vectors are linearly dependent if one of them is a combination of the others, like . Otherwise they’re independent: each one adds a genuinely new direction.
- 1. Is (2, 4) in the span of (1, 2)?
- 2. Are (1, 0, 0), (0, 1, 0), (1, 1, 0) independent?
- 3. The span of (1, 2) and (2, 4) is…
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 35 minUndergraduate students and practising engineers.Vector spaces
A vector space is any set with addition and scalar multiplication satisfying eight rules: addition is commutative and associative, there’s a zero vector , every vector has a negative, and scalar multiplication distributes and is compatible (, ).
The power of the idea is that many things that aren’t lists of numbers are vector spaces:
| Vector space | “Vectors” | Dimension |
|---|---|---|
| lists of numbers | ||
| matrices (e.g. a weight matrix) | ||
| polynomials of degree | ||
| continuous functions | infinite | |
| Solutions of | functions | 2 |
Subspaces
A subset is a subspace if it’s a vector space in its own right. You only need to check three things:
- ;
- closed under addition: ;
- closed under scaling: .
✅ Lines and planes through the origin, the span of any set, and the solutions of . ❌ The line (misses 0), the first quadrant (not closed under ), the two axes together (not closed under +).
Linear independence, precisely
are linearly independent if
In practice, put the vectors into a matrix and compute its rank, the number of independent rows (A2.1-6). The vectors are independent exactly when the rank equals the number of vectors.
Why this matters
| Where | Span / independence question |
|---|---|
| Data science: multicollinearity | If one feature is a combination of others (like total = a + b), the columns of the data matrix are dependent. Regression weights are then not unique, and they become unstable when features are nearly dependent. |
| One-hot encoding | Including all dummy columns plus an intercept makes them dependent (the “dummy variable trap”). That’s why one category is dropped. |
| ML capacity | A linear model can only output functions in the span of its features. Feature engineering enlarges that span. |
| Robotics | The hand velocities a robot arm can produce form the span of the Jacobian’s columns. At a singular pose that span loses a dimension, and the arm can’t move in some direction. |
- 1. Is {(x, y, z) : x + 2y − z = 0} a subspace of ℝ³?
- 2. What is the dimension of the space of 3 × 4 matrices?
- 3. Any set of vectors containing 0 is…
Level 3: Advanced
★★★★☆ Advanced⏱ 45 minGraduate level, with full derivations and proofs.Span is the smallest subspace
is a subspace, and it’s contained in every subspace that contains .
Proof. . The sum of two combinations is a combination, and so is a scaled combination. So the span is a subspace. Any subspace containing is closed under + and scaling, so it contains every combination of . ∎
Too many vectors are always dependent
Any vectors in are linearly dependent.
Proof. is a homogeneous system of equations in unknowns. Gaussian elimination leaves at most pivot columns, so at least unknowns are free. Setting a free unknown to 1 gives a non-trivial solution. ∎
Intersections and unions
The intersection of two subspaces is a subspace. Their union is a subspace only if one contains the other.
Proof. If are in both and , so are and . For the union: suppose neither contains the other. Pick and . If , then , a contradiction. The same argument rules out . So isn’t in the union. ∎
The right way to “combine” subspaces is the sum , which is the smallest subspace containing both.
The exchange lemma
If are independent and lie in , then .
This is the key fact behind dimension (A2.1-4): every basis of a space has the same size.
Independence of functions
Functions are vectors too. are independent: a polynomial that is zero for every must have all coefficients zero, since a non-zero polynomial has finitely many roots. For differentiable functions, a non-zero Wronskian at some point proves independence. For example, .
Exercise 3.1: For which k are (1,2,3), (0,1,4), (2,k,6) dependent?
Subtract 2× the first vector from the third: . Together with , this gives a dependence only when , so . Equivalently, the determinant of the matrix with these rows is , which is zero exactly at .
- 1. Five vectors in ℝ⁴ are…
- 2. Two distinct planes through the origin in ℝ³ intersect in…
- 3. W(eˣ, e²ˣ) at x = 0 equals…
Level 4: Expert
★★★★★ Expert⏱ 30 minResearchers: original papers and open problems.Learning often happens in a small subspace
Li et al. (2018) trained networks while restricting the parameters to a random -dimensional subspace of the full -dimensional space: . Many tasks reached 90% of full performance with in the hundreds or thousands, though was in the millions. They called the smallest such the intrinsic dimension. Aghajanyan et al. (2021) found that fine-tuning large language models has a remarkably low intrinsic dimension. That observation helped motivate LoRA (Hu et al., 2022), which confines the weight update to a low-rank subspace: with rank (F6).
Neural networks are not subspaces
The set of functions computed by networks of a fixed width is not closed under addition. The sum of two width- networks generally needs width . So it isn’t a vector space, which is one reason its geometry is so much harder to analyse than that of linear models or kernel methods. Kernel methods do live in a vector space of functions, a reproducing kernel Hilbert space (B3), which is why their theory is so clean.
Redundant robots: the null space is freedom
A 7-joint arm (like most cobots and space arms) controlling a 6-D hand pose has one extra degree of freedom. The joint velocities that leave the hand still form the null space of the Jacobian: , a 1-dimensional subspace. Controllers use this self-motion to avoid obstacles, joint limits and singularities while the hand keeps doing its task (Khatib, 1987; S5). Practice Code 5 computes it for a 3-link planar arm.
References
- G. Peano (1888). Calcolo geometrico secondo l’Ausdehnungslehre di H. Grassmann. (The first axiomatic definition of a vector space.)
- E. Steinitz (1913). “Bedingt konvergente Reihen und konvexe Systeme.” Journal für die reine und angewandte Mathematik, 143. (Exchange lemma.)
- O. Khatib (1987). “A unified approach for motion and force control of robot manipulators: The operational space formulation.” IEEE Journal on Robotics and Automation, 3(1).
- C. Li, H. Farkhoor, R. Liu, J. Yosinski (2018). “Measuring the intrinsic dimension of objective landscapes.” ICLR.
- A. Aghajanyan, S. Gupta, L. Zettlemoyer (2021). “Intrinsic dimensionality explains the effectiveness of language model fine-tuning.” ACL.
- E. Hu et al. (2022). “LoRA: Low-rank adaptation of large language models.” ICLR.
- S. Axler (2024). Linear Algebra Done Right, 4th ed. Chapters 1–2.