Linear Algebra › Section H · The geometry of vector spaces › Topic H.1
Affine combinations
Lines and planes that miss the origin are not subspaces, yet they are just as simple. Affine combinations, linear combinations whose weights add to 1, describe them exactly and do not depend on where the origin is, which is why geometry and computer graphics rely on them.
Points rather than vectors
Span describes lines and planes through the origin. But the line through the points \(\mathbf{p} = (1, 2)\) and \(\mathbf{q} = (4, 3)\) does not pass through the origin, so it is not a span and not a subspace. Its points are
a combination of \(\mathbf{p}\) and \(\mathbf{q}\) whose two weights, \(1 - t\) and \(t\), always add to 1. Setting \(t = 0\) gives \(\mathbf{p}\), \(t = 1\) gives \(\mathbf{q}\), and \(t = \tfrac{1}{2}\) gives the midpoint \((2.5, 2.5)\). That condition on the weights is the whole idea of this section of the course: it lets us treat vectors as points.
Definition and the affine hull
An affine combination of vectors \(\mathbf{v}_1, \dots, \mathbf{v}_p\) in \(\mathbb{R}^n\) is a linear combination
The weights may be negative or larger than 1; only their sum is fixed. The set of all affine combinations of the points in a set \(S\) is the affine hull of \(S\), written \(\operatorname{aff} S\). The affine hull of one point is that point; of two distinct points, the line through them; of three points not on a line, the plane through them. So \(\operatorname{aff} S\) is the smallest flat object containing \(S\).
Why the weights add to 1
Move every point by the same vector \(\mathbf{b}\), which is what happens if you shift the origin. For an affine combination,
so the result moves with the points. With weights adding to 2, it would move by \(2\mathbf{b}\), and the answer would depend on where the origin happened to be. Substituting \(c_1 = 1 - c_2 - \cdots - c_p\) gives a test: \(\mathbf{y}\) is an affine combination of \(\mathbf{v}_1, \dots, \mathbf{v}_p\) exactly when \(\mathbf{y} - \mathbf{v}_1\) is a linear combination of \(\mathbf{v}_2 - \mathbf{v}_1, \dots, \mathbf{v}_p - \mathbf{v}_1\).
Worked example: testing membership in a plane
Let \(\mathbf{v}_1 = (1, 0, 2)\), \(\mathbf{v}_2 = (3, 1, 1)\), \(\mathbf{v}_3 = (0, 2, 4)\). Is \(\mathbf{y} = (4, 4, 2)\) in their affine hull? 1. Differences: \(\mathbf{v}_2 - \mathbf{v}_1 = (2, 1, -1)\), \(\mathbf{v}_3 - \mathbf{v}_1 = (-1, 2, 2)\), \(\mathbf{y} - \mathbf{v}_1 = (3, 4, 0)\). 2. Solve
The first two coordinates give \(2c_2 - c_3 = 3\) and \(c_2 + 2c_3 = 4\), so \(c_2 = 2\), \(c_3 = 1\). The third checks: \(-2 + 2 = 0\). 3. Then \(c_1 = 1 - 2 - 1 = -2\), so \(\mathbf{y} = -2\mathbf{v}_1 + 2\mathbf{v}_2 + \mathbf{v}_3\). 4. For \(\mathbf{z} = (4, 4, 3)\), the same first two equations give \(c_2 = 2\), \(c_3 = 1\), but the third needs \(0 = 1\), so \(\mathbf{z}\) is not in the plane.
Affine sets
A set \(S\) is affine if, whenever \(\mathbf{p}\) and \(\mathbf{q}\) are in \(S\), the whole line \((1 - t)\mathbf{p} + t\mathbf{q}\) is in \(S\). One can prove that an affine set then contains every affine combination of its points, so \(S\) is affine exactly when \(S = \operatorname{aff} S\). Examples are a single point, any line, any plane, all of \(\mathbb{R}^n\), and the empty set. A circle is not affine, since it does not contain the line through two of its points. Every subspace is affine, because a subspace contains all linear combinations of its vectors, including those with weights adding to 1. An affine set is a subspace exactly when it contains the origin.
Flats: translated subspaces
A translate of a set \(W\) by a vector \(\mathbf{p}\) is \(\mathbf{p} + W = \{\mathbf{p} + \mathbf{w} : \mathbf{w} \in W\}\). A flat is a translate of a subspace, and a non-empty set is affine exactly when it is a flat. The subspace is unique: it is \(\{\mathbf{x} - \mathbf{y} : \mathbf{x}, \mathbf{y} \in S\}\), the set of differences of points of \(S\). The dimension of a flat is the dimension of that subspace, so a line is a 1-dimensional flat and a plane a 2-dimensional flat. In \(\mathbb{R}^n\), a flat of dimension \(n - 1\) is called a hyperplane. As "Solution sets of linear systems" showed, the solution set of a consistent system \(A\mathbf{x} = \mathbf{b}\) is \(\mathbf{p} + \operatorname{Nul} A\): a flat.
Homogeneous forms
There is a neat way to turn affine questions into span questions. The homogeneous form of \(\mathbf{v}\) in \(\mathbb{R}^n\) is the vector \(\tilde{\mathbf{v}}\) in \(\mathbb{R}^{n+1}\) made by appending a 1: for example, \((3, 2)\) becomes \((3, 2, 1)\). Then \(\mathbf{y}\) is in \(\operatorname{aff}\{\mathbf{v}_1, \dots, \mathbf{v}_p\}\) exactly when \(\tilde{\mathbf{y}}\) is in \(\operatorname{Span}\{\tilde{\mathbf{v}}_1, \dots, \tilde{\mathbf{v}}_p\}\). The reason is the last coordinate: the equation \(c_1\tilde{\mathbf{v}}_1 + \cdots + c_p\tilde{\mathbf{v}}_p = \tilde{\mathbf{y}}\) has \(c_1\mathbf{v}_1 + \cdots + c_p\mathbf{v}_p = \mathbf{y}\) in its first \(n\) rows, plus the extra row \(c_1 + \cdots + c_p = 1\). One row reduction finds the weights, or shows that none exist.
Worked example: using homogeneous forms
Is \(\mathbf{y} = (5, 3)\) on the line through \(\mathbf{v}_1 = (1, 1)\) and \(\mathbf{v}_2 = (3, 2)\)? 1. Append 1s: \(\tilde{\mathbf{v}}_1 = (1, 1, 1)\), \(\tilde{\mathbf{v}}_2 = (3, 2, 1)\), \(\tilde{\mathbf{y}} = (5, 3, 1)\). 2. Solve \(c_1\tilde{\mathbf{v}}_1 + c_2\tilde{\mathbf{v}}_2 = \tilde{\mathbf{y}}\): the equations are \(c_1 + 3c_2 = 5\), \(c_1 + 2c_2 = 3\) and \(c_1 + c_2 = 1\). 3. Subtracting the third from the first gives \(2c_2 = 4\), so \(c_2 = 2\) and \(c_1 = -1\). 4. The middle equation checks: \(-1 + 4 = 3\). So \(\mathbf{y} = -\mathbf{v}_1 + 2\mathbf{v}_2\), on the line, beyond \(\mathbf{v}_2\) because \(c_2 > 1\). 5. Check directly: \(-(1, 1) + 2(3, 2) = (5, 3)\).
Common mistakes to avoid
First, forgetting the condition on the weights: \(2\mathbf{v}_1 + 2\mathbf{v}_2\) is in the span of two vectors but is not an affine combination of them. Second, assuming affine weights must lie between 0 and 1; negative weights and weights above 1 are allowed and give points beyond the given ones. Third, calling a line that misses the origin a subspace; it is a flat, not a subspace. Fourth, testing \(\mathbf{y}\) against the span of \(\mathbf{v}_2 - \mathbf{v}_1, \dots\) instead of testing \(\mathbf{y} - \mathbf{v}_1\), or forgetting to recover \(c_1\) at the end. Fifth, appending 0 instead of 1 when forming homogeneous forms.
Key takeaways
An affine combination is c₁v₁ + ⋯ + cₚvₚ with c₁ + ⋯ + cₚ = 1; weights may be negative. Because the weights add to 1, the result moves with the points when the origin shifts. The affine hull aff S is the set of all affine combinations of points of S: a line through two points, a plane through three non-collinear ones. y is in aff{v₁, …, vₚ} exactly when y − v₁ is in the span of the differences vᵢ − v₁, or when the homogeneous form (y, 1) is in the span of the (vᵢ, 1). Affine sets contain every line through two of their points; the non-empty ones are flats, translates p + W of subspaces, with dimension dim W. A hyperplane in Rⁿ is a flat of dimension n − 1.
Flashcards
Flashcard
c₁v₁ + ⋯ + cₚvₚ with c₁ + ⋯ + cₚ = 1
Test your understanding
Question 1 of 5
Which of these is an affine combination of v₁, v₂ and v₃?
Question 2 of 5
Using homogeneous forms, (7, 4) = c₁(1, 1) + c₂(3, 2) with c₁ + c₂ = 1. What are the weights?
Question 3 of 5
Which set is an affine set but not a subspace of R³?
Question 4 of 5
The set of solutions of a consistent system Ax = b, where A is 3 × 5 with rank 3, is a flat. What is its dimension?
Question 5 of 5
Is y = (2, 5, 3) in the affine hull of v₁ = (1, 1, 1) and v₂ = (2, 3, 2)?
