Vector Spaces and Geometry
- Test whether a subset of a vector space is a subspace using the closure conditions
- Determine whether a set of vectors is linearly independent and, if not, express one as a linear combination of the others
- Describe the column space, row space, and null space of a matrix and explain what each represents geometrically
- Interpret a matrix as a linear transformation and explain how it maps vectors from the domain to the codomain
Geometric Thinking About Matrices
The previous readings treated matrices as arrays of numbers obeying algebraic rules. This reading builds the geometric picture — what matrices do to space — which is essential for understanding covariance, projections, and transformations in ML.
Vector Spaces
A vector space is a set of objects (vectors) that can be added together and scaled by scalars, with results that stay in the set. The formal axioms are satisfied by all the vector types we use: column vectors in , matrices, functions.
The standard example: , the set of all -dimensional column vectors with real entries.
Linear Combinations
A linear combination of vectors is any vector of the form:
where are scalars. This is the fundamental building block of linear algebra.
From the previous reading: the product is a linear combination of the columns of with coefficients from . Every matrix-vector product is a linear combination.
Span
The span of a set of vectors is the set of all linear combinations of those vectors:
Geometrically:
- Span of one nonzero vector = a line through the origin
- Span of two linearly independent vectors in = a plane through the origin
- Span of linearly independent vectors in = all of
The span of the columns of a matrix is called the column space of , written . The system has a solution if and only if .
Linear Independence
Vectors are linearly independent if the only solution to:
is . Otherwise they are linearly dependent — at least one vector is a linear combination of the others and contributes no new direction.
Why this matters for ML: a covariance matrix whose columns are linearly dependent is singular (non-invertible). PCA exploits linear dependence to find lower-dimensional representations.
Basis and Dimension
A basis for a vector space is a set of vectors that:
- Spans — every vector in is a linear combination of the basis vectors
- Is linearly independent — no basis vector is redundant
The number of vectors in any basis for is the dimension of , written .
The standard basis for is , where has a 1 in position and zeros elsewhere. Any vector is uniquely expressed as — the coordinates are the coefficients.
Key fact: if a set of vectors in is linearly independent, it automatically spans and is therefore a basis.
Column Space, Row Space, and Null Space
Three fundamental subspaces are associated with any matrix :
| Subspace | Definition | Lives in |
|---|---|---|
| Column space | Span of the columns of | |
| Row space | Span of the rows of | |
| Null space | All such that |
The null space and row space are orthogonal complements in : every vector in the null space is perpendicular to every vector in the row space, and their dimensions sum to .
Matrices as Linear Transformations
Multiplying by an matrix defines a linear map , written . The map is linear because:
Every linear map between finite-dimensional spaces can be represented as a matrix. This correspondence — matrix ↔ linear transformation — is the central insight of linear algebra.
Geometric operations as matrices:
- Rotation by angle in :
- Scaling axes independently: diagonal matrix with scale factors on the diagonal
- Projection onto a subspace: an idempotent matrix ()
- Reflection: orthogonal matrix with determinant
In 3D Gaussian Splatting, the covariance matrix decomposes the Gaussian's shape into a rotation () applied to an independent scaling () — a direct application of these geometric operations.
Orthogonality
Two vectors are orthogonal if their inner product is zero: . Orthogonality generalizes perpendicularity to any dimension.
A set of vectors is orthonormal if they are mutually orthogonal and each has unit length (). An orthonormal basis is maximally convenient: coordinates are computed by simple inner products, and lengths are preserved under transformation.
A square matrix is orthogonal if its columns form an orthonormal set:
Orthogonal matrices represent pure rotations (and reflections) — they preserve lengths and angles. The eigendecomposition of a symmetric matrix (Reading 5) is built entirely from orthogonal matrices.