Vector Spaces
Linear Algebra
So far we have worked with concrete vectors in mathbb{R}^n. The true power of linear algebra, however, comes from abstracting: a vector space over the real numbers is any set V equipped with an addition and a scalar multiplication that satisfy eight familiar axioms (associativity, commutativity of a
A vector space is any set with addition and scalar multiplication satisfying 8 axioms.
No vector space โ no embeddings โ no semantic search, no recommendation, no transformer attention.
So far we have worked with concrete vectors in . The true power of linear algebra, however, comes from abstracting: a vector space over the real numbers is any set equipped with an addition and a scalar multiplication that satisfy eight familiar axioms (associativity, commutativity of addition, existence of a zero vector, existence of additive inverses, compatibility of scalar multiplication, two distributive laws, and the identity ).
This abstraction is not academic hairsplitting. Once a set obeys the axioms, *every theorem of linear algebra applies automatically*. The space of polynomials of degree โค , the space of matrices, the space of continuous functions on โ all are vector spaces, and concepts like linear combinations, independence, and bases transfer wholesale.
A subspace is a subset that is itself a vector space under the inherited operations. Concretely, must contain the zero vector and be closed under addition and scalar multiplication: for any and any scalar , both and must still lie in . A line through the origin in is a subspace; a line that misses the origin is not.
Two subspaces attached to every matrix are cornerstones of ML. The column space (or *range*) is the span of 's columns โ exactly the set of for which has a solution. The null space (or *kernel*) is the set of with โ the directions in input space that flattens to zero. The fundamental theorem of linear algebra relates their dimensions: the rank-nullity theorem states that for , .
Worked example โ NOT a subspace: The set is the right half-plane. It contains โ, and sums of non-negative- vectors stay non-negative โ, BUT times gives . Not closed under scalar multiplication, so not a subspace โ it's only closed under non-negative scalars.
Why should a machine learner care about subspaces? Because features live in them. When PCA reduces a dataset to its top directions, it projects onto a -dimensional subspace. When a neural network's hidden layer has rank-deficient weights, certain input directions are collapsed and forever invisible to the rest of the network. Understanding subspaces is the key to diagnosing representational capacity.
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.