← Visualization Hub
Change of Basis & Diagonalization

Same Map, Better Language

A matrix is not the transformation — it is the transformation written down in one particular basis. Change the basis and the same map gets a different matrix. The whole game of diagonalization is picking the basis in which that matrix is as simple as possible: the eigenvector basis, where it becomes pure diagonal scaling.

1Change of basis — coordinates are a choice

A vector is a thing in space; its coordinates are just how you describe it.

When you write \(\mathbf v=(3,2)\) you are silently saying \(\mathbf v=3\mathbf e_1+2\mathbf e_2\) — the numbers are the weights on the standard basis. Pick a different basis \(\{\mathbf b_1,\mathbf b_2\}\) and the same arrow needs different numbers.

Put the new basis vectors in the columns of a matrix \(B\). Then \(B\) converts from the new coordinates into standard ones — because multiplying by \(B\) is exactly taking that combination of its columns:

\[\mathbf v=B\,[\mathbf v]_B\qquad\Longleftrightarrow\qquad [\mathbf v]_B=B^{-1}\mathbf v\]

Read them as translations: \(B\) speaks the new language into the standard one, and \(B^{-1}\) does the reverse. \(B\) is invertible precisely because a basis is independent — which is the whole reason we insisted on independence back in Step 2.

The arrow never moves

Changing basis does not transform anything. The vector sits still; only the ruler you measure it with changes.

New basis = new grid

Standard coordinates read off a square grid. A new basis draws a skewed grid, and the coordinates are how many steps along each skewed axis.

▶ Interactive: drag a basis and watch the coordinates change

2Similarity — the same map in another basis

\(\hat A=B^{-1}AB\): translate in, act, translate back.

Now let a linear map act. In standard coordinates it is \(A\). What matrix does the same map have in the \(B\)-basis? Follow a vector around the loop: take its \(B\)-coordinates, convert to standard with \(B\), apply \(A\), then convert back with \(B^{-1}\):

\[\hat A=B^{-1}AB\]

Two matrices related this way are called similar. They are the same transformation described by two observers using different axes. The picture is a commuting square — both routes agree:

v Av [v] B [Av] B A Â = B⁻¹AB B B⁻¹
Go across the top with \(A\), or down–across–up with \(B^{-1}AB\). Same destination.

Because they are the same map wearing different clothes, similar matrices share everything basis-independent:

Shared by similar matricesNot shared
eigenvalues (the whole characteristic polynomial)the individual entries
trace and determinantthe eigenvectors — their coordinates change with the basis
rank and nullitysymmetry (\(B^{-1}AB\) of a symmetric \(A\) need not be symmetric)

That invariance is the point: those quantities describe the map, not the bookkeeping.

3The eigenvector basis — the clever choice

If every basis gives a different matrix, pick the basis that gives the simplest one.

You get to choose \(B\). So choose the basis where the map is obvious: the eigenvectors. Call that matrix \(X=[\;\mathbf x_1\;\mathbf x_2\;\cdots\;]\).

Why it collapses: each basis vector is now an eigenvector, so the map sends \(\mathbf x_i\mapsto\lambda_i\mathbf x_i\) — the \(i\)-th basis direction maps to a multiple of itself, with no leakage into the others. In those coordinates, column \(i\) of the matrix has \(\lambda_i\) on the diagonal and zeros everywhere else:

\[AX=X\Lambda\qquad\Longrightarrow\qquad \hat A=X^{-1}AX=\Lambda= \begin{bmatrix}\lambda_1&&\\&\ddots&\\&&\lambda_n\end{bmatrix}\]

The off-diagonal entries are exactly the cross-talk between basis directions. Eigenvectors are the directions with none — which is why the matrix goes diagonal.

▶ Sim: find the eigen-directions first

4Diagonalization and what it buys you

\(A=X\Lambda X^{-1}\) — and suddenly hard things are easy.

Rearranging \(X^{-1}AX=\Lambda\) gives the factorization itself:

\[A=X\Lambda X^{-1}\]

Right to left, it is a three-step sentence: \(X^{-1}\) rewrites the vector in eigen-coordinates, \(\Lambda\) scales each coordinate on its own, \(X\) writes the answer back in standard coordinates. The payoff is that anything applied repeatedly now telescopes:

\[A^{k}=X\Lambda^{k}X^{-1},\qquad e^{At}=Xe^{\Lambda t}X^{-1},\qquad e^{\Lambda t}=\operatorname{diag}\!\left(e^{\lambda_1 t},\dots,e^{\lambda_n t}\right)\]

Matrix powers become number powers; the matrix exponential that solves \(\dot{\mathbf u}=A\mathbf u\) becomes \(n\) separate scalar exponentials. That is the same mode decomposition from the eigenvalue page, now written as one clean factorization.

FactorizationBasis \(X\)MiddleNeeds
A = XΛX⁻¹eigenvectors, generally not orthogonal\(\Lambda\), may be complex\(n\) independent eigenvectors
S = QΛQᵀeigenvectors, orthonormal\(\Lambda\), always real\(S\) symmetric
A = UΣVᵀtwo orthonormal bases\(\Sigma\ge0\)nothing — always exists

For a symmetric matrix the change of basis is a pure rotation (\(Q^{-1}=Q^{\mathsf T}\)) — the nicest possible case, and the reason principal axes are perpendicular.

5When it fails — and what to do instead

Diagonalization is a privilege, not a right.

The construction needs \(X^{-1}\), so it needs \(n\) independent eigenvectors. A defective matrix — repeated eigenvalue with too few eigenvectors — has no such \(X\). The classic example is the shear

\[A=\begin{bmatrix}1&1\\0&1\end{bmatrix},\qquad \lambda=1,1,\qquad\text{but only one eigen-direction }(1,0)\]

No basis makes it diagonal. The best available is the Jordan form — diagonal plus a stubborn 1 just above it.

Numerically: even when \(X\) exists it can be nearly singular — eigenvectors almost parallel — and then \(X^{-1}\) amplifies error badly. The SVD never has this problem: its bases are orthonormal by construction, so it is the tool of choice when the numbers matter.
Robotics: change of basis is what a coordinate frame is. A rotation \(R\) takes body coordinates to world coordinates, so a body-frame quantity \(A_{\text{body}}\) appears in the world as \(RA_{\text{body}}R^{\mathsf T}\) — a similarity transform (with \(R^{-1}=R^{\mathsf T}\)). Diagonalizing the inertia tensor finds the principal axes, the body-fixed basis in which it is diagonal and rotation decouples. Diagonalizing the state matrix \(A\) separates a coupled system into independent modes, which is exactly how you reason about settling time and oscillation.
▶ Sim: the factorization that always works (SVD)