Basis and Dimension
Every spot on a map is pinned down by exactly two numbers — how far east and how far north — and
no fewer will ever do the job. That "exactly two" is no accident: it is the dimension of
the plane, and the pair of directions those numbers are measured along is a basis. This
page is about what those two words really mean.
Here's a question worth sitting with: what is the smallest set of ingredient
vectors you'd ever need, so that every point in a space can be reached by some
linear combination
of them? Not "a set that works," but the leanest one possible — no wasted ingredients, nothing left
unreachable. That minimal, non-redundant set is a basis, and how many vectors it
takes is the space's dimension. The "2" in "2D" isn't just a label somebody picked
— it's literally the size of a basis for the plane.
A set of vectors earns the title "basis" by doing exactly two jobs:
- spanning — their linear combinations reach every single point in the space,
with nothing left out, and
- linearly independent — no vector in the set is redundant; none of them could
be built from the others (the very trap you met when two vectors turned out to be
parallel and
collapsed onto a single line).
A basis is a perfect set of building blocks: just enough vectors to describe everything, with
nothing redundant. The standard basis for 2D is
\{\hat{\imath}, \hat{\jmath}\}, but as you'll see below, it is far from
the only one — any two independent vectors will do. Step up to
three dimensions
and the same idea holds, just with one more ingredient: the standard basis becomes
\{\hat{\imath}, \hat{\jmath}, \hat{k}\}, three vectors, because 3D space
has dimension three.
Why insist on the smallest set? Because every extra, redundant vector you drag along has
to be carried, stored, and computed with forever after — for no benefit, since it adds no new
reach. A basis is the point where you've squeezed out every bit of redundancy but haven't lost any
reach either: the leanest possible description of the whole space.
Worked examples: is it a basis?
1. The standard basis. Take
\hat{\imath}=(1,0) and \hat{\jmath}=(0,1).
Spanning: any point (x, y) is just
x\,\hat{\imath} + y\,\hat{\jmath}, so every point is reachable.
Independent: neither is a multiple of the other. Both boxes ticked — it's a basis.
2. A completely different basis. Try \vec{u}=(1,1) and
\vec{v}=(1,-1) instead. Can they still reach every point? Take a
target like (4, 2) and solve
a\vec{u} + b\vec{v} = (4,2):
a + b = 4, \qquad a - b = 2 \;\;\Rightarrow\;\; a = 3,\; b = 1.
Check: 3(1,1) + 1(1,-1) = (4, 2) ✓. That trick — average the
coordinates to get a, halve their difference to get
b — works for any target point, so
\{\vec{u}, \vec{v}\} spans the whole plane too. They aren't parallel, so
they're independent. It's a different basis for the exact same 2D space — bases are not
unique.
3. A set that fails. Now try \vec{u}=(2,1) and
\vec{v}=(4,2). Notice \vec{v} = 2\vec{u} — they're
parallel, so they're dependent, and every combination
a\vec{u}+b\vec{v} simplifies to
(2(a+2b),\, a+2b), which always lands on the line
y = x/2. A point like (1, 0) is off that
line, so it's simply unreachable. This pair spans only a line, not the plane — it fails the
spanning test, so it's not a basis for 2D at all.
Quick self-check. Before reading on, decide for yourself: is
\{(2,0),\,(0,3)\} a basis for the plane? It is — they're not parallel
(independent), and any (x,y) is
\tfrac{x}{2}(2,0) + \tfrac{y}{3}(0,3), so together they still reach every
point (spanning), just with a stretched-out grid rather than a square one.
4. Too many vectors, guaranteed redundant. Take three 2D vectors at once:
(1,0), (0,1), and
(3,4). Even without checking anything fancy, we already know from the
dimension of the plane that three vectors in 2D must be dependent — and sure enough,
(3,4) = 3\,(1,0) + 4\,(0,1),
so the third vector is just a combination of the first two: entirely redundant. Dropping it leaves
\{(1,0),(0,1)\}, the standard basis, which alone already spans
everything. This is exactly the "more vectors than the dimension are automatically dependent" rule
in action.
A basis builds a grid
Each basis lays its own coordinate grid over the plane. Tilt the second basis vector below and
watch the grid skew with it — yet as long as the two vectors stay independent, the grid still
tiles the whole plane, so every point still has coordinates. Make them collinear and
the grid collapses: no longer a basis.
Dimension: the magic number
Here is the remarkable fact: every basis for a given space has the same number
of vectors. That count is the dimension of the space — 2 for the
plane, 3 for the space we live in, and n for the lists of
n numbers that
machine learning
runs on. Dimension is the honest measure of "how many independent directions are really here" —
and it never depends on which basis you chose. Swap in the alternate basis
\{(1,1),(1,-1)\} from the worked example above, and the plane is still
exactly 2-dimensional — only the labelling of points changes, never the count.
Once you have a fixed basis, every point gets an honest address: its
coordinates
with respect to that basis are simply the weights you used to build it — the
a=3, b=1 from worked example 2 above are the coordinates of
(4,2) in the basis \{(1,1),(1,-1)\}. Different
basis, different-looking coordinates, same underlying point.
Dimension isn't only for arrows in the plane, either. It's a completely general count of
"independent knobs." The space of all 2\times 2 matrices, for instance,
has dimension 4 — a basis is the four matrices with a single
1 in one slot and zeros elsewhere, since any
2\times 2 matrix is a unique combination of those four. The same
counting idea works for polynomials, functions, and every other
abstract vector
space — wherever "linear combination" makes sense, "basis" and "dimension" come along
for free.
Picking a well-suited basis is a running theme in linear algebra, not just a one-off trick. Later
you'll meet
eigenbases
— special bases, tailored to a particular transformation, in which that transformation's action
becomes as simple as stretching along each basis vector on its own. Same underlying idea as here:
the right set of building blocks makes a hard problem easy.
- A basis is not unique. The worked example above showed two totally different
bases — \{\hat{\imath},\hat{\jmath}\} and
\{(1,1),(1,-1)\} — for the very same plane. In fact infinitely many
valid bases exist for any space with more than one dimension; they just all share the
same size, and that shared size is the dimension.
- Dimension is a hard limit, both ways. Hand a 2D space more than two vectors
and they are automatically dependent — some vector must be redundant, no matter how you
pick them. Hand it fewer than two and they can't possibly span everything — some point is always
left out of reach. A basis sits exactly on that limit: not one vector too many, not one too few.
Three vectors in the plane, for instance, are guaranteed dependent before you even look at them —
the third is always forced into the span of the first two.
A basis doesn't have to be the "obvious" one, and picking a clever basis can be worth a fortune in
storage space. A photo is really a long list of pixel brightness numbers — one number per pixel is
one (very boring) basis. Formats like JPEG instead describe the same image using a basis built from
smooth wave patterns of increasing frequency. Most natural photos need only a handful of those wave
vectors to look practically identical to the original — the rest can be thrown away almost
unnoticed. Choosing the right basis is the whole trick behind JPEG images and MP3 audio: same
picture, same tune, dramatically fewer numbers.
The idea turns up again under a different name in physics and robotics:
degrees of freedom. A robot arm with three independently moving joints lives in a
3-dimensional space of possible configurations — "three degrees of freedom" is just another way of
saying its configuration space has dimension 3. A flying drone that can move in any direction and
also spin about a vertical axis needs four numbers to pin down its state — a 4-dimensional
configuration space, four degrees of freedom, one basis vector's worth of "independent knob" for
each. Whether you call it dimension or degrees of freedom, you're counting exactly the same thing:
how many independent settings it takes to describe every possible state.
See it explained