Vector spaces form the foundational structure of linear algebra: any two vectors can be added, any vector can be scaled, and the result stays in the space. A subspace is a subset that inherits this closure property. The set of zero-mean vectors $S = \{x \in \mathbb{R}^n : \mathbf{1}^\top x = 0\}$ is the kernel of the linear functional $x \mapsto \mathbf{1}^\top x$, hence a subspace. The orthogonal projector onto $S$ is $P = I - \frac{1}{n}\mathbf{1}\mathbf{1}^\top$, and applying $P$ to any vector gives the unique point in $S$ closest to it (in the Euclidean sense). In ML, mean-centering is the standard preprocessing step before PCA, regression, and clustering; understanding it as projection reveals why itâs optimalâit removes the constant offset without losing information, minimizing reconstruction error.
These concepts appear throughout modern deep learning and statistics: regularization methods project onto constraint sets, attention mechanisms compute weighted sums in value span, and optimization algorithms iterate within feasible parameter spaces. The interplay between closure (ensuring algorithms stay valid) and projection (finding optimal points in subspaces) is the thread connecting linear algebra to ML.
Comments