---
tag: 0FBXFBZBH8
kind: definition
name: Affine subspace
msc: [51N10]
defines: 0PYW26VNT6
uses: [09XNAPTJQ7]
sources:
  - url: https://en.wikipedia.org/wiki/Affine_space
    locator: Affine subspaces and parallelism
---

## Definition

Let $K$ be a field, let $V$ be a vector space over $K$, and let $A$ be an [[affine space|09XNAPTJQ7]] over $V$.
A nonempty subset $S$ of $A$ is an affine subspace if $S = p + W$ for a point $p$ of $A$ and a linear subspace $W$ of $V$. This means that
$$S = p + W = \{\, p + w \;:\; w \in W \,\}.$$
The subspace $W$ is the direction of $S$. It is unique: $W = \{\, q - r : q, r \in S \,\}$. The dimension of $S$ is the dimension of $W$.

## Remarks

For each point $p$ of $S$, $S = p + W$. Thus each point of $S$ can serve as the base point.
In $\mathbb{R}^n$, the affine subspaces of dimension 1 are the [[lines|0MP9BCF6DP]], and those of dimension 2 are the [[planes|0V3XAMF3C1]]. Those of dimension $n - 1$ are the hyperplanes.
Two affine subspaces are parallel if they have the same direction.
Mathlib's `AffineSubspace` also allows the empty set. A subset $S$ is an affine subspace in this sense if $c(q - r) + s \in S$ for all $c \in K$ and $q, r, s \in S$.

## Explanations

### L1 human

An affine subspace is a flat piece of space that need not pass through the origin. A line or a plane that has been moved away from the origin is an example. It is a linear subspace that has been shifted by a translation.
