Unit 3, lesson 13

Subspaces, Sums and Intersections

When a set of vectors is a subspace, how the subspace test checks zero and closure under addition and scaling, and why spans, homogeneous solution sets, sums and intersections pass while affine sets and unions can fail.

  • Video 13
  • Subspaces, Independence and Bases

Picture the plane z=x+yz = x + y through the origin in space and a parallel copy lifted one unit higher. Both look flat and endless, yet they react differently to vector arithmetic. Add two vectors that end in the first plane and the sum ends there too, but double a vector that ends in the lifted plane and its tip leaves the plane. This lesson turns that difference into an exact test, shows which familiar sets pass it, and compares sums, intersections and unions of subspaces.

Key terms

Subspace

Definition Throughout, a tuple such as (x,y,z)(x, y, z) stands for a column vector. Let WW be a subset of Rn\mathbb{R}^n. The set WW is closed under addition if u+v\mathbf{u} + \mathbf{v} lies in WW for all u\mathbf{u} and v\mathbf{v} in WW. It is closed under scalar multiplication, or scaling, if cuc\mathbf{u} lies in WW for every u\mathbf{u} in WW and every real number cc. A subspace of Rn\mathbb{R}^n is a subset WW that contains the zero vector 0\mathbf{0} and is closed under addition and under scalar multiplication. The whole space Rn\mathbb{R}^n and the zero subspace {0}\{\mathbf{0}\} are subspaces of Rn\mathbb{R}^n.

In plain words A subspace is a set that contains the origin and that you cannot leave by adding its members or by stretching, shrinking or reversing them. Closure under addition speaks about every pair of members, and closure under scaling about every member and every real scalar, negative ones included, so a few examples that work prove nothing.

Example The line LL of all multiples t(1,2)t(1, 2) in R2\mathbb{R}^2 is a subspace. It contains 0=0(1,2)\mathbf{0} = 0(1, 2). For any members s(1,2)s(1, 2) and t(1,2)t(1, 2) and any real cc,

s(1,2)+t(1,2)=(s+t)(1,2),c (t(1,2))=(ct)(1,2),\begin{aligned} s(1, 2) + t(1, 2) &= (s + t)(1, 2), \\[0.4em] c\,\big(t(1, 2)\big) &= (ct)(1, 2), \end{aligned}

and both results are again multiples of (1,2)(1, 2). By contrast, the quadrant of vectors (x,y)(x, y) with x≥0x \ge 0 and y≥0y \ge 0 contains 0\mathbf{0} and is closed under addition, but it is not a subspace, because (−1)(1,1)=(−1,−1)(-1)(1, 1) = (-1, -1) leaves it.

Subspace test

Definition For a subset WW of Rn\mathbb{R}^n the following three statements are equivalent.

  1. The set WW is a subspace, that is, it contains 0\mathbf{0} and is closed under addition and scalar multiplication.
  2. The set WW is nonempty and closed under addition and scalar multiplication.
  3. The set WW is a vector space in its own right, with the addition and scalar multiplication of Rn\mathbb{R}^n.

The reason is that a nonempty WW has some member w\mathbf{w}, and closure then gives 0w=00\mathbf{w} = \mathbf{0} and (−1)w=−w(-1)\mathbf{w} = -\mathbf{w} in WW. The other vector space rules, such as associativity and the distributive laws, already hold for all vectors of Rn\mathbb{R}^n, so they hold in WW. To prove that a set is a subspace, check 0\mathbf{0} and then take arbitrary members and an arbitrary real scalar. To prove that it is not, one specific failure is enough. The empty set is never a subspace, since it has no zero vector.

In plain words Check three things, zero, sums and multiples, with letters rather than numbers. Everything else a vector space needs comes for free from Rn\mathbb{R}^n.

Example Let WW be the set of vectors (x,y,z)(x, y, z) in R3\mathbb{R}^3 with z=x+yz = x + y. The zero vector is in WW because 0=0+00 = 0 + 0. Take u=(u1,u2,u3)\mathbf{u} = (u_1, u_2, u_3) and v=(v1,v2,v3)\mathbf{v} = (v_1, v_2, v_3) in WW, so u3=u1+u2u_3 = u_1 + u_2 and v3=v1+v2v_3 = v_1 + v_2. The third entry of u+v\mathbf{u} + \mathbf{v} is

u3+v3=(u1+u2)+(v1+v2)=(u1+v1)+(u2+v2),\begin{aligned} u_3 + v_3 &= (u_1 + u_2) + (v_1 + v_2) \\[0.4em] &= (u_1 + v_1) + (u_2 + v_2), \end{aligned}

the sum of its first two entries. For a real cc, the third entry of cuc\mathbf{u} is cu3=cu1+cu2cu_3 = cu_1 + cu_2. So WW is a subspace of R3\mathbb{R}^3. Specific vectors agree with the proof. The vectors (1,2,3)(1, 2, 3) and (4,−1,3)(4, -1, 3) lie in WW, and so do their sum (5,1,6)(5, 1, 6) and the multiple −2(4,−1,3)=(−8,2,−6)-2(4, -1, 3) = (-8, 2, -6).

Solution set of a homogeneous system

Definition Let AA be a real m×nm \times n matrix. The solution set of the homogeneous system Ax=0A\mathbf{x} = \mathbf{0},

{x∈Rn∣Ax=0},\{\mathbf{x} \in \mathbb{R}^n \mid A\mathbf{x} = \mathbf{0}\},

is a subspace of Rn\mathbb{R}^n. Indeed A0=0A\mathbf{0} = \mathbf{0}, and if Au=0A\mathbf{u} = \mathbf{0} and Av=0A\mathbf{v} = \mathbf{0}, then A(u+v)=Au+Av=0A(\mathbf{u} + \mathbf{v}) = A\mathbf{u} + A\mathbf{v} = \mathbf{0} and A(cu)=cAu=0A(c\mathbf{u}) = cA\mathbf{u} = \mathbf{0} for every real cc. The argument uses one fixed matrix AA for both solutions, since solutions of two different systems say nothing about closure. In the same way, the span of any finite list v1,…,vk\mathbf{v}_1, \dots, \mathbf{v}_k in Rn\mathbb{R}^n is a subspace of Rn\mathbb{R}^n. All coefficients zero give 0\mathbf{0}, adding two combinations adds their coefficients entry by entry, and scaling a combination scales every coefficient.

In plain words Everything a fixed matrix sends to zero forms a subspace, and so does everything you can build from a fixed list of vectors. These are the two standard ways to describe a subspace, by equations or by generators.

Example The system x+y+z=0x + y + z = 0, x−z=0x - z = 0 has the augmented matrix

[111010−10].\left[\begin{array}{ccc|c} 1 & 1 & 1 & 0 \\ 1 & 0 & -1 & 0 \end{array}\right].

The step R2→R2−R1R_2 \to R_2 - R_1 turns the second row into (0,−1,−2∣0)(0, -1, -2 \mid 0), so y=−2zy = -2z and then x=−y−z=zx = -y - z = z. With z=tz = t free, the solutions are t(1,−2,1)t(1, -2, 1), the line span⁡{(1,−2,1)}\operatorname{span}\{(1, -2, 1)\} through the origin. The plane WW from the subspace test is also a span, since every member equals (x,y,x+y)=x(1,0,1)+y(0,1,1)(x, y, x + y) = x(1, 0, 1) + y(0, 1, 1).

Affine set

Definition Let WW be a subspace of Rn\mathbb{R}^n and p\mathbf{p} a vector in Rn\mathbb{R}^n. The translate

p+W={p+w∣w∈W}\mathbf{p} + W = \{\mathbf{p} + \mathbf{w} \mid \mathbf{w} \in W\}

is called an affine set. It is a subspace exactly when p\mathbf{p} lies in WW, and then p+W=W\mathbf{p} + W = W. If the system Ax=bA\mathbf{x} = \mathbf{b} has a particular solution xp\mathbf{x}_p, its solution set is the affine set xp+{x∣Ax=0}\mathbf{x}_p + \{\mathbf{x} \mid A\mathbf{x} = \mathbf{0}\}. When b≠0\mathbf{b} \ne \mathbf{0} the zero vector is not a solution, so that solution set is not a subspace. An inconsistent system has an empty solution set, which is not a subspace either.

In plain words An affine set is a subspace slid along a fixed vector. It keeps the shape and the directions of the subspace, but once it misses the origin, the sum of any two of its members lands off it.

Example Let FF be the set of vectors (x,y,z)(x, y, z) with z=x+y+1z = x + y + 1, the solution set of x+y−z=−1x + y - z = -1. Every member can be written as

(x, y, x+y+1)=(0,0,1)+(x, y, x+y),\begin{aligned} (x,\ y,\ x + y + 1) &= (0, 0, 1) \\[0.4em] &\quad + (x,\ y,\ x + y), \end{aligned}

so F=(0,0,1)+WF = (0, 0, 1) + W for the plane WW above. The zero vector is not in FF, because 0=0+0+10 = 0 + 0 + 1 is false. Scaling fails too. The vector (0,0,1)(0, 0, 1) is in FF, but 2(0,0,1)=(0,0,2)2(0, 0, 1) = (0, 0, 2) is not, since 2≠12 \ne 1.

Intersection and sum of subspaces

Definition Let UU and VV be subspaces of Rn\mathbb{R}^n. Their intersection U∩VU \cap V is the set of vectors that lie in both UU and VV. Their sum is the set of all sums of a vector in UU and a vector in VV,

U+V={u+v∣u∈U, v∈V}.U + V = \{\mathbf{u} + \mathbf{v} \mid \mathbf{u} \in U,\ \mathbf{v} \in V\}.

Both are subspaces of Rn\mathbb{R}^n. For the intersection, 0\mathbf{0} lies in both, and sums and multiples of shared members stay in each subspace. For the sum, 0=0+0\mathbf{0} = \mathbf{0} + \mathbf{0} is a member, and two members add as

(u1+v1)+(u2+v2)=(u1+u2)+(v1+v2)\begin{aligned} &(\mathbf{u}_1 + \mathbf{v}_1) + (\mathbf{u}_2 + \mathbf{v}_2) \\[0.4em] &\quad = (\mathbf{u}_1 + \mathbf{u}_2) + (\mathbf{v}_1 + \mathbf{v}_2) \end{aligned}

with u1+u2\mathbf{u}_1 + \mathbf{u}_2 in UU and v1+v2\mathbf{v}_1 + \mathbf{v}_2 in VV. Likewise c(u+v)=cu+cvc(\mathbf{u} + \mathbf{v}) = c\mathbf{u} + c\mathbf{v} with cuc\mathbf{u} in UU and cvc\mathbf{v} in VV. The sum contains UU and VV, because u=u+0\mathbf{u} = \mathbf{u} + \mathbf{0}, and it is the smallest subspace that contains both. If UU and VV are spanned by two lists, then U+VU + V is spanned by the two lists joined together.

In plain words The intersection keeps only what the two subspaces share. The sum collects everything you can reach by taking one step in UU and one step in VV.

Example In R3\mathbb{R}^3 let UU be the xyxy-plane of vectors (x,y,0)(x, y, 0) and VV the xzxz-plane of vectors (x,0,z)(x, 0, z). A vector in both has third entry 00 and second entry 00, so U∩VU \cap V is the xx-axis span⁡{e1}\operatorname{span}\{\mathbf{e}_1\}. The sum is all of R3\mathbb{R}^3, since every vector splits as

(x,y,z)=(x,y,0)+(0,0,z).(x, y, z) = (x, y, 0) + (0, 0, z).

For instance (1,2,3)=(1,2,0)+(0,0,3)(1, 2, 3) = (1, 2, 0) + (0, 0, 3) lies in U+VU + V although it lies in neither plane. The split is not unique here. The same vector also equals (0,2,0)+(1,0,3)(0, 2, 0) + (1, 0, 3), because a piece of the shared xx-axis can move from one part to the other.

Union of subspaces

Definition The union U∪VU \cup V of two subspaces of Rn\mathbb{R}^n is the set of vectors that lie in UU or in VV. It contains 0\mathbf{0} and is closed under scalar multiplication, but it is usually not closed under addition. Precisely, U∪VU \cup V is a subspace if and only if U⊆VU \subseteq V or V⊆UV \subseteq U. If one contains the other, the union is simply the larger subspace. If neither contains the other, pick u\mathbf{u} in UU but not in VV and v\mathbf{v} in VV but not in UU. If u+v\mathbf{u} + \mathbf{v} were in UU, then v=(u+v)−u\mathbf{v} = (\mathbf{u} + \mathbf{v}) - \mathbf{u} would be in UU, and similarly for VV, so u+v\mathbf{u} + \mathbf{v} lies outside U∪VU \cup V.

In plain words Pooling the members of two subspaces usually does not give a subspace, because adding a vector from each can land outside both. The sum U+VU + V repairs this, since it includes every such vector.

Example In R2\mathbb{R}^2 take the xx-axis and the yy-axis. Their union contains 0\mathbf{0}, and multiples of a horizontal or vertical vector stay horizontal or vertical. But (1,0)+(0,1)=(1,1)(1, 0) + (0, 1) = (1, 1) lies on neither axis, so the union is not a subspace. Their intersection is {0}\{\mathbf{0}\}, which is a subspace, the smallest one there is. The same failure happens for the two coordinate planes above, where e2+e3=(0,1,1)\mathbf{e}_2 + \mathbf{e}_3 = (0, 1, 1) lies in neither plane.

Check yourself

  1. Which of these subsets of R2\mathbb{R}^2 are subspaces? (a) The line y=3xy = 3x. (b) The line y=3x+1y = 3x + 1.
Show the answer

(a) Yes. It is the solution set of the homogeneous equation 3x−y=03x - y = 0, and it equals span⁡{(1,3)}\operatorname{span}\{(1, 3)\}.

(b) No. The zero vector fails, because 0=3⋅0+10 = 3 \cdot 0 + 1 is false. This line is the affine set (0,1)+span⁡{(1,3)}(0, 1) + \operatorname{span}\{(1, 3)\}.

  1. The set SS of vectors (x,y)(x, y) with xy≥0xy \ge 0 contains 0\mathbf{0}, and it is closed under scalar multiplication because (cx)(cy)=c2xy≥0(cx)(cy) = c^2 xy \ge 0. Is SS a subspace of R2\mathbb{R}^2?
Show the answer

No. Passing the zero test and the scaling test is not enough. The vectors (1,2)(1, 2) and (−2,−1)(-2, -1) lie in SS, since both products equal 22. Their sum (−1,1)(-1, 1) has product −1<0-1 < 0, so SS is not closed under addition. In fact SS is the union of the closed first and third quadrants, and as with the union of the two axes, addition is the condition that fails.

  1. In R3\mathbb{R}^3 let UU be the plane x+y+z=0x + y + z = 0 and VV the plane x=yx = y. Find U∩VU \cap V and show that U+V=R3U + V = \mathbb{R}^3.
Show the answer

A vector in both satisfies x=yx = y and x+y+z=0x + y + z = 0, so z=−2xz = -2x and the vector is x(1,1,−2)x(1, 1, -2). Hence

U∩V=span⁡{(1,1,−2)}.U \cap V = \operatorname{span}\{(1, 1, -2)\}.

For the sum, write any (a,b,c)(a, b, c) as

(a,b,c)=(a, b, −a−b)+(0, 0, a+b+c).\begin{aligned} (a, b, c) &= (a,\ b,\ -a - b) \\[0.4em] &\quad + (0,\ 0,\ a + b + c). \end{aligned}

The first vector lies in UU, because a+b+(−a−b)=0a + b + (-a - b) = 0, and the second lies in VV, because its first two entries are equal. So every vector of R3\mathbb{R}^3 is in U+VU + V. For example (1,2,3)=(1,2,−3)+(0,0,6)(1, 2, 3) = (1, 2, -3) + (0, 0, 6).

How this lesson connects

Where this leads in Linear Algebra II