Chapter 8 — Subspaces of $\mathbb R^n$

A subspace is a set of vectors that behaves like a vector space inside $\mathbb R^n$: it contains zero and is closed under addition and scalar multiplication.

subspace testcolumn spacenullspacerank-nullity
8.1

Subspace test

A subset $W\subseteq\mathbb R^n$ is a subspace if: $0\in W$, $u+v\in W$ whenever $u,v\in W$, and $cu\in W$ whenever $u\in W$ and $c\in\mathbb R$.

Interactive: classify common sets

8.2

Examples and non-examples

Always subspaces

  • $\{0\}$
  • $\mathbb R^n$
  • spans of vectors
  • solution sets of $Ax=0$
  • column spaces, nullspaces, row spaces

Usually not subspaces

  • lines not through the origin
  • planes not through the origin
  • solution sets of $Ax=b$ with $b\ne0$
  • curved sets such as circles or spheres
8.3

Column space and nullspace calculator

The column space is the span of the columns. The nullspace is the solution set of $Ax=0$.

Interactive: compute rank, pivot columns, and nullspace

8.4

Rank-nullity theorem

$$\operatorname{rank}(A)+\operatorname{nullity}(A)=n,$$

where $n$ is the number of columns of $A$.

Interactive: rank-nullity from dimensions

8.5

Geometry of subspaces in $\mathbb R^2$

A line through the origin is closed under addition and scalar multiplication. A shifted line is not: it fails the zero-vector test.

Interactive: line $y=mx+c$

8.6

Chapter summary

  • A subspace contains zero and is closed under addition and scalar multiplication.
  • Every span is a subspace.
  • $\operatorname{Null}(A)$ is the solution set of $Ax=0$.
  • $\operatorname{Col}(A)$ is the span of the columns of $A$.
  • $\operatorname{rank}(A)+\operatorname{nullity}(A)=n$.
8.7

Quick checks

Why is $y=2x+1$ not a subspace of $\mathbb R^2$?

It does not contain the zero vector.

Why is every span a subspace?

A span contains all linear combinations of its generators, so it is closed under addition and scalar multiplication and contains zero.

What is the nullity of a $4\times 7$ matrix with rank $3$?

$7-3=4$.