Vector Spaces: Going Abstract
Everything we did in ℝⁿ works verbatim for matrices, polynomials, and functions — because it was never really about the arrows
§1Why Go Abstract?
In lecture, your instructor moved straight from subspaces of $\mathbb{R}^n$ (Lecture 14) to independence, basis, and dimension (Lecture 15) without ever writing down the general definition of a "vector space." That was not an oversight — it was a deliberate choice. $\mathbb{R}^n$ is already a vector space, and every idea in those two lectures can be built with plain coordinates, with nothing lost.
Here is the punchline before the details: every theorem you proved for $\mathbb{R}^n$ — "a span is always a subspace," "an independent set has no redundancy," "dimension is a well-defined number" — was never really about arrows with coordinates. It was about the rules those arrows obey: you can add them, you can scale them, and a short list of algebra laws holds. Any set with those rules is a vector space, and every proof from Lectures 14–15 carries over word for word.
§2The Definition of a Vector Space
Keep this as a checklist, not something to memorise line by line — you will almost never write out all eight rules by hand.
A vector space is a nonempty set $V$ together with a rule for addition and a rule for scalar multiplication (by real numbers), such that for all $\mathbf{x}, \mathbf{y}, \mathbf{z}$ in $V$ and all scalars $a, b$, the following eight rules hold:
§3Examples of Vector Spaces
For each example, ask three questions, in order:
- 1What is the space? — what are its elements: numbers, matrices, polynomials?
- 2What do addition and scalar multiplication mean here?
- 3Is it closed?
We will not write out all eight axioms each time — just the closure check, as the callout above promised.
1. $M_{mn}$ — all $m \times n$ matrices
The space $M_{mn}$ is the set of all $m \times n$ matrices with real entries. Its "vectors" are entire matrices. Addition is the usual entrywise matrix addition; scalar multiplication is the usual entrywise scaling — both from Lecture 5.
If $A$ and $B$ are both $m\times n$, then $A+B$ is computed entrywise and is again $m\times n$ — closed under addition. If $A$ is $m\times n$ and $c$ is a scalar, $cA$ is again $m\times n$ — closed under scalar multiplication. Since matrix addition and scaling are just real-number addition and multiplication applied entry by entry, A1–A4 and A6–A8 hold automatically (they are just the real-number rules, copied into every entry). So $M_{mn}$ is a vector space, with zero vector the $m\times n$ zero matrix.
2. $P$ — all polynomials
The space $P$ is the set of all polynomials $a_0 + a_1x + a_2x^2 + \cdots + a_nx^n$ (any finite degree $n \geq 0$, any real coefficients $a_i$). Addition adds like-degree coefficients; scalar multiplication scales every coefficient — the "foregoing" addition and scalar multiplication the textbook refers to.
If $p$ and $q$ are polynomials, $p+q$ (add coefficient by coefficient) is again a polynomial — closed under addition. If $c$ is a scalar, $cp$ (scale every coefficient) is again a polynomial — closed under scalar multiplication. As with matrices, the remaining axioms are inherited from real-number arithmetic on the coefficients. So $P$ is a vector space, with zero vector the zero polynomial.
3. $P_n$ — polynomials of degree at most $n$
Given $n \geq 1$, $P_n$ is the set of all polynomials of degree at most $n$, together with the zero polynomial: $\{a_0+a_1x+\cdots+a_nx^n : a_i \text{ in } \mathbb{R}\}$.
If $p, q$ each have degree $\leq n$, then $p+q$ also has degree $\leq n$ — adding polynomials never raises degree, terms can only cancel or combine. Closed under addition. If $c$ is a scalar, $cp$ has degree $\leq n$ too (or becomes the zero polynomial if $c=0$) — closed under scalar multiplication. So $P_n$ is a vector space. (You will soon see it is also a subspace of $P$ — more on that idea in a moment.)
§4Try It Yourself: Functions on an Interval
One more example, worth sitting with before we move on — here the "vectors" are not lists of numbers or polynomials, but entire functions.
Fix an interval $[a,b]$ of real numbers. Let $F[a,b]$ be the set of all real-valued functions $f : [a,b] \to \mathbb{R}$ — no continuity or smoothness required, just any rule assigning a number to each $x$ in $[a,b]$. Define addition and scalar multiplication pointwise:
$$(f+g)(x) = f(x) + g(x), \qquad (cf)(x) = c\cdot f(x), \qquad \text{for every } x \text{ in } [a,b].$$
In words: to add two functions, add their output values at every single point $x$. To scale a function by $c$, multiply every output value by $c$. Each single element of $F[a,b]$ is an entire graph, not a number.
Show that $F[a,b]$ is a vector space.
§5Recall — And What Changes Now
Lectures 14 and 15 built subspaces, spanning, linear combinations, independence, basis, and dimension — entirely inside $\mathbb{R}^n$. Every definition and every theorem from those lectures carries over to any vector space $V$, word for word, with "vector in $\mathbb{R}^n$" replaced by "vector in $V$." We will not re-derive the theorems — we already have them — we will just point the same machinery at new kinds of vectors.
- •Subspace axioms S1/S2/S3 → the exact same three rules, now for a subset $U$ of a vector space $V$.
- •Linear combination and span → the exact same formula $a_1\mathbf{v}_1+\cdots+a_k\mathbf{v}_k$, now with the $\mathbf{v}_i$ possibly matrices or polynomials.
- •Independent / dependent → the exact same "only the trivial combination vanishes" test.
- •Basis, dimension → the exact same "independent and spanning" and "size of any basis."
Nothing new to memorise — just new vectors to plug in.
§6§6.2 — Subspaces of a Vector Space
A subset $U$ of a vector space $V$ is called a subspace of $V$ if $U$ is itself a vector space, using the same addition and scalar multiplication as $V$. In practice, you check three things:
Compare this with §5.1 of Lecture 14 — it is identical, with "$\mathbb{R}^n$" replaced by "$V$." Every subspace check you already know how to do (verify $\mathbf{0} \in U$, then closure) works completely unchanged, even when the vectors are matrices or polynomials.
§7Two Subspace Examples
Let $A$ be a fixed matrix in $M_{nn}$. Show that $U = \{X \text{ in } M_{nn} : AX = XA\}$ is a subspace of $M_{nn}$.
Consider the set $U$ of all polynomials in $P$ that have $3$ as a root: $U = \{p(x) \text{ in } P : p(3) = 0\}$. Show that $U$ is a subspace of $P$.
§8Linear Combinations and Span, Once More
For vectors $\mathbf{v}_1, \ldots, \mathbf{v}_k$ in a vector space $V$, a linear combination is any vector $a_1\mathbf{v}_1+\cdots+a_k\mathbf{v}_k$ (scalars $a_i$), and the span $\operatorname{span}\{\mathbf{v}_1,\ldots,\mathbf{v}_k\}$ is the set of all such combinations. Exactly the definitions from Lecture 14, §5.1 — no change at all except that $\mathbf{v}_i$ can now be a matrix or a polynomial.
So $\operatorname{span}\{p_1, p_2\}$ for two polynomials means "every $ap_1+bp_2$," and testing whether a target polynomial lies in that span is — exactly as before — a question of solving a linear system for $a$ and $b$.
§9Testing Span Membership in P₂
Consider $p_1 = 1+x+4x^2$ and $p_2 = 1+5x+x^2$ in $P_2$. Determine whether $p_1$ and $p_2$ lie in $\operatorname{span}\{1+2x-x^2,\; 3+5x+2x^2\}$.
§10Standard Spanning Sets
Just as $\{\mathbf{e}_1,\ldots,\mathbf{e}_n\}$ span $\mathbb{R}^n$ (Lecture 14, Example 5.1.6), each vector space above has its own natural "starter kit":
- •$M_{mn}$: the $mn$ matrix units $E_{ij}$ (a $1$ in row $i$, column $j$, and $0$ elsewhere), for $i=1,\ldots,m$ and $j=1,\ldots,n$. Any matrix $A = \sum_{i,j} a_{ij}E_{ij}$, so these span $M_{mn}$.
- •$P_n$: the $n+1$ monomials $\{1, x, x^2, \ldots, x^n\}$. Every $a_0+a_1x+\cdots+a_nx^n$ is literally a linear combination of these.
- •$P$: the infinite list $\{1, x, x^2, x^3, \ldots\}$.
§11Theorem 6.2.2 — Span Is Still the Smallest Subspace
Let $U = \operatorname{span}\{\mathbf{v}_1, \mathbf{v}_2, \ldots, \mathbf{v}_n\}$ in a vector space $V$. Then:
- •1. $U$ is a subspace of $V$ containing each of $\mathbf{v}_1, \mathbf{v}_2, \ldots, \mathbf{v}_n$.
- •2. $U$ is the "smallest" subspace containing these vectors, in the sense that any subspace that contains each of $\mathbf{v}_1, \ldots, \mathbf{v}_n$ must contain $U$.
§12A Spanning Set for P₃
Show that $P_3 = \operatorname{span}\{x^2+x^3,\; x,\; 2x^2+1,\; 3\}$.
§13§6.3 — Independence, Once More
A set $\{\mathbf{v}_1,\ldots,\mathbf{v}_k\}$ in a vector space $V$ is linearly independent if the only scalars making $a_1\mathbf{v}_1+\cdots+a_k\mathbf{v}_k = \mathbf{0}$ true are $a_1=\cdots=a_k=0$. Exactly Lecture 15's definition, unchanged. It is dependent otherwise — some nontrivial combination vanishes.
Show that $\{1+x,\; 3x+x^2,\; 2+x-x^2\}$ is independent in $P_2$.
Suppose $\{\mathbf{u}, \mathbf{v}\}$ is an independent set in a vector space $V$. Show that $\{\mathbf{u}+2\mathbf{v},\; \mathbf{u}-3\mathbf{v}\}$ is also independent.
Suppose $A$ is an $n\times n$ matrix with $A^k = 0$ but $A^{k-1} \neq 0$. Show that $B = \{I, A, A^2, \ldots, A^{k-1}\}$ is independent in $M_{nn}$.
§14Basis and Dimension, Once More
A basis of a subspace $U$ of $V$ is a set that is both independent and spans $U$ — no waste, nothing missing. The dimension $\dim U$ is the number of vectors in any basis (Lecture 15's Invariance Theorem guarantees this number does not depend on which basis you pick — and that proof did not use anything special about $\mathbb{R}^n$, so it holds here too).
Using the standard spanning sets from §10 (each one is also independent — a short check you can carry out the same way as Example 8), the dimensions are:
- •$\dim \mathbb{R}^n = n$ (basis $\{\mathbf{e}_1,\ldots,\mathbf{e}_n\}$).
- •$\dim P_n = n+1$ (basis $\{1,x,\ldots,x^n\}$ — count carefully: degree at most $n$ means $n+1$ monomials, from $x^0$ to $x^n$).
- •$\dim M_{mn} = mn$ (basis the matrix units $\{E_{ij}\}$, of which there are $mn$).
§15An Interesting Fact: dim P = ∞
The reason is short. Suppose, for contradiction, that finitely many polynomials $q_1,\ldots,q_m$ spanned $P$. Let $N$ be the largest degree among $q_1,\ldots,q_m$. Every linear combination $a_1q_1+\cdots+a_mq_m$ then has degree at most $N$ (combining polynomials never raises degree beyond the largest one you started with). But $x^{N+1}$ is a perfectly good polynomial in $P$ with degree $N+1 > N$ — it can never be reached by such a combination. So no finite set can span $P$; you always need infinitely many polynomials, e.g. all of $1, x, x^2, x^3, \ldots$, and that infinite set turns out to be independent too (no finite sub-collection of distinct powers of $x$ can combine to zero, since a nonzero polynomial of degree $N$ genuinely has a nonzero $x^N$ coefficient). An infinite independent spanning set is exactly what "infinite-dimensional" means.
§16Two More Worked Examples
Let $A = \begin{bmatrix} 1 & 1 \\ 0 & 0 \end{bmatrix}$ and consider the subspace $U = \{X \text{ in } M_{22} : AX = XA\}$ of $M_{22}$. Show that $\dim U = 2$ and find a basis of $U$.
Show that the set $V$ of all symmetric $2\times2$ matrices is a vector space, and find $\dim V$.
§17Exercises
Three problems to practice on your own, in the same spirit as today's examples. Hints only — try each one properly before reading further.
Let $U = \{A \text{ in } M_{22} : A^T = -A\}$ (the skew-symmetric matrices). Show $U$ is a subspace of $M_{22}$ and find $\dim U$.
Determine whether $\{1-x^2,\; 2+x,\; x+x^2\}$ is independent in $P_2$.
Using the idea from §15, explain in your own words why no finite set of polynomials can span $P$.
Nothing in Lectures 14–15 was really about ℝⁿ. It was about closure, combinations, and counting — and that works anywhere.
Matrices, polynomials, and functions all turned out to be vectors in exactly the technical sense of Definition 6.1 — and every tool from subspaces to dimension carried over without a single new proof. That is the payoff of abstraction: prove something once, in general, and it is true forever after for every new example you meet — including ones, like $F[a,b]$, that you have not fully explored yet.