What do span, linear independence and rank tell you about the columns of a feature matrix ?
Linear algebra and optimisation, Vector spaces and rank
Level L1 Beginner. Length Short. Nature Th Theoretical.
What's being asked
Whether you can connect vector-space definitions to redundant features in a machine learning dataset.
Key idea
The span of the columns of is the set of all predictions a linear model can produce; linear independence means no column is a weighted sum of the others; and the rank is the number of genuinely independent feature directions, bounded by .
Steps
- Define span: the span of the columns (for samples and features) is the set of all linear combinations , where is a weight vector. This subspace is the column space of .
- Define linear independence: the columns are linearly independent if holds only when every weight . If another solution exists, at least one feature is an exact linear combination of the rest (perfect multicollinearity).
- Define rank: the rank is the maximum number of linearly independent columns (which always equals the maximum number of linearly independent rows), so .
- Link to ML: when , distinct weight vectors produce the exact same predictions , so ordinary least squares has infinitely many solutions unless you drop redundant features or add regularisation.
Common mistakes
- Confusing the dimension of the ambient space (, the number of samples) with the dimension of the column space ().
- Saying rank is only the number of non-zero columns or non-zero rows; two non-zero columns that are multiples of each other still contribute only 1 to the rank.
How long your answer should be
4–5 sentences; 2 minutes.
Last checked on 4 December 2026.
Read this
- Deisenroth, Faisal and Ong, Mathematics for Machine Learning: Sections 2.5 and 2.6 (linear independence, generating sets, basis and rank), with worked examples on columns of a matrix.
- MIT OCW 18.06SC: independence, basis and dimension: Strang's lecture summary on span, independence and dimension, with the notes and problem set.
- NPTEL: Linear Algebra (IIT Kanpur, Prof. Arbind Kumar Lal): Week 4 and Week 5: Linear Combination, Linear Independence and Dependence, Basis of a Finite Dimensional Vector Space and Fundamental Spaces associated with a Matrix, which cover span, independence and rank.
Previous in Linear algebra and optimisation: What are an eigenvector and an eigenvalue of a square matrix intuitively, why are they useful, and how do you check that is an eigenvector of and find its eigenvalue?
Next in Linear algebra and optimisation: What is an orthogonal matrix geometrically, and what properties of vectors does multiplying by one preserve?