← MATH 231 MathScape 0 MATH231

Vector Spaces and Subspaces

11 min read

Before A subspace generalizes a span, and the main examples come from the matrix equation and from independence. Builds on: Linear Independence · The Matrix Equation Ax = b

Next The null space and the column space are the 2 subspaces that every matrix carries. Leads to: Null Space, Column Space, and Basis

Jump to a section
Reference: Lay, Linear Algebra and Its Applications, Section 4.1: Vector Spaces and Subspaces

Video: Dr Lynch’s MATH 231 lectures (YouTube playlists)

Before You Start: Prerequisite Check

Can you do these? (Click to reveal self-test)

Test yourself on these prerequisite skills:

  1. Linear combinations: What does it mean for a set of vectors to span a subspace?

    Check

    The span of a set of vectors is the set of all possible linear combinations. The span is always a subspace (it contains $\mathbf{0}$ and is closed under addition and scalar multiplication).

  2. Null space: Why is the null space $\text{Nul}(A)$ always a subspace of $\mathbb{R}^n$?

    Check

    $\mathbf{0} \in \text{Nul}(A)$ (trivial solution always works); if $A\mathbf{u} = \mathbf{0}$ and $A\mathbf{v} = \mathbf{0}$, then $A(\mathbf{u}+\mathbf{v}) = \mathbf{0}$ and $A(c\mathbf{u}) = \mathbf{0}$. Both closure conditions hold.

  3. Closure intuition: If $H$ consists of all vectors in $\mathbb{R}^2$ with non-negative entries, is $H$ closed under scalar multiplication? Why or why not?

    Check

    No. Take $\mathbf{u} = \begin{pmatrix}1\\1\end{pmatrix} \in H$ and $c = -1$. Then $c\mathbf{u} = \begin{pmatrix}-1\\-1\end{pmatrix}$ has negative entries and is not in $H$.

If you struggled: Review Linear Independence and The Matrix Equation Ax = b.


Try This First

Consider these two subsets of $\mathbb{R}^2$:

\[ H = \{(x_1, x_2) : x_1 + x_2 = 0\} \quad \text{and} \quad K = \{(x_1, x_2) : x_1 + x_2 = 1\} \]

For each, check whether the zero vector belongs to the set. What does your finding suggest about whether each set could be a subspace?

Show Solution

For $H$: $(0, 0)$ satisfies $0 + 0 = 0$. The zero vector IS in $H$.

For $K$: $(0, 0)$ satisfies $0 + 0 = 0 \neq 1$. The zero vector is NOT in $K$.

Since every subspace must contain the zero vector, $K$ cannot be a subspace.

Is $H$ actually a subspace? Check closure:

  • If $\mathbf{u} = (u_1, u_2)$ and $\mathbf{v} = (v_1, v_2)$ are both in $H$, then $(u_1+u_2) = 0$ and $(v_1+v_2) = 0$, so $(u_1+v_1) + (u_2+v_2) = 0$. Closed under addition.
  • $c(u_1+u_2) = 0$ implies $cu_1 + cu_2 = 0$. Closed under scalar multiplication.

$H$ is a subspace: it is the line $x_2 = -x_1$ through the origin in $\mathbb{R}^2$.

The key lesson: the zero vector must belong to every subspace. This alone rules out $K$. But containing $\mathbf{0}$ is only a necessary condition, not sufficient: you must also verify both closure conditions.


The Abstraction: Beyond $\mathbb{R}^n$

In earlier sections, every vector was a column of real numbers. The vector-space axioms capture the essential properties of that setting and apply them to other objects: matrices, polynomials, functions. Any collection satisfying the axioms inherits the full theory of linear algebra.

The practical payoff: once you know a set is a vector space, you can immediately talk about its basis, dimension, and coordinate systems without doing extra work. The theory transfers wholesale.


Prerequisite Map

This skillVector Spaces and Subspaces

Quick Reference

Property Value
Course MATH 231
Difficulty Intermediate
Time ~30 minutes
Source Lay, Linear Algebra and Its Applications, Section 4.1

The Three-Condition Subspace Test

A subset $H$ of a vector space $V$ is a subspace of $V$ if and only if:

Condition What to verify
1. Zero vector $\mathbf{0} \in H$
2. Closed under addition $\mathbf{u}, \mathbf{v} \in H \implies \mathbf{u}+\mathbf{v} \in H$
3. Closed under scalar mult. $\mathbf{u} \in H, c \in \mathbb{R} \implies c\mathbf{u} \in H$

All three must hold. Failing any one means $H$ is not a subspace.


Key Concepts

Vector Space Axioms

A vector space is a set $V$ with two operations, addition and scalar multiplication, satisfying ten properties for all $\mathbf{u}, \mathbf{v}, \mathbf{w} \in V$ and scalars $c, d$:

# Axiom
1 $\mathbf{u}+\mathbf{v} \in V$ (closed under addition)
2 $\mathbf{u}+\mathbf{v} = \mathbf{v}+\mathbf{u}$
3 $(\mathbf{u}+\mathbf{v})+\mathbf{w} = \mathbf{u}+(\mathbf{v}+\mathbf{w})$
4 A zero vector $\mathbf{0}$ with $\mathbf{u}+\mathbf{0} = \mathbf{u}$ exists in $V$
5 For each $\mathbf{u}$, a vector $-\mathbf{u}$ with $\mathbf{u}+(-\mathbf{u}) = \mathbf{0}$ exists in $V$
6 $c\mathbf{u} \in V$ (closed under scalar multiplication)
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}$

Standard examples of vector spaces:

Space Elements Addition Scalar mult.
$\mathbb{R}^n$ Column vectors Entrywise Entrywise
$\mathbb{R}^{m \times n}$ $m \times n$ matrices Entrywise Entrywise
$\mathbb{P}_n$ Polynomials degree $\leq n$ Add coefficients Multiply coefficients
$C[a,b]$ Continuous functions on $[a,b]$ Pointwise Pointwise

Source: Lay, Linear Algebra and Its Applications, Section 4.1: Vector Spaces and Subspaces.

The Subspace Test

When working inside $\mathbb{R}^n$ (or any known vector space), you do not need to verify all ten axioms for a subset $H$ to be a subspace. Axioms 2, 3, 7, 8, 9, 10 are inherited automatically if the subset is closed under the operations. Only three conditions need direct verification:

  1. $\mathbf{0} \in H$
  2. $\mathbf{u}+\mathbf{v} \in H$ for all $\mathbf{u}, \mathbf{v} \in H$
  3. $c\mathbf{u} \in H$ for all $\mathbf{u} \in H$, $c \in \mathbb{R}$

Practical shortcut: If you can show $H = \text{Span}\{\mathbf{v}_1, \ldots, \mathbf{v}_p\}$ for some vectors $\mathbf{v}_i$, then $H$ is automatically a subspace (spans are always subspaces).

Source: Lay, Linear Algebra and Its Applications, Section 4.1: Vector Spaces and Subspaces.

Key Examples

Subspaces of $\mathbb{R}^2$: the only subspaces are $\{\mathbf{0}\}$, any line through the origin, and all of $\mathbb{R}^2$.

Subspaces of $\mathbb{R}^3$: $\{\mathbf{0}\}$, any line through the origin, any plane through the origin, and all of $\mathbb{R}^3$.

Important: a line or plane that does NOT pass through the origin is NOT a subspace (fails the zero vector condition).

The null space and column space of any matrix $A$ are always subspaces:

Worked Example: Testing a Subset

Is $H = \{(x_1, x_2, x_3) \in \mathbb{R}^3 : x_1 = 2x_2\}$ a subspace of $\mathbb{R}^3$?

Condition 1: Does $\mathbf{0} = (0,0,0)$ satisfy $0 = 2(0)$? Yes. $\mathbf{0} \in H$.

Condition 2: Let $\mathbf{u} = (2a, a, s)$ and $\mathbf{v} = (2b, b, t)$ be in $H$. Then: $\mathbf{u} + \mathbf{v} = (2a+2b, a+b, s+t)$. Check: $2a+2b = 2(a+b)$. Yes. $\mathbf{u}+\mathbf{v} \in H$.

Condition 3: $c\mathbf{u} = (2ca, ca, cs)$. Check: $2ca = 2(ca)$. Yes. $c\mathbf{u} \in H$.

Conclusion: $H$ is a subspace of $\mathbb{R}^3$. Geometrically, $H$ is the plane $x_1 = 2x_2$ through the origin.


Common Pitfalls

Mistake Why It Is Wrong Correct Approach
Concluding $H$ is a subspace because $\mathbf{0} \in H$ Containing $\mathbf{0}$ is necessary but not sufficient; closure is also required After checking the zero vector, verify both closure conditions
Assuming every “natural” subset of a vector space is a subspace Only subsets with the right closure structure qualify; a circle, a parabola, or a line not through the origin all fail Always apply the three-condition test
Thinking vector spaces are only $\mathbb{R}^n$ Polynomials, matrices, and functions also form vector spaces Recognize the common examples from Lay Section 4.1
Forgetting to show the zero vector is the specific zero of the ambient space The zero in $H$ must be the same zero as in $V$ In $\mathbb{R}^n$: the zero vector is $(0, 0, \ldots, 0)$; in matrix spaces it is the zero matrix
A Subset That Passes Two Tests but Fails the Third

Let $H = \{(x_1, x_2) \in \mathbb{R}^2 : x_2 = x_1^2\}$ (the parabola $y = x^2$).

Condition 1: $(0, 0)$: $0 = 0^2$. Zero vector is in $H$. Pass.

Condition 3 (scalar multiplication): If $(x_1, x_1^2) \in H$, then $c(x_1, x_1^2) = (cx_1, cx_1^2)$. Is $cx_1^2 = (cx_1)^2 = c^2x_1^2$? Only if $c = 0$ or $c = 1$. Fails for $c = 2$: $2(1)^2 = 2$ but $(2\cdot 1)^2 = 4 \neq 2$.

So $H$ is not a subspace. A parabola is not a subspace, despite passing through the origin.


Practice Problems

Level 1 Apply the Three-Condition Test

For each set, determine whether it is a subspace of $\mathbb{R}^3$. Apply all three conditions.

(a) $H = \{(x_1, x_2, x_3) : x_1 + 2x_2 - 3x_3 = 0\}$

(b) $K = \{(x_1, x_2, x_3) : x_1 + 2x_2 - 3x_3 = 5\}$

Thought Process

For (a): check each condition. Note that the condition is homogeneous (equals 0). What does that say about the zero vector?

For (b): the condition is nonhomogeneous (equals 5). Can the zero vector satisfy it?

Show Answer

(a) $H$ is the solution set of a homogeneous equation.

  • Zero vector: $0+2(0)-3(0) = 0$. In $H$.
  • Closure under +: If $\mathbf{u}$ and $\mathbf{v}$ satisfy $x_1+2x_2-3x_3=0$, then $(u_1+v_1)+2(u_2+v_2)-3(u_3+v_3) = (u_1+2u_2-3u_3)+(v_1+2v_2-3v_3) = 0+0=0$. In $H$.
  • Closure under scalar mult.: $c(u_1+2u_2-3u_3) = 0$. In $H$.

$H$ is a subspace (a plane through the origin).

(b) $K$: zero vector: $0+0-0=0 \neq 5$. Not in $K$. Therefore $K$ is not a subspace.

Level 2 Prove the Null Space Is a Subspace

Let $A$ be an $m \times n$ matrix. Prove that $\text{Nul}(A) = \{\mathbf{x} \in \mathbb{R}^n : A\mathbf{x} = \mathbf{0}\}$ is a subspace of $\mathbb{R}^n$.

Thought Process

Check all three conditions. For each, use the defining property $A\mathbf{x} = \mathbf{0}$ and the linearity of matrix multiplication.

Show Answer

Condition 1: $A\mathbf{0} = \mathbf{0}$. So $\mathbf{0} \in \text{Nul}(A)$.

Condition 2: Suppose $\mathbf{u}, \mathbf{v} \in \text{Nul}(A)$, so $A\mathbf{u} = \mathbf{0}$ and $A\mathbf{v} = \mathbf{0}$. Then: \[ A(\mathbf{u}+\mathbf{v}) = A\mathbf{u} + A\mathbf{v} = \mathbf{0}+\mathbf{0} = \mathbf{0} \] So $\mathbf{u}+\mathbf{v} \in \text{Nul}(A)$.

Condition 3: Suppose $\mathbf{u} \in \text{Nul}(A)$ and $c \in \mathbb{R}$. Then: \[ A(c\mathbf{u}) = c(A\mathbf{u}) = c\mathbf{0} = \mathbf{0} \] So $c\mathbf{u} \in \text{Nul}(A)$.

All three conditions hold. $\text{Nul}(A)$ is a subspace of $\mathbb{R}^n$.

Level 3 Non-Subspace with a Specific Counterexample

Determine whether $H = \{(x_1, x_2) \in \mathbb{R}^2 : x_1 x_2 = 0\}$ is a subspace of $\mathbb{R}^2$.

If $H$ is not a subspace, give a specific counterexample to one of the three conditions. State which condition fails.

Thought Process

$H$ is the set of points where at least one coordinate is zero: the two coordinate axes together.

Check the zero vector. Then check closure under addition by trying specific vectors in $H$.

Show Answer

$H$ is the union of the two coordinate axes: $\{(x_1, 0)\} \cup \{(0, x_2)\}$.

Condition 1: $(0, 0) \in H$ since $0 \cdot 0 = 0$. Pass.

Condition 2 fails: Take $\mathbf{u} = (1, 0) \in H$ (since $1 \cdot 0 = 0$) and $\mathbf{v} = (0, 1) \in H$ (since $0 \cdot 1 = 0$). Their sum is $(1, 1)$: check $1 \cdot 1 = 1 \neq 0$. So $(1,1) \notin H$.

Conclusion: $H$ is not a subspace of $\mathbb{R}^2$. The union of two subspaces is generally not a subspace (unless one contains the other).

Level 4 Verify a Vector Space Outside $\mathbb{R}^n$

Let $\mathbb{P}_2$ be the set of all polynomials of degree at most 2, with the usual polynomial addition and scalar multiplication.

(a) What is the zero vector in $\mathbb{P}_2$?

(b) Verify axioms 1, 2, 4, 6, and 10 for $\mathbb{P}_2$ using general elements $p(t) = a_0 + a_1 t + a_2 t^2$ and $q(t) = b_0 + b_1 t + b_2 t^2$.

(c) Is $H = \{p \in \mathbb{P}_2 : p(0) = 0\}$ a subspace of $\mathbb{P}_2$?

Thought Process

For (a): the zero polynomial outputs 0 for every input $t$.

For (b): compute $p+q$ and $cp$ using coefficient arithmetic and check they satisfy the stated axioms.

For (c): evaluate the three subspace conditions using the constraint $p(0) = 0$.

Show Answer

(a) The zero vector in $\mathbb{P}_2$ is the zero polynomial $z(t) = 0$ (all coefficients zero).

(b)

  • Axiom 1 (closure under +): $p(t)+q(t) = (a_0+b_0)+(a_1+b_1)t+(a_2+b_2)t^2 \in \mathbb{P}_2$. Degree at most 2.
  • Axiom 2 (commutativity): $p+q$ and $q+p$ have the same coefficients (real number addition commutes). Equal.
  • Axiom 4 (zero): $p(t) + 0 = p(t)$. The zero polynomial plays the role of $\mathbf{0}$.
  • Axiom 6 (closure under scalar mult.): $cp(t) = ca_0 + ca_1 t + ca_2 t^2 \in \mathbb{P}_2$. Degree at most 2.
  • Axiom 10: $1 \cdot p(t) = p(t)$. Satisfied.

(c) The constraint $p(0) = 0$ means $a_0 = 0$, so $H = \{a_1 t + a_2 t^2 : a_1, a_2 \in \mathbb{R}\}$.

  • Zero polynomial: $p(0) = 0$ (the zero polynomial satisfies every evaluation constraint). In $H$.
  • Closure under +: if $p(0)=0$ and $q(0)=0$, then $(p+q)(0) = p(0)+q(0) = 0$. In $H$.
  • Closure under scalar mult.: $(cp)(0) = cp(0) = 0$. In $H$.

$H$ is a subspace of $\mathbb{P}_2$. It is the set of polynomials with no constant term.

Level 5 Subspaces and Linear Maps

Let $T: V \to W$ be a linear transformation between vector spaces.

(a) Let $\ker(T) = \{\mathbf{v} \in V : T(\mathbf{v}) = \mathbf{0}\}$ (the kernel of $T$). Prove that $\ker(T)$ is a subspace of $V$.

(b) Let $\text{range}(T) = \{T(\mathbf{v}) : \mathbf{v} \in V\}$ (the range of $T$). Prove that $\text{range}(T)$ is a subspace of $W$.

(c) How do $\ker(T)$ and $\text{range}(T)$ correspond to $\text{Nul}(A)$ and $\text{Col}(A)$ when $T(\mathbf{x}) = A\mathbf{x}$?

Thought Process

For (a): check the three subspace conditions using linearity of $T$; the proofs mirror the Nul$(A)$ proof from Level 2.

For (b): show $\mathbf{0}_W \in \text{range}(T)$, then show closure using linearity.

For (c): match definitions.

Show Answer

(a) $\ker(T)$ is a subspace of $V$.

  • Zero vector: $T(\mathbf{0}_V) = \mathbf{0}_W$ (linearity: $T(\mathbf{0}) = T(0 \cdot \mathbf{v}) = 0 T(\mathbf{v}) = \mathbf{0}_W$). So $\mathbf{0}_V \in \ker(T)$.
  • Closure under +: if $T(\mathbf{u}) = \mathbf{0}_W$ and $T(\mathbf{v}) = \mathbf{0}_W$, then $T(\mathbf{u}+\mathbf{v}) = T(\mathbf{u})+T(\mathbf{v}) = \mathbf{0}_W+\mathbf{0}_W = \mathbf{0}_W$.
  • Closure under scalar mult.: $T(c\mathbf{u}) = cT(\mathbf{u}) = c\mathbf{0}_W = \mathbf{0}_W$.

(b) $\text{range}(T)$ is a subspace of $W$.

  • Zero vector: $T(\mathbf{0}_V) = \mathbf{0}_W \in \text{range}(T)$.
  • Closure under +: if $\mathbf{w}_1 = T(\mathbf{u})$ and $\mathbf{w}_2 = T(\mathbf{v})$, then $\mathbf{w}_1+\mathbf{w}_2 = T(\mathbf{u})+T(\mathbf{v}) = T(\mathbf{u}+\mathbf{v}) \in \text{range}(T)$.
  • Closure under scalar mult.: $c\mathbf{w}_1 = cT(\mathbf{u}) = T(c\mathbf{u}) \in \text{range}(T)$.

(c) When $T(\mathbf{x}) = A\mathbf{x}$:

  • $\ker(T) = \text{Nul}(A)$: both are the set of all $\mathbf{x}$ mapping to the zero vector.
  • $\text{range}(T) = \text{Col}(A)$: both are the set of all vectors $A\mathbf{x}$ that $T$ can produce, which equals the span of the columns of $A$.

Common Misconceptions

Common misconception

a subset is a subspace if it contains the zero vector. Containing $\mathbf{0}$ is a necessary condition, not a sufficient one. The union of the two coordinate axes in $\mathbb{R}^2$ contains $(0,0)$ but is not a subspace (adding $(1,0)$ and $(0,1)$ gives $(1,1)$, which leaves the set). Both closure conditions must be verified independently.

Common misconception

any “natural” subset of vectors is a subspace. The set of all vectors in $\mathbb{R}^2$ with non-negative entries is not a subspace (fails closure under scalar multiplication by $-1$). The set of vectors with rational entries is not a subspace of $\mathbb{R}^n$ over $\mathbb{R}$ (fails closure under irrational scalars). The defining structure matters.

Common misconception

only $\mathbb{R}^n$ is a vector space. Polynomials, matrices, continuous functions, and many other mathematical objects satisfy the vector-space axioms. The theory of linear algebra applies to all of them, which is why the abstract definition is worth learning.


Mastery Checklist

Novice (Level 1-2):

Competent (Level 3-4):

Proficient (Level 5):


Mental Model

Closed Rooms

A subspace is a room within a larger building that is self-contained under the building’s operations. If you start with any two vectors in the room and add them, the result stays in the room. If you scale any vector in the room by any real number, the result stays in the room. The zero vector must be in the room (otherwise, scaling any vector by $0$ would leave the room).

This self-containment is exactly what “closed under addition and scalar multiplication” means. A set that leaks, where some combination of its vectors escapes the set, is not a subspace.

The beautiful fact is that the three conditions are sufficient: you do not need to check all ten vector-space axioms. The other seven are inherited from the ambient vector space. A well-sealed room inside a well-built building is itself a well-built room.


Connections

Looking ahead in MATH 231:

Real-world connections:

Source: Lay, Linear Algebra and Its Applications, Section 4.1: Vector Spaces and Subspaces.



Last updated: 2026-06-16

Watch and Read