Abstract Vector Spaces

A vector doesn't have to be an arrow, or a list of numbers. The whole machinery of linear algebra — basis, dimension, independence, linear maps — never actually cared what the vectors were. It only used two operations: adding two vectors, and scaling one by a number. So anything you can add and scale, following the familiar rules, is a vector space — and everything you know about \mathbb{R}^n instantly applies to it.

That's a startling amount of leverage. Polynomials, functions, matrices, even the solutions of a differential equation all turn out to be vectors, and linear algebra hands you their structure for free.

The rules that define a vector space

A set V with an addition and a scalar multiplication is a vector space (over the real numbers) when those operations obey eight axioms — all just "the arithmetic behaves sensibly":

Notice what's not here: no mention of coordinates, arrows, lengths or angles. Those are extra structure some spaces happen to have. The axioms alone are enough to build a basis and a dimension.

Vectors in disguise

A polynomial is really just its list of coefficients — a coordinate vector in the \{1, x, x^2, \dots\} basis. Adding polynomials is adding those coefficient vectors. Press Run:

// Represent a polynomial by its coefficient vector: [a0, a1, a2] means a0 + a1·x + a2·x². type Poly = number[]; function add(p: Poly, q: Poly): Poly { const n = Math.max(p.length, q.length); const out: Poly = []; for (let i = 0; i < n; i++) out.push((p[i] ?? 0) + (q[i] ?? 0)); return out; } function scale(c: number, p: Poly): Poly { return p.map((a) => c * a); } const p: Poly = [1, 2, 0]; // 1 + 2x const q: Poly = [0, 3, 4]; // 3x + 4x² console.log("p + q =", add(p, q)); // [1, 5, 4] -> 1 + 5x + 4x² console.log("3p =", scale(3, p)); // [3, 6, 0] -> 3 + 6x console.log("p + 0 =", add(p, [0, 0, 0])); // unchanged: the zero polynomial

The polynomials behave exactly like coordinate vectors because, as a vector space, that's precisely what they are.

Here's the pay-off. Differentiation \tfrac{d}{dx} is a linear map on the space of polynomials: \tfrac{d}{dx}(f+g) = f' + g' and \tfrac{d}{dx}(cf) = cf'. So in the basis \{1, x, x^2, x^3\} it is nothing but a matrix — the one that sends x^k to kx^{k-1}. Calculus, viewed through abstract vector spaces, becomes linear algebra: eigenvectors of \tfrac{d}{dx} are exponentials, and that is the whole reason e^{x} is special.