Change of Basis

Different coordinate systems for the same space

The Same Space, Many Perspectives

When you describe where you are, the answer depends on your reference point. To someone in New York, you might be 500 miles west. To someone in Chicago, you might be 200 miles south. The location is the same, but the description changes based on perspective.

Vectors work the same way. When we write a vector as [32]\begin{bmatrix} 3 \\ 2 \end{bmatrix}, we are implicitly saying 3 units along one direction and 2 units along another. But which directions? Usually we mean the standard basis: one unit right and one unit up.

The key insight is that these coordinates are not the vector itself. They are a description of the vector in terms of a particular basis. Choose a different basis, and the same vector gets different numbers.

What is a Basis?

A basis is a set of vectors that can describe any point in the space. Think of it as a coordinate system: if you can reach any location by combining these vectors, they form a basis.

In 2D, a basis consists of two vectors that are not parallel. The standard basis uses e1=(1,0)e_1 = (1, 0) and e2=(0,1)e_2 = (0, 1), but we could just as easily use any other pair of non-parallel vectors.

Interactive: Compare standard and custom bases

0.5

The standard basis (e1,e2e_1, e_2) stays fixed while the custom basis (b1,b2b_1, b_2) rotates

Notice how the custom basis vectors b1b_1 and b2b_2 span the same plane as the standard basis. They just point in different directions. Any vector in the plane can be written as a combination of either pair.

Same Vector, Different Coordinates

Here is the crucial idea: a single point in space has different coordinates depending on which basis you use. The point does not move. Only its description changes.

Interactive: Drag the point to see coordinates in both bases

Standard basis: P=(2.00,1.50)P = (2.00, 1.50)

Custom basis: [P]B=(2.20,0.40)[P]_B = (2.20, 0.40)

Drag point P to see its coordinates in both bases

When you drag point P, notice how its standard coordinates (x,y)(x, y) change differently than its coordinates in the custom basis [P]B[P]_B. The point is the same, but the numbers we use to locate it depend entirely on our choice of reference vectors.

We write [v]B[v]_B to mean the coordinates of vector vv with respect to basis BB. This notation reminds us that coordinates are always relative to some basis.

Building Vectors from a Basis

If you know the coordinates of a vector in a custom basis, you can find its position in standard coordinates by combining the basis vectors:

v=xb1+yb2v = x \cdot b_1 + y \cdot b_2

Here xx and yy are the coordinates in the custom basis, and b1b_1, b2b_2 are the basis vectors themselves (expressed in standard coordinates).

Interactive: Build a vector from custom basis components

1.0
1.0
0.5

In custom basis: [v]B=(1.0,1.0)[v]_B = (1.0, 1.0)

In standard basis: v=(0.37,1.37)v = (0.37, 1.37)

Adjust the coordinates and the basis angle to see how the same custom coordinates produce different standard positions as the basis rotates. The vector (1,1)(1, 1) in a rotated basis points in a completely different direction than (1,1)(1, 1) in the standard basis.

The Change of Basis Matrix

Converting between bases is a linear operation, which means we can represent it with a matrix. The change of basis matrix P has the new basis vectors as its columns:

P=[b1b2]P = \begin{bmatrix} | & | \\ b_1 & b_2 \\ | & | \end{bmatrix}

This matrix P converts coordinates from the custom basis to the standard basis:

vstandard=P[v]Bv_{\text{standard}} = P \cdot [v]_B

To go the other direction, from standard coordinates to custom coordinates, we use the inverse:

[v]B=P1vstandard[v]_B = P^{-1} \cdot v_{\text{standard}}

Interactive: The change of basis matrix in action

0.8

Change of basis matrix P:

P=[0.710.710.710.71]P = \begin{bmatrix} 0.71 & -0.71 \\ 0.71 & 0.71 \end{bmatrix}

Converting v = (2, 1):

[v]B=P1v=(2.12,0.71)[v]_B = P^{-1} \cdot v = (2.12, -0.71)

Watch how the matrix entries change as you rotate the basis. The columns of P are always the basis vectors b1b_1 and b2b_2, and P inverse converts our example vector v from standard to custom coordinates.

Why Change Basis?

You might wonder why we would bother with non-standard bases. The answer is that some problems become dramatically simpler in the right coordinate system.

Consider a transformation that stretches space along a diagonal. In the standard basis, this transformation mixes x and y coordinates in complicated ways. But if we choose a basis aligned with the stretch direction, the transformation becomes a simple scaling along each axis.

Interactive: Same transformation, different perspectives

A shear transformation in the standard basis

This is the deep motivation behind eigenvectors, which we will explore in a later chapter. Eigenvectors are the basis in which a transformation acts most simply, by just scaling along each axis. Finding the right basis transforms hard problems into easy ones.

The Formula in Full

Let us summarize the key formulas. If P is the matrix whose columns are the new basis vectors b1,b2,b_1, b_2, \ldots:

Standard to Custom: [v]B=P1v\text{Standard to Custom: } [v]_B = P^{-1} v
Custom to Standard: v=P[v]B\text{Custom to Standard: } v = P [v]_B

These formulas work in any dimension. In 3D, P would be a 3×3 matrix with three basis vectors as columns. The same principle applies: the matrix converts between perspectives on the same underlying space.

One more important formula: if you have a transformation matrix A in the standard basis and want to express it in basis B:

[A]B=P1AP[A]_B = P^{-1} A P

This is called a similarity transformation. The transformation A does the same thing to vectors regardless of basis, but its matrix representation changes. Finding a basis where [A]B[A]_B is diagonal, or nearly so, is one of the most powerful techniques in linear algebra.

Key Takeaways

  • A basis is a set of vectors that can describe any point in the space through linear combinations
  • The same vector has different coordinates in different bases, written as [v]B[v]_B
  • The change of basis matrix P has the new basis vectors as its columns
  • To convert from standard to custom basis, use [v]B=P1v[v]_B = P^{-1} v
  • Choosing the right basis can make transformations and computations dramatically simpler
  • Change of basis is a change in perspective, not a change in the underlying geometry