Coordinates in a Basis

Imagine giving someone directions to a shop. You could say "walk 3 blocks north and 2 blocks east from the town hall" — measuring against the town's street grid. Or you could say "it's 1.2 miles down Main Street, on a bearing of 40°" — measuring against a distance and a compass direction instead. Both descriptions pin down the exact same shop. The shop hasn't moved an inch; only the yardsticks you chose to measure it against have changed.

Vectors work the same way. When you write \begin{bmatrix} 3 \\ 2 \end{bmatrix}, you are quietly using the standard basis: "3 steps along \hat{\imath}, 2 along \hat{\jmath}." That's just one convenient choice of ruler — the (x,y) coordinates you've used your whole life are not some God-given property of the vector; they're the readout of one particular basis. The numbers 3 and 2 are the coordinates of the vector in that basis — the weights of the unique linear combination that reaches it.

Choose a different basis and the very same point gets different coordinates — different numbers describing the identical arrow in space, just as "3 blocks north, 2 east" and "1.2 miles at 40°" describe the identical shop.

Same point, new numbers

The black dot p is fixed in place — it never moves. Tilt the basis vectors \vec{b}_1 and \vec{b}_2 with the slider, and read off how many of each it takes to reach the dot. The coordinates (c_1, c_2) churn as the basis turns, even though the target itself never budges — exactly like the shop from the hook, described by a shifting ruler.

Worked example 1 — the trivial case: the standard basis

Take the vector \vec{v} = \begin{bmatrix} 5 \\ -3 \end{bmatrix}. In the standard basis \{\hat{\imath}, \hat{\jmath}\}, we don't even need to solve anything:

\vec{v} = 5\,\hat{\imath} + (-3)\,\hat{\jmath},

so the coordinates of \vec{v} in the standard basis are (5, -3) — the very same numbers you already wrote down. That sounds too easy to call a "worked example", and that's exactly the point: the standard basis is engineered so reading off coordinates costs zero work. Not every basis is this generous.

Worked example 2 — the real skill: a non-standard basis

Now measure the same vector \vec{v} = (5, -3) against a different basis:

\vec{b}_1 = \begin{bmatrix} 1 \\ 1 \end{bmatrix}, \qquad \vec{b}_2 = \begin{bmatrix} 1 \\ -1 \end{bmatrix}.

We need weights c_1, c_2 with c_1 \vec{b}_1 + c_2 \vec{b}_2 = \vec{v}. Writing that out component by component gives a small system:

c_1 + c_2 = 5, \qquad c_1 - c_2 = -3.

Adding the two equations: 2c_1 = 2 \Rightarrow c_1 = 1. Substituting back: 1 + c_2 = 5 \Rightarrow c_2 = 4. Check it: 1\cdot(1,1) + 4\cdot(1,-1) = (1+4,\ 1-4) = (5,-3). ✓

So the coordinates of \vec{v} in basis \{\vec{b}_1, \vec{b}_2\} are (1, 4) — completely different digits from (5, -3), describing the exact same arrow. This is the skill that matters: whenever the basis isn't standard, finding coordinates means solving a linear system for the weights.

Worked example 3 — going backwards: coordinates to vector

The reverse question is just as important. Suppose you're told that a vector has coordinates (2, -1) in the basis \vec{b}_1 = \begin{bmatrix} 2 \\ 0 \end{bmatrix}, \vec{b}_2 = \begin{bmatrix} 1 \\ 3 \end{bmatrix} — and you need to know what the vector actually is, in ordinary standard coordinates.

Coordinates are just weights, so rebuild it directly: multiply each basis vector by its weight and add.

\vec{v} = 2\vec{b}_1 + (-1)\vec{b}_2 = 2\begin{bmatrix}2\\0\end{bmatrix} - \begin{bmatrix}1\\3\end{bmatrix} = \begin{bmatrix}4\\0\end{bmatrix} - \begin{bmatrix}1\\3\end{bmatrix} = \begin{bmatrix}3\\-3\end{bmatrix}.

So (2,-1) in that basis is the standard vector (3,-3). Notice there was no system to solve this time — going from coordinates back to the vector is always just a weighted sum, the easy direction. It's finding the coordinates in the first place (Example 2) that takes the work.

A bare pair of numbers like (2, -1) means nothing on its own — it's only coordinates with respect to some basis, and different bases turn it into different vectors. In Worked Example 3, the coordinates (2,-1) named the vector (3,-3) — but in the standard basis, the label (2,-1) would simply be the vector (2,-1). Same digits, two entirely different arrows. Whenever you write coordinates, always say which basis they're measured against.

The flip side is just as important, and easy to get backwards: changing the basis never changes the vector itself — only the numbers describing it. The dot in the interactive figure above never moves as you drag the slider; only its coordinate readout does. It's the same arrow in space the whole time, wearing a different outfit.

Why change basis at all?

Because the right basis can make a hard problem easy. Pick coordinates aligned with the grain of a problem and messy formulas turn simple. This is the secret behind diagonalization and behind principal component analysis, which hunts for the basis that best lines up with the spread of a dataset. Changing basis is just changing your point of view — and a good point of view is half the battle.

Physics students learn this trick early: a block sliding down a frictionless ramp has gravity pulling it straight down, which looks awkward in the standard (x,y) basis — both components of the force are messy trig expressions. Switch to a basis tilted with the ramp — one vector pointing down the slope, one perpendicular to it — and gravity's coordinates suddenly become (mg\sin\theta,\ -mg\cos\theta): one axis carries all the sliding motion, the other just balances against the ramp's surface. Nothing about gravity changed — only the ruler we chose to describe it with. Choosing the basis that matches a problem's natural symmetry is one of the most useful tricks in applied mathematics.

The same idea, industrial-strength, is how image and audio compression works. A photograph stored as ordinary pixel values needs a number for every single pixel. But measured in a cleverly chosen basis (a relative of the ones used in JPEG and MP3), a typical photo's coordinates are mostly tiny numbers close to zero — because most photos are smooth and repetitive, not random static. Throw away the near-zero coordinates and keep only the big ones, and the picture barely changes to the eye, but the file shrinks dramatically. Compression is basis-hunting: find the ruler in which "boring" data has almost no length.

An example: line up with the data

Suppose three points happen to lie on the line y = x: (1,1), (2,2) and (3,3). In the standard basis each needs two numbers, and the bare pairs don't obviously shout "we are collinear".

Now measure against a basis aligned with the line — one vector pointing along it, one across it:

\vec{b}_1 = \begin{bmatrix} 1 \\ 1 \end{bmatrix}, \qquad \vec{b}_2 = \begin{bmatrix} -1 \\ 1 \end{bmatrix}.

Every point on the line is (k, k) = k\,\vec{b}_1 + 0\,\vec{b}_2, so its coordinates in this basis are simply

(1,1) \to (1, 0), \qquad (2,2) \to (2, 0), \qquad (3,3) \to (3, 0).

The second coordinate is always zero. In the aligned basis the data is secretly one-dimensional — a single number now pins down each point, and that fact leaps off the page where the original (x, y) pairs hid it. The same move tames a tilted ellipse (align the axes with it and its equation collapses to \tfrac{x'^2}{a^2} + \tfrac{y'^2}{b^2} = 1), and finding the basis that flattens a whole cloud of data this way is exactly what principal component analysis does.

See it explained