Vector Spaces and Basis

2 min read

A vector space VV over R\mathbb{R} is a set of vectors closed under addition and scalar multiplication. Rn\mathbb{R}^n is the canonical example.

Core definitions:

  • Linear combination: c1v1+c2v2++ckvkc_1\mathbf{v}_1 + c_2\mathbf{v}_2 + \dots + c_k\mathbf{v}_k
  • Span: the set of all linear combinations of a set of vectors
  • Linear independence: no vector in the set can be written as a linear combination of the others
  • Basis: a linearly independent set that spans the entire space
  • Dimension: the number of vectors in any basis (unique for a given space)

Subspaces are vector spaces living inside a larger space. The most important ones:

  • Column space C(A)C(A) — what outputs AxA\mathbf{x} can produce → range of the transformation
  • Null space N(A)N(A) — what inputs Ax=0A\mathbf{x} = \mathbf{0} annihilates → see Rank and Null Space
  • Row space — span of the rows of AA

Why this matters for ML:

  • A neural network layer maps between vector spaces: RnRm\mathbb{R}^n \to \mathbb{R}^m
  • Embeddings live in learned vector spaces where directions encode meaning
  • Principal Component Analysis (PCA) finds the best low-dimensional basis for the data
  • Rank of a weight matrix = dimension of its column space → if rank-deficient, the layer has redundant capacity (LoRA exploits this)

See also: Rank and Null Space, Linear Transformations, Orthogonality and Projections

Linked from