Affine Spaces
Linear Algebra
An affine space is, roughly, a vector space that has forgotten where its origin is. Formally, an affine subspace of a vector space V is a set of the form mathbf{x}_0 + U = \{mathbf{x}_0 + mathbf{u} : mathbf{u} in U\}, where mathbf{x}_0 is any point and U is a linear subspace. When mathbf{x}_0 = math
An affine subspace is a translated linear subspace: .
An affine space is, roughly, a vector space that has forgotten where its origin is. Formally, an affine subspace of a vector space is a set of the form , where is any point and is a linear subspace. When , the affine subspace coincides with itself; otherwise, it is a translate of that need not pass through the origin.
Familiar examples: a line in not through the origin is a 1-dimensional affine subspace; a plane in that is shifted off the origin is a 2-dimensional affine subspace. In general, the solution set of a consistent (non-homogeneous) linear system is an affine subspace: it is a particular solution plus the null space of .
Affine maps are the natural transformations between affine spaces. They have the form , combining a linear map with a translation . Unlike pure linear maps, affine maps do not need to fix the origin โ they can translate the whole space. Affine maps preserve lines, parallelism, and ratios of distances along a line, but not angles or absolute distances.
A trick that shows up throughout computer graphics and ML: we can embed an affine map into a linear map in one higher dimension. Append a 1 to every vector () and use a block matrix to capture the entire affine map as ordinary matrix-vector multiplication. This is the same homogeneous coordinate trick used in OpenGL transformation pipelines.
Affine ideas thread through ML more than you might expect. Classical linear regression with a bias term is an affine model: is linear in and , but not linear in alone (because of the ). Most neural-network layers are affine-followed-by-non-linear: . Support vector machines carve out decision boundaries that are affine hyperplanes โ solution sets of . Understanding affine subspaces is thus the right language for half of modern modeling.
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.