Math Core

Lesson 4.1 · Vector Spaces

Vector spaces and subspaces

So far every vector you have met has been a column of numbers in Rn\mathbb{R}^n. But polynomials, matrices and functions can also be added and scaled, and they obey exactly the same algebraic rules. A vector space captures those rules once, so that every theorem you prove about spans, independence and bases applies to all of these objects at the same time.

The axioms of a vector space

What made Rn\mathbb{R}^n work was never the fact that its vectors are lists of numbers. It was that you could add two vectors, multiply a vector by a scalar, and those operations behaved predictably. The definition below keeps the behavior and drops everything else.

Definition

Vector space

A vector space is a nonempty set VV of objects, called vectors, together with two operations, addition and multiplication by real scalars, such that for all u,v,w\mathbf{u}, \mathbf{v}, \mathbf{w} in VV and all scalars cc and dd:

  1. u+v\mathbf{u} + \mathbf{v} is in VV (closure under addition).
  2. u+v=v+u\mathbf{u} + \mathbf{v} = \mathbf{v} + \mathbf{u}.
  3. (u+v)+w=u+(v+w)(\mathbf{u} + \mathbf{v}) + \mathbf{w} = \mathbf{u} + (\mathbf{v} + \mathbf{w}).
  4. There is a zero vector 0\mathbf{0} in VV with u+0=u\mathbf{u} + \mathbf{0} = \mathbf{u}.
  5. Each u\mathbf{u} has a negative −u-\mathbf{u} in VV with u+(−u)=0\mathbf{u} + (-\mathbf{u}) = \mathbf{0}.
  6. cuc\mathbf{u} is in VV (closure under scalar multiplication).
  7. c(u+v)=cu+cvc(\mathbf{u} + \mathbf{v}) = c\mathbf{u} + c\mathbf{v}.
  8. (c+d)u=cu+du(c + d)\mathbf{u} = c\mathbf{u} + d\mathbf{u}.
  9. c(du)=(cd)uc(d\mathbf{u}) = (cd)\mathbf{u}.
  10. 1u=u1\mathbf{u} = \mathbf{u}.

From these ten axioms alone you can prove familiar facts, for example that 0u=00\mathbf{u} = \mathbf{0} and (−1)u=−u(-1)\mathbf{u} = -\mathbf{u} for every u\mathbf{u}. (For the first: 0u=(0+0)u=0u+0u0\mathbf{u} = (0 + 0)\mathbf{u} = 0\mathbf{u} + 0\mathbf{u}, then add −0u-0\mathbf{u} to both sides.)

Some standard examples:

  • Rn\mathbb{R}^n with the usual entrywise operations.
  • Pn\mathbb{P}_n, the polynomials of degree at most nn, p(t)=a0+a1t+⋯+antnp(t) = a_0 + a_1 t + \cdots + a_n t^n. You add polynomials by adding matching coefficients, and the zero vector is the zero polynomial.
  • Mm×nM_{m \times n}, the m×nm \times n matrices, with matrix addition and scalar multiplication.
  • The set of all real-valued functions on an interval, with (f+g)(t)=f(t)+g(t)(f + g)(t) = f(t) + g(t) and (cf)(t)=c f(t)(cf)(t) = c\,f(t).

In each case, checking the ten axioms comes down to properties of real numbers you already trust.

Subspaces

Most vector spaces you will work with live inside a bigger one you already know. A plane through the origin in R3\mathbb{R}^3 is a vector space in its own right, but you don't need to recheck all ten axioms: most of them (commutativity, associativity, distributivity) are inherited automatically from R3\mathbb{R}^3. Only three things can go wrong.

Definition

Subspace

A subspace of a vector space VV is a subset HH of VV with three properties:

  1. The zero vector of VV is in HH.
  2. HH is closed under addition: if u\mathbf{u} and v\mathbf{v} are in HH, so is u+v\mathbf{u} + \mathbf{v}.
  3. HH is closed under scalar multiplication: if u\mathbf{u} is in HH and cc is any scalar, cuc\mathbf{u} is in HH.

Every subspace is itself a vector space, using the operations of VV. Two subspaces always exist: VV itself and the zero subspace {0}\lbrace \mathbf{0} \rbrace.

Geometrically, the subspaces of R3\mathbb{R}^3 are exactly {0}\lbrace \mathbf{0} \rbrace, lines through the origin, planes through the origin and R3\mathbb{R}^3 itself. A line or plane that misses the origin is never a subspace.

Worked example: A plane through the origin

Show that H={(x,y,z):x−2y+z=0}H = \lbrace (x, y, z) : x - 2y + z = 0 \rbrace is a subspace of R3\mathbb{R}^3.

Zero vector. 0−2(0)+0=00 - 2(0) + 0 = 0, so (0,0,0)(0, 0, 0) is in HH.

Addition. Suppose (x1,y1,z1)(x_1, y_1, z_1) and (x2,y2,z2)(x_2, y_2, z_2) are in HH. Their sum satisfies

(x1+x2)−2(y1+y2)+(z1+z2)=(x1−2y1+z1)+(x2−2y2+z2)=0+0=0.(x_1 + x_2) - 2(y_1 + y_2) + (z_1 + z_2) = (x_1 - 2y_1 + z_1) + (x_2 - 2y_2 + z_2) = 0 + 0 = 0.

Scalars. For (x,y,z)(x, y, z) in HH and any cc: cx−2(cy)+cz=c(x−2y+z)=c⋅0=0cx - 2(cy) + cz = c(x - 2y + z) = c \cdot 0 = 0.

All three conditions hold, so HH is a subspace.

The same argument works for the solution set of any homogeneous linear system. It fails the moment a right-hand side is nonzero, because then 0\mathbf{0} is not a solution.

Worked example: Sets that are not subspaces

(a) L={(x,y):y=x+1}L = \lbrace (x, y) : y = x + 1 \rbrace is a line in R2\mathbb{R}^2, but (0,0)(0, 0) is not on it (0≠0+10 \ne 0 + 1). It is not a subspace.

(b) Q={(x,y):xy≥0}Q = \lbrace (x, y) : xy \ge 0 \rbrace is the union of the first and third quadrants, axes included. It contains 0\mathbf{0}, and it is closed under scalar multiplication, since (cx)(cy)=c2xy≥0(cx)(cy) = c^2 xy \ge 0. But it is not closed under addition: (1,0)(1, 0) and (0,−1)(0, -1) are in QQ, while their sum (1,−1)(1, -1) has xy=−1xy = -1. So QQ is not a subspace.

To show a set is not a subspace you need only one specific counterexample. To show it is one, you must verify each condition for arbitrary vectors.

Common mistake

Containing the zero vector is necessary but not sufficient. Part (b) above contains 0\mathbf{0} and is closed under scaling, yet it still fails. Always check both closure properties, and when you suspect a failure, hunt for concrete vectors that break it.

Spans are subspaces

The most important way to build a subspace is to take a span.

Every span is a subspace

If v1,…,vp\mathbf{v}_1, \dots, \mathbf{v}_p are in a vector space VV, then Span⁡{v1,…,vp}\operatorname{Span}\lbrace \mathbf{v}_1, \dots, \mathbf{v}_p \rbrace is a subspace of VV. It is called the subspace spanned (or generated) by v1,…,vp\mathbf{v}_1, \dots, \mathbf{v}_p.

The proof is short. The zero vector is 0v1+⋯+0vp0\mathbf{v}_1 + \cdots + 0\mathbf{v}_p. If u=∑aivi\mathbf{u} = \sum a_i \mathbf{v}_i and w=∑bivi\mathbf{w} = \sum b_i \mathbf{v}_i, then u+w=∑(ai+bi)vi\mathbf{u} + \mathbf{w} = \sum (a_i + b_i)\mathbf{v}_i and cu=∑(cai)vic\mathbf{u} = \sum (ca_i)\mathbf{v}_i are again linear combinations.

This gives a fast subspace test: if you can write every vector of HH as a linear combination of fixed vectors, HH is a span and therefore a subspace.

Worked example: Recognizing a span

Let WW be the set of all vectors of the form (a−b,  2b,  a+3b)(a - b,\; 2b,\; a + 3b) with a,ba, b real. Show WW is a subspace of R3\mathbb{R}^3.

Split the vector by parameter:

[a−b2ba+3b]=a[101]+b[−123].\begin{bmatrix} a - b \\ 2b \\ a + 3b \end{bmatrix} = a \begin{bmatrix} 1 \\ 0 \\ 1 \end{bmatrix} + b \begin{bmatrix} -1 \\ 2 \\ 3 \end{bmatrix}.

So W=Span⁡{(1,0,1),(−1,2,3)}W = \operatorname{Span}\lbrace (1, 0, 1), (-1, 2, 3) \rbrace, which is a subspace by the Key Idea. No axiom checking needed.

Tip

Before checking anything else, test the zero vector. If 0\mathbf{0} is not in the set, you are done: it is not a subspace. For sets described by equations, a nonzero constant term or a squared variable is a strong hint that something fails.

Practice

Practice 1

Which set is a subspace of R3\mathbb{R}^3?

Practice 2

For what value of kk is {(x,y,z):2x−y+5z=k}\lbrace (x, y, z) : 2x - y + 5z = k \rbrace a subspace of R3\mathbb{R}^3?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 3

The vector (4,k,−2)(4, k, -2) lies in the subspace H={(x,y,z):x−2y+z=0}H = \lbrace (x, y, z) : x - 2y + z = 0 \rbrace. Find kk.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 4

Let W={(a,b):a=b2}W = \lbrace (a, b) : a = b^2 \rbrace in R2\mathbb{R}^2. Which statement is true?

Practice 5

Which subset of P2\mathbb{P}_2 is a subspace?

Practice 6

Let v1=(1,0,2)\mathbf{v}_1 = (1, 0, 2) and v2=(0,1,−1)\mathbf{v}_2 = (0, 1, -1). The vector w=(2,5,−1)\mathbf{w} = (2, 5, -1) is in Span⁡{v1,v2}\operatorname{Span}\lbrace \mathbf{v}_1, \mathbf{v}_2 \rbrace. Find the weights (c1,c2)(c_1, c_2) with w=c1v1+c2v2\mathbf{w} = c_1 \mathbf{v}_1 + c_2 \mathbf{v}_2.

Enter a point like (2, -3)

Practice 7

Let HH be the set of all 2×22 \times 2 matrices with determinant 00. Which statement is true?