What do span, linear independence and rank tell you about the columns of a feature matrix X∈Rn×d?

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 X is the set of all predictions Xw 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 min⁡(n,d).

Steps

  1. Define span: the span of the d columns x(1),…,x(d)∈Rn (for n samples and d features) is the set of all linear combinations ∑j=1dwjx(j)=Xw, where w∈Rd is a weight vector. This subspace is the column space of X.
  2. Define linear independence: the columns are linearly independent if ∑j=1dwjx(j)=0 holds only when every weight wj=0. If another solution exists, at least one feature is an exact linear combination of the rest (perfect multicollinearity).
  3. Define rank: the rank rank⁡(X) is the maximum number of linearly independent columns (which always equals the maximum number of linearly independent rows), so rank⁡(X)≤min⁡(n,d).
  4. Link to ML: when rank⁡(X)<d, distinct weight vectors w produce the exact same predictions Xw, so ordinary least squares has infinitely many solutions unless you drop redundant features or add regularisation.

Common mistakes

How long your answer should be

4–5 sentences; 2 minutes.

Last checked on 4 December 2026.

Read this

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 v=(1,1)⊤ is an eigenvector of A=(3113) 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?