Quant Memo
Core

Diagonalization and Similarity

Rewriting a matrix in a coordinate system aligned with its own natural directions, so that a messy repeated operation like matrix powers collapses into simple scalar arithmetic.

Prerequisites: Eigenvalues & Eigenvectors

Suppose you need to know what a matrix does when applied 50 times in a row — a Markov chain's transition probabilities after 50 steps, or a discretized differential equation propagated 50 periods forward. Multiplying the matrix by itself 50 times by hand is slow and the intermediate numbers get ugly fast. Diagonalization is a shortcut: if you can find the right coordinate system, the matrix's repeated action becomes nothing more than raising a handful of plain numbers to the 50th power.

An analogy: describing wind along its own direction

If wind blows diagonally across a field, describing its speed using "north" and "east" components is awkward — both numbers change every time you rotate your reference frame, and neither one alone tells you the true speed. But if you instead measure along the wind's own direction, one number captures everything, and it stays simple no matter how many times you re-measure. Diagonalization does the matrix equivalent: it finds the special directions (eigenvectors) along which the matrix acts as pure scaling, no rotation or shearing. Described along those directions, a matrix's repeated action is just repeated multiplication by a single scaling number per direction.

The math, one symbol at a time

A square matrix AA is diagonalizable if it can be written as

A=PDP1,A = PDP^{-1},

where DD is a diagonal matrix holding AA's eigenvalues λ1,,λn\lambda_1, \ldots, \lambda_n down the diagonal, and PP is the matrix whose columns are the corresponding eigenvectors. In words: AA equals "change into eigenvector coordinates" (P1P^{-1}), "scale each coordinate by its eigenvalue" (DD), "change back" (PP). Two matrices related this way — AA and DD — are called similar: they represent the same underlying linear transformation, just viewed in different coordinate systems, and similar matrices always share the same eigenvalues, determinant, and trace.

The payoff is powers: An=PDnP1A^n = PD^nP^{-1}, and since DD is diagonal, DnD^n just raises each diagonal entry to the nn-th power — no matrix multiplication required for the hard part.

Worked example 1: computing a matrix cube

Let A=(2112)A = \begin{pmatrix} 2 & 1 \\ 1 & 2 \end{pmatrix}. Its eigenvalues solve (2λ)21=0(2-\lambda)^2 - 1 = 0, giving λ1=3\lambda_1 = 3, λ2=1\lambda_2 = 1, with eigenvectors (1,1)(1,1) and (1,1)(1,-1). So P=(1111)P = \begin{pmatrix}1&1\\1&-1\end{pmatrix}, D=(3001)D = \begin{pmatrix}3&0\\0&1\end{pmatrix}, and P1=12(1111)P^{-1} = \frac{1}{2}\begin{pmatrix}1&1\\1&-1\end{pmatrix}. Then A3=PD3P1A^3 = PD^3P^{-1} with D3=(27001)D^3 = \begin{pmatrix}27&0\\0&1\end{pmatrix}. Multiplying out gives A3=(14131314)A^3 = \begin{pmatrix}14&13\\13&14\end{pmatrix} — the same answer direct multiplication gives, but reached by cubing two numbers (27 and 1) instead of multiplying 2×22\times2 matrices twice.

Worked example 2: a two-state Markov chain after many steps

A trading signal flips between "on" (state 1) and "off" (state 0) with transition matrix A=(0.90.20.10.8)A = \begin{pmatrix}0.9 & 0.2 \\ 0.1 & 0.8\end{pmatrix} (columns: probability of going from that state to each row's state). Its eigenvalues are λ1=1\lambda_1 = 1 and λ2=0.7\lambda_2 = 0.7. Diagonalizing and raising to a high power nn, the λ2n=0.7n\lambda_2^n = 0.7^n term shrinks toward zero as nn grows, leaving only the λ1=1\lambda_1 = 1 contribution — this is exactly why Markov chains settle into a steady-state distribution: every eigenvalue below 1 dies out under repeated multiplication, and diagonalization makes that decay visible as ordinary exponential decay of a single number.

Matrix explorer
dashed = before · solid = after
det 1.25trace 2.50λ 1.81, 0.69area scales by 1.25×

Drag the matrix entries and watch the ellipse the unit circle maps to; the two directions that stay fixed (only stretched, not rotated) are the eigenvectors — exactly the axes diagonalization measures along.

vector v P⁻¹ eigen-coords Dⁿ scale each λⁿ
Diagonalization routes matrix powers through a coordinate change where the hard work — raising to the n-th power — happens to plain scalars, not matrices.

What this means in practice

Quants lean on diagonalization constantly: computing long-horizon transition probabilities in Markov models, solving linear systems of differential equations (interest-rate or population dynamics), and understanding principal component analysis, where diagonalizing a covariance matrix reveals the independent, uncorrelated risk directions in a portfolio. It's also the backbone of the The Matrix Exponential, which underlies continuous-time Markov chains and many pricing PDEs.

If A=PDP1A = PDP^{-1}, then An=PDnP1A^n = PD^nP^{-1} — repeated matrix multiplication becomes repeated scalar exponentiation along the matrix's own eigenvector directions.

Not every matrix is diagonalizable. A matrix with a repeated eigenvalue can fail to have enough independent eigenvectors to fill PP — the classic example is the shear (1101)\begin{pmatrix}1&1\\0&1\end{pmatrix}, which has only one eigenvector direction despite being 2×22\times2. Symmetric matrices are always safely diagonalizable (with real eigenvalues and orthogonal PP), which is why covariance and correlation matrices — always symmetric — are such friendly objects for this technique. Don't assume an arbitrary matrix shares that guarantee.

Related concepts

Practice in interviews

Further reading

  • Strang, Introduction to Linear Algebra, ch. 6
ShareTwitterLinkedIn