← mapVector Spaces

Basis & Dimension

⚗ Dr. Möbius, from the lab

We have spanning (reaches everything) and independence (no freeloaders). A basis is what you get when you demand both at once — a skeleton with no spare bones and no missing ones. And then comes the miracle that makes "dimension" mean anything at all: every basis of a space has the same size. Not approximately. Exactly. The proof is a goddamn gem and you're going to earn that word today.

THE BIG IDEA

A basis is a linearly independent spanning set; every basis of a space has the same number of vectors, and that number is the dimension.

Goldilocks: not too many, not too few

Two nodes have been circling this. Spanning (from Span) means your set reaches every vector — but a spanning set can be bloated with redundant vectors. Independence (from Linear Independence) means no redundancy — but an independent set might not reach everything. A basis is the set that's just right: both at once.

Definition. A set B={v1,,vn}B = \{v_1, \dots, v_n\} is a basis of a vector space VV if:

  1. BB spans VV (span(B)=V\operatorname{span}(B) = V), and
  2. BB is linearly independent.

Three ways to say the same thing, each worth holding in your head — they're all the same beast from different angles:

  • A basis is a minimal spanning set — strip any vector and it stops spanning.
  • A basis is a maximal independent set — add any vector and it becomes dependent.
  • A basis is a coordinate skeleton — the exact frame you measure every other vector against (see below).

THE theorem: all bases have the same size

This is the load-bearing wall of the entire subject. Without it, "dimension" is gibberish — just a word people say to sound smart. We prove it properly or we don't use it.

Theorem (invariance of basis size). If VV has a basis with nn vectors, then every basis of VV has exactly nn vectors.

Proof sketch (the exchange / replacement argument). Suppose B={v1,,vn}B = \{v_1, \dots, v_n\} is a basis and C={w1,,wm}C = \{w_1, \dots, w_m\} is another, with m>nm > n. Because BB spans, each wjw_j is a combination of the viv_i. The replacement lemma says: you can swap the ww's into BB one at a time, kicking out a vv each time, and keep a spanning set. After nn swaps you've used up all of BB and the first nn of the ww's span VV — so the remaining ww's (there are mn>0m - n > 0 of them) are combinations of the first nn. That makes CC dependent, contradicting that CC is a basis. So mnm \le n. Run the same argument with the roles flipped (CC spans, BB independent) to get nmn \le m. Therefore m=nm = n. \blacksquare

The engine underneath is the pigeonhole-via-pivots fact from the Linear Independence node: you can't have more independent vectors than the size of a spanning set. Once sizes are pinned, the word dimension is born:

dim(V)=the number of vectors in any (hence every) basis of V.\dim(V) = \text{the number of vectors in any (hence every) basis of } V.

Standard bases and their dimensions

Concrete frames you should know cold — these will come up throughout the rest of the course and in every exam I can imagine:

  • Rn\mathbb{R}^n: the standard basis e1,,ene_1, \dots, e_n (columns of the identity). dim(Rn)=n\dim(\mathbb{R}^n) = n.
  • PnP_n (polynomials of degree n\le n): the basis {1,x,x2,,xn}\{1, x, x^2, \dots, x^n\}. That's n+1n+1 vectors, so dim(Pn)=n+1\dim(P_n) = n + 1. (Watch the off-by-one — P2P_2 has basis 1,x,x21, x, x^2, dimension 33. Mess this up and you'll be wrong in ways that compound.)
  • Mm×nM_{m \times n} (matrices): the basis of matrices with a single 11 and zeros elsewhere — there are mnmn of them, so dim(Mm×n)=mn\dim(M_{m\times n}) = mn. So dim(M2×2)=4\dim(M_{2\times 2}) = 4.
  • The zero space {0}\{\mathbf{0}\}: its basis is the empty set, and dim({0})=0\dim(\{\mathbf{0}\}) = 0.

Coordinates: a basis turns vectors into number-tuples

Here's the deepest payoff, and it ties straight back to What Is a Number — the basis is the place-value system for a vector space.

Theorem (unique coordinates). If B={v1,,vn}B = \{v_1, \dots, v_n\} is a basis of VV, then every vVv \in V can be written as a linear combination of the viv_i in exactly one way.

Proof. Existence is just spanning: since BB spans, v=c1v1++cnvnv = c_1 v_1 + \cdots + c_n v_n for some coefficients. Uniqueness is the two-line independence argument — watch. Suppose two representations: v=c1v1++cnvn=d1v1++dnvn.v = c_1 v_1 + \cdots + c_n v_n = d_1 v_1 + \cdots + d_n v_n. Subtract: (c1d1)v1+(c2d2)v2++(cndn)vn=0.(c_1 - d_1)v_1 + (c_2 - d_2)v_2 + \cdots + (c_n - d_n)v_n = \mathbf{0}. By independence of BB, every coefficient must be zero: cidi=0c_i - d_i = 0 for all ii, i.e. ci=dic_i = d_i. The two representations were identical all along. \blacksquare

Those unique coefficients (c1,,cn)(c_1, \dots, c_n) are the coordinates of vv relative to BB. This is exactly positional notation: the basis is the "place values," the coordinates are the "digits," and uniqueness is what makes the digits a well-defined name. A basis is the device that turns an abstract vector — a polynomial, a matrix, a function — into an honest tuple of numbers you can compute with. That is why we drag everything back to Rn\mathbb{R}^n. Same fucking move as base-ten notation, just in a different costume, exactly as advertised in lesson one.

Dimension as degrees of freedom

The cleanest intuition: dim(V)\dim(V) is the number of independent choices — degrees of freedom — you make to specify a vector. In R3\mathbb{R}^3 you choose three coordinates freely, so dim=3\dim = 3. Revisit the Subspaces census of R3\mathbb{R}^3 with this new word:

  • {0}\{\mathbf{0}\}: zero free choices, dim=0\dim = 0.
  • A line through 0\mathbf{0}: one free choice (how far along), dim=1\dim = 1.
  • A plane through 0\mathbf{0}: two free choices, dim=2\dim = 2.
  • All of R3\mathbb{R}^3: three free choices, dim=3\dim = 3.

The subspaces of R3\mathbb{R}^3 are exactly the subspaces of dimension 0,1,2,30, 1, 2, 3 — the geometry and the counting are the same fact, finally named. A subspace's dimension is its "number of independent directions," and it can never exceed the dimension of the space it lives in.

🔬 SPECIMENS (worked examples)

Worked example 1 — is this a basis of ℝ²?

Is {(1,2),(3,5)}\{(1, 2), (3, 5)\} a basis of R2\mathbb{R}^2?

A basis must span R2\mathbb{R}^2 AND be independent. Since dim(R2)=2\dim(\mathbb{R}^2) = 2 and we have exactly 22 vectors, either property implies the other — a 2-vector independent set in a 2D space automatically spans, and vice versa. So I only need to check one. Check independence: solve c1(1,2)+c2(3,5)=0c_1(1,2) + c_2(3,5) = \mathbf{0}: {c1+3c2=02c1+5c2=0\begin{cases} c_1 + 3c_2 = 0 \\ 2c_1 + 5c_2 = 0 \end{cases} From the first, c1=3c2c_1 = -3c_2; substitute: 2(3c2)+5c2=c2=02(-3c_2) + 5c_2 = -c_2 = 0, so c2=0c_2 = 0 and c1=0c_1 = 0. Only the trivial solution — independent. With 22 independent vectors in a 2-dimensional space, they also span. So yes, it's a basis. (Equivalently: the matrix with these columns has nonzero determinant 1532=101\cdot5 - 3\cdot2 = -1 \ne 0.)

Worked example 2 — coordinates relative to a non-standard basis (yes, that's a thing)

Using the basis B={(1,1),(1,1)}B = \{(1, 1), (1, -1)\} of R2\mathbb{R}^2, find the coordinates of v=(5,1)v = (5, 1).

Coordinates means: find the unique c1,c2c_1, c_2 with c1(1,1)+c2(1,1)=(5,1)c_1(1,1) + c_2(1,-1) = (5,1). The system: {c1+c2=5c1c2=1\begin{cases} c_1 + c_2 = 5 \\ c_1 - c_2 = 1 \end{cases} Add the equations: 2c1=6c1=32c_1 = 6 \Rightarrow c_1 = 3. Subtract: 2c2=4c2=22c_2 = 4 \Rightarrow c_2 = 2.

Check: 3(1,1)+2(1,1)=(3,3)+(2,2)=(5,1)3(1,1) + 2(1,-1) = (3,3) + (2,-2) = (5,1). ✓

So the coordinates of vv relative to BB are (3,2)(3, 2) — written [v]B=(3,2)[v]_B = (3,2). Note these differ from the standard coordinates (5,1)(5,1): a vector's coordinate tuple depends entirely on which basis you measure against. The uniqueness theorem guarantees there's exactly one such tuple, so "[v]B=(3,2)[v]_B = (3,2)" is unambiguous.

Worked example 3 — the right-count trap: three vectors, zero basis

Is {(1,2,3),(4,5,6),(7,8,9)}\{(1, 2, 3), (4, 5, 6), (7, 8, 9)\} a basis of R3\mathbb{R}^3? It has three vectors and dim(R3)=3\dim(\mathbb{R}^3) = 3 — done, right?

The trap: "right number of vectors" is necessary but NOT sufficient. You still need them independent. From the Linear Independence node we caught these exact vectors freeloading: (7,8,9)=2(4,5,6)(1,2,3),so1(1,2,3)2(4,5,6)+1(7,8,9)=0,(7,8,9) = 2(4,5,6) - (1,2,3), \quad\text{so}\quad 1\cdot(1,2,3) - 2\cdot(4,5,6) + 1\cdot(7,8,9) = \mathbf{0}, a nontrivial relation. So the set is dependent, hence not a basis — it actually only spans a 2D plane, not all of R3\mathbb{R}^3. Having dim(V)\dim(V) vectors makes a basis possible, not guaranteed: you must verify independence (equivalently, a pivot in every column, equivalently nonzero determinant — here det=0\det = 0). Count first, then prove. Never skip the proof.

☠ KNOWN HAZARDS

  • Off-by-one on dim(Pn)\dim(P_n). Polynomials of degree n\le n need the basis 1,x,,xn1, x, \dots, x^n — that's n+1n+1 vectors, not nn. P2P_2 has dimension 33. This off-by-one kills students at exam time every single semester.

  • Thinking a spanning set is automatically a basis. Spanning sets can be bloated with redundant vectors. A basis must ALSO be independent — minimal, no spares. Spanning only gets you half credit.

  • Forgetting uniqueness needs independence. Existence of coordinates comes from spanning; uniqueness comes from independence. Drop independence and a vector gets many coordinate tuples — coordinate chaos, completely useless.

  • Believing dimension depends on which basis you pick. It doesn't — that's the entire content of the invariance theorem we just proved. Every basis of the same space has identical size. If you're getting different dimensions from different bases, you've made an error.

TL;DR

  • A basis is a set that is both spanning and linearly independent — equivalently, a minimal spanning set or a maximal independent set. Goldilocks.

  • Every basis of VV has the same size (replacement/exchange argument, grounded in the pigeonhole-via-pivots fact). That common size is dim(V)\dim(V).

  • Standard dimensions: dim(Rn)=n\dim(\mathbb{R}^n)=n, dim(Pn)=n+1\dim(P_n)=n+1 (basis 1,x,,xn1, x, \dots, x^n), dim(Mm×n)=mn\dim(M_{m\times n})=mn, dim({0})=0\dim(\{\mathbf{0}\})=0.

  • Coordinates are unique: a basis writes every vector as a combination in exactly one way (existence from spanning, uniqueness from independence — a two-line subtraction). The basis is a vector space's place-value system.

  • dim(V)\dim(V) = degrees of freedom. The subspaces of R3\mathbb{R}^3 are exactly those of dimension 0,1,2,30,1,2,3: point, line, plane, all.

unlocks