Linear Algebra › Section D · Vector spaces › Topic D.1

Vector spaces and subspaces

Arrows in the plane are not the only things you can add and scale. Polynomials, matrices, functions and signals obey the same algebra, and naming that shared structure, a vector space, lets one set of theorems work for all of them.

The same algebra everywhere

Two polynomials can be added to give a polynomial, and a polynomial can be multiplied by a number. The same is true of 2 x 3 matrices, of continuous functions and of the solutions of \(y'' + y = 0\). In each case the rules of arithmetic are exactly the ones you used for vectors in \(\mathbb{R}^n\) in "Vectors and vector equations". Rather than prove the same theorem four times, linear algebra lists the rules once and calls any set that obeys them a vector space. Its elements are called vectors, even when they are polynomials or functions. Everything proved from the rules alone then holds in every vector space at once.

The definition

A vector space is a non-empty set \(V\) of objects, called vectors, with an addition and a multiplication by real scalars, such that for all \(\mathbf{u}, \mathbf{v}, \mathbf{w}\) in \(V\) and all scalars \(c, d\): 1. \(\mathbf{u} + \mathbf{v}\) is in \(V\). 2. \(\mathbf{u} + \mathbf{v} = \mathbf{v} + \mathbf{u}\). 3. \((\mathbf{u} + \mathbf{v}) + \mathbf{w} = \mathbf{u} + (\mathbf{v} + \mathbf{w})\). 4. There is a zero vector \(\mathbf{0}\) with \(\mathbf{u} + \mathbf{0} = \mathbf{u}\). 5. Each \(\mathbf{u}\) has a negative \(-\mathbf{u}\) with \(\mathbf{u} + (-\mathbf{u}) = \mathbf{0}\). 6. \(c\mathbf{u}\) is in \(V\). 7. \(c(\mathbf{u} + \mathbf{v}) = c\mathbf{u} + c\mathbf{v}\). 8. \((c + d)\mathbf{u} = c\mathbf{u} + d\mathbf{u}\). 9. \(c(d\mathbf{u}) = (cd)\mathbf{u}\). 10. \(1\mathbf{u} = \mathbf{u}\).

A gallery of vector spaces

\(\mathbb{R}^n\) is the model example. \(\mathbb{P}_n\), the polynomials of degree at most n, is a vector space: add coefficients term by term, and the zero vector is the zero polynomial. The set of all m x n matrices, \(M_{m \times n}\), is one, with entry-wise addition. The real-valued functions on a set, added and scaled point by point, form one, with the zero function as \(\mathbf{0}\). So does \(\mathbb{S}\), the space of signals: doubly infinite sequences \((\ldots, y_{-1}, y_0, y_1, y_2, \ldots)\) such as sampled sound, added term by term. The topic "Difference equations" works inside \(\mathbb{S}\).

Facts that follow from the rules

A few familiar facts are not on the list but follow from it, so they hold in every vector space. The zero vector is unique, and each vector has exactly one negative. For every \(\mathbf{u}\) and every scalar \(c\),

0\mathbf{u} = \mathbf{0}, \qquad c\mathbf{0} = \mathbf{0}, \qquad -\mathbf{u} = (-1)\mathbf{u}

To see the first, write \(0\mathbf{u} = (0 + 0)\mathbf{u} = 0\mathbf{u} + 0\mathbf{u}\) by rule 8, then add \(-0\mathbf{u}\) to both sides. Note the two different zeros: the scalar 0 on the left and the zero vector on the right.

Subspaces

A subspace of \(V\) is a subset \(H\) with three properties: 1. The zero vector of \(V\) is in \(H\). 2. \(H\) is closed under addition: if \(\mathbf{u}\) and \(\mathbf{v}\) are in \(H\), so is \(\mathbf{u} + \mathbf{v}\). 3. \(H\) is closed under scalar multiplication: if \(\mathbf{u}\) is in \(H\), so is \(c\mathbf{u}\) for every scalar \(c\). These three checks are enough, because the other rules hold automatically for vectors already inside \(V\), and \(-\mathbf{u} = (-1)\mathbf{u}\) lies in \(H\) by property 3. So every subspace is itself a vector space. Every vector space has two extreme subspaces: \(V\) itself and the zero subspace \(\{\mathbf{0}\}\).

Worked example: a subspace of polynomials

Let \(H\) be the set of polynomials \(p\) in \(\mathbb{P}_2\) with \(p(1) = 0\), such as \(t - 1\) and \(t^2 - 3t + 2\). Is \(H\) a subspace of \(\mathbb{P}_2\)? 1. Zero: the zero polynomial gives 0 at every input, including \(t = 1\), so it is in \(H\). 2. Addition: if \(p(1) = 0\) and \(q(1) = 0\), then \((p + q)(1) = p(1) + q(1) = 0\), so \(p + q\) is in \(H\). 3. Scaling: \((cp)(1) = c \cdot p(1) = c \cdot 0 = 0\), so \(cp\) is in \(H\). All three hold, so \(H\) is a subspace. Changing the condition to \(p(1) = 5\) would break it at step 1.

Worked example: two sets that fail

1. The line \(y = 2x + 1\) in \(\mathbb{R}^2\): setting \(x = 0\) gives \(y = 1\), so (0, 0) is not on it. It fails the zero test and is not a subspace. 2. The first quadrant, the vectors \((x, y)\) with \(x \ge 0\) and \(y \ge 0\): it contains (0, 0) and is closed under addition, but \((-1)(1, 2) = (-1, -2)\) lies outside it. It fails closure under scaling. 3. The lesson: to prove a set is a subspace, check all three properties in general; to show it is not, one specific counterexample is enough.

Spans are subspaces

If \(\mathbf{v}_1, \ldots, \mathbf{v}_p\) are in \(V\), then \(\operatorname{Span}\{\mathbf{v}_1, \ldots, \mathbf{v}_p\}\) is a subspace of \(V\). It contains \(\mathbf{0} = 0\mathbf{v}_1 + \cdots + 0\mathbf{v}_p\), and adding or scaling combinations of the \(\mathbf{v}_i\) gives more combinations of them. This is often the quickest proof. Take \(H\), the set of all vectors \((a - 2b, \; b, \; 3a + b)\) for real \(a\) and \(b\). Each one equals \(a(1, 0, 3) + b(-2, 1, 1)\), so \(H = \operatorname{Span}\{(1, 0, 3), (-2, 1, 1)\}\), a plane through the origin in \(\mathbb{R}^3\), and therefore a subspace.

Subspaces you can picture

In \(\mathbb{R}^3\) the subspaces are exactly: the origin alone, lines through the origin, planes through the origin, and \(\mathbb{R}^3\) itself. Lines and planes that miss the origin are not subspaces. In \(\mathbb{R}^2\) the list is the origin, lines through the origin, and \(\mathbb{R}^2\). Be careful with a tempting example: \(\mathbb{R}^2\) is not a subspace of \(\mathbb{R}^3\), because its vectors have two entries, not three. The plane of vectors \((x, y, 0)\) is a subspace of \(\mathbb{R}^3\) that looks and behaves like \(\mathbb{R}^2\).

Common mistakes to avoid

The quickest test is the zero vector, but passing it proves nothing on its own: the first quadrant contains (0, 0) and still fails. Check closure under scaling with negative scalars, where many sets break. A union of two subspaces is usually not a subspace: the x-axis and y-axis together contain (1, 0) and (0, 1) but not their sum (1, 1). Remember that \(\mathbf{0}\) means the zero element of the space in question: the zero polynomial, the zero matrix or the zero function. And an example that works for one choice of numbers is not a proof of closure.

Key takeaways

A vector space is a set with addition and scalar multiplication obeying ten rules; examples include \(\mathbb{R}^n\), \(\mathbb{P}_n\), \(M_{m \times n}\), function spaces and the signal space \(\mathbb{S}\). The rules imply \(0\mathbf{u} = \mathbf{0}\), \(c\mathbf{0} = \mathbf{0}\) and \(-\mathbf{u} = (-1)\mathbf{u}\). A subspace contains \(\mathbf{0}\) and is closed under addition and scaling, so it is a vector space itself. Every span is a subspace, which is the fastest way to prove that a set given by parameters is one. One counterexample shows a set is not a subspace.

Flashcards

Flashcard

Vector space

A set with addition and scaling obeying the ten rules

Its elements are called vectors.

Test your understanding

Question 1 of 5

Which of these subsets of R² is a subspace?

Question 2 of 5

Why is the set of invertible 2 x 2 matrices not a subspace of M₂ₓ₂?

Question 3 of 5

Is H = { p in P₃ : p(0) = 2 } a subspace of P₃?

Question 4 of 5

H is the set of all vectors (a + b, a, b - 2a) for real a and b. What is the quickest correct reason that H is a subspace of R³?

Question 5 of 5

In any vector space, what is 0u, where 0 is the scalar zero?

← Previous topicNext topic →