Cheatsheet: Change of basis
The core idea
Section titled “The core idea”A vector’s coordinates describe it relative to a chosen basis, not absolutely. The same arrow has different coordinates in different bases; none is more correct. The standard basis is the default, not the truth.
The basis matrix M
Section titled “The basis matrix M”Write the other basis (say Jennifer’s b1, b2) in your coordinates. Stack as columns:
M = [ b1 b2 ] (columns are the other basis, in your coordinates)| Translation | Operation |
|---|---|
| Their coordinates to yours | M · [x', y'] |
| Your coordinates to theirs | M^-1 · [x, y] |
Requires det(M) != 0 (the basis must actually span the space).
The 2x2 inverse shortcut
Section titled “The 2x2 inverse shortcut”M = [ a b ] M^-1 = (1/det) · [ d -b ] det = ad - bc [ c d ] [ -c a ]Transformations change matrix with the basis
Section titled “Transformations change matrix with the basis”The same transformation has different matrices in different bases:
A_their_basis = M^-1 · A · MRead right to left: translate into your basis (M), apply the transformation (A), translate back (M^-1). Same physical operation, different numbers.
Worked examples (Jennifer’s basis b1=[2,1], b2=[-1,1], M=[[2,-1],[1,1]], det=3)
Section titled “Worked examples (Jennifer’s basis b1=[2,1], b2=[-1,1], M=[[2,-1],[1,1]], det=3)”| Task | Computation | Result |
|---|---|---|
Her [1,1] to ours | M · [1,1] = [2,1]+[-1,1] | [1, 2] |
Our [3,2] to hers | M^-1 · [3,2] = (1/3)[5,1] | [5/3, 1/3] |
| Round-trip check | M · [5/3,1/3] | [3, 2] |
| Rotation R in her basis | M^-1 · R · M | [[1/3,-2/3],[5/3,-1/3]] |
M^-1 = (1/3)[[1,1],[-1,2]]. The rotation’s ugly matrix in her basis is the same physical 90 deg spin as [[0,-1],[1,0]] in ours.
Why it matters for AI
Section titled “Why it matters for AI”Change of basis underlies dimensionality reduction. PCA picks a basis aligned with the data’s variation (keep the first few coordinates to compress). Whitening picks a basis where every direction has unit variance. SVD finds bases that expose a matrix’s structure. Choosing the right basis turns a confusing description into a clear one.
Pitfalls to dodge
Section titled “Pitfalls to dodge”- Standard basis is “real.” No, it is the default. All bases are equally valid.
- Wrong translation direction.
M: their coords to yours.M^-1: yours to theirs. - Wrong sandwich order.
M^-1 · A · M, right to left. - Prettier matrix means different transformation. No, the operation is fixed; only the basis-dependent matrix changes.
The one-line version
Section titled “The one-line version”Coordinates are a choice of language, not a fact about the vector: M and M^-1 translate between bases, and M^-1 · A · M re-describes a transformation in a new basis without changing what it does.