Everything we have done with vectors in $\mathbb{R}^n$ used only a few rules: you can add, you can scale, and the usual algebra holds. Many other objects follow the same rules, so the same ideas apply to them. With the tools of short proofs and span, we can now say this precisely.
A vector space is a set $V$ with an addition and a scalar multiplication such that sums and multiples stay in $V$ and the familiar rules hold: $\mathbf{u} + \mathbf{v} = \mathbf{v} + \mathbf{u}$, $(\mathbf{u} + \mathbf{v}) + \mathbf{w} = \mathbf{u} + (\mathbf{v} + \mathbf{w})$, there is a zero vector with $\mathbf{u} + \mathbf{0} = \mathbf{u}$, each $\mathbf{u}$ has a negative, $c(\mathbf{u} + \mathbf{v}) = c\mathbf{u} + c\mathbf{v}$, $(c + d)\mathbf{u} = c\mathbf{u} + d\mathbf{u}$, $c(d\mathbf{u}) = (cd)\mathbf{u}$ and $1\mathbf{u} = \mathbf{u}$. Examples: $\mathbb{R}^n$; the polynomials $\mathbb{P}_n$ of degree at most $n$; all $m \times n$ matrices; all functions on an interval.
A subspace $H$ of $V$ is a subset that is a vector space on its own, using the same operations. Most of the rules are inherited, so only three things need checking:
- (1) $\mathbf{0}$ is in $H$;
- (2) $H$ is closed under addition: if $\mathbf{u}, \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 $c$.
Key idea
Why it works
Worked example: A plane through the origin
- (1) $0 - 2(0) + 0 = 0$, so $\mathbf{0}$ is in $H$.
- (2) If $\mathbf{u}$ and $\mathbf{v}$ are in $H$, then $(u_1 + v_1) - 2(u_2 + v_2) + (u_3 + v_3)$ $= (u_1 - 2u_2 + u_3) + (v_1 - 2v_2 + v_3)$ $= 0 + 0$ $= 0$.
- (3) $cu_1 - 2(cu_2) + cu_3$ $= c(u_1 - 2u_2 + u_3)$ $= c \cdot 0$ $= 0$.
- All three hold. (Or: $H$ is the null space of $[\,1\ \ -2\ \ 1\,]$, as the next topic will show.)
Answer: Yes, a subspace.
Worked example: Two that fail
- (a) Contains $\mathbf{0}$ and is closed under addition, but $(1, 0)$ is in it while $-1\cdot(1, 0) = (-1, 0)$ is not. Fails (3).
- (b) Contains $(0, 0)$. But $(1, 1)$ is in it and $(1, 1) + (1, 1) = (2, 2)$ is not, since $2 \neq 2^{2}$. Fails (2).
Answer: Neither is a subspace.
Worked example: Polynomials
- The zero polynomial has value $0$ at $2$.
- If $p(2) = 0$ and $q(2) = 0$, then $(p + q)(2) = 0 + 0 = 0$ and $(cp)(2) = c \cdot 0 = 0$.
Answer: Yes.
Common mistake