2.8 Affine Spaces
Affine spaces are geometric spaces that are offset from the origin. Unlike vector subspaces, they do not necessarily contain the zero vector. Mappings between affine spaces share many properties with linear mappings.
In the machine learning literature, the terms linear and affine are often used interchangeably.
Definition 2.35 Let \(V\) be a vector space, \(x_0 \in V\), and \(U \subseteq V\) a subspace. Then \[ L = x_0 + U := \{ x_0 + u : u \in U \} \] is called an affine subspace or linear manifold of \(V\).
- \(U\) is the direction space.
- \(x_0\) is the support point.
- If \(x_0 \notin U\), then \(L\) is not a linear subspace (it does not contain the origin).
Example 2.59 Points, lines, and planes in \(\mathbb{R}^3\) that do not necessarily pass through the origin are examples of affine spaces.
Definition 2.36 If \(L = x_0 + U\) and \((b_1, \ldots, b_k)\) is a basis of \(U\),
then every \(x \in L\) can be written as:
\[
x = x_0 + \lambda_1 b_1 + \cdots + \lambda_k b_k, \quad \lambda_i \in \mathbb{R}
\]
This is called the parametric equation of the affine subspace.
Example 2.60
A line \(y = x_0 + \lambda b_1\), where \(\lambda \in \mathbb{R}\) is an example of a parametric equation in a 1-dimensional affine subspace.
A plane \(y = x_0 + \lambda_1 b_1 + \lambda_2 b_2\), where \(b_1, b_2\) are linearly independent is an example of a parametric equation in a 2-dimensional affine subspace.
A hyperplane is an example of an \((n - 1)\)-dimensional affine subspace \[ y = x_0 + \sum_{i=1}^{n-1} \lambda_i b_i \]
- In \(\mathbb{R}^2\), a line is a hyperplane.
- In \(\mathbb{R}^3\), a plane is a hyperplane.
- In \(\mathbb{R}^2\), a line is a hyperplane.
2.8.1 Relation to Linear Equations
For \(\mathbf{A} \in \mathbb{R}^{m \times n}\) and \(x \in \mathbb{R}^m\), the solution set of \(\mathbf{A}\lambda = x\) is either empty or an affine subspace of \(\mathbb{R}^n\) with dimension \(n - \text{rk}(\mathbf{A})\).
- The equation \(\mathbf{A} x = b\) (inhomogeneous system) defines an affine subspace.
- The equation \(\mathbf{A} x = 0\) (homogeneous system) defines a vector subspace, which can be seen as a special affine subspace with support point \(x_0 = 0\).
2.8.2 Affine Mappings
Affine mappings generalize linear mappings by including a translation.
Definition 2.37 Let \(V, W\) be vector spaces, \(\Phi : V \to W\) a linear map, and \(a \in W\). Then \[ \varphi : V \to W, \quad x \mapsto a + \Phi(x) \] is an affine mapping with translation vector \(a\).
Lemma 2.10 Properties:
- Every affine map can be written as a composition:
\[
\varphi = \tau \circ \Phi
\]
where \(\tau\) is a translation and \(\Phi\) is linear.
- The composition of affine mappings is affine.
- If an affine mapping is bijective, it preserves:
- Dimension
- Parallelism
- Geometric structure
- Dimension