Basis and Rank
Linear Algebra
A basis of a vector space V is a set of vectors that is both linearly independent and spanning โ every vector in V can be written as a unique linear combination of basis elements. Every basis of a given finite-dimensional space has the same number of vectors, and that number is the dimension of the
A basis is a maximal independent set; its size is the dimension.
No rank โ no PCA, no LoRA, no diagnosis of overparameterization, no understanding of why deep nets generalize despite huge parameter counts.
A basis of a vector space is a set of vectors that is both linearly independent and spanning โ every vector in can be written as a unique linear combination of basis elements. Every basis of a given finite-dimensional space has the same number of vectors, and that number is the dimension of the space. This is remarkable: dimension does not depend on which basis you chose, only on the space itself.
The most familiar basis of is the standard basis , where has a 1 in position and zeros elsewhere. But infinitely many other bases exist. For instance, is a perfectly valid basis of . Choosing a *different* basis can dramatically simplify a problem โ this is the motivation for eigendecomposition and PCA.
The coordinates of a vector in a basis are the unique scalars satisfying . The same geometric vector has different coordinate representations in different bases โ a fact that is easy to forget but crucial for transformations like change-of-basis matrices.
The rank of a matrix is the dimension of its column space โ equivalently, the number of linearly independent columns, the number of pivots in its row-echelon form, or (a beautiful identity) the dimension of its row space. A key fact: , i.e. row rank equals column rank. This identity has real consequences: for a tall matrix with , the rank is at most , because there are only columns to be independent.
Worked example โ computing rank by elimination: For : R2 โ R2 โ 2R1 gives ; R3 โ R3 โ 3R1 gives ; R3 โ R3 โ R2 gives . Two non-zero rows remain โ rank = 2. The third column is *not* in the span of the first two's linear dependency pattern, so the rank is 2 rather than 1.
Worked example โ coordinates in a non-standard basis: In the basis , find the coordinates of . Solve : , . Adding: , then . So โ the same geometric vector has different coordinates in different bases.
Rank is the central diagnostic in many ML pipelines. A full-rank design matrix lets ordinary least-squares produce a unique solution. A low-rank weight matrix in a trained neural network is often a sign that the model has compressed information into fewer effective dimensions โ the basis of modern techniques like LoRA (Low-Rank Adaptation), which adapts large models by adding a small, low-rank update rather than retraining all parameters.
Exercises
Put your understanding to the test. Score + streak + speed all count.
Confirm you've got it
3 quick questions. Get 2 right to mark this lesson complete.