Skip to content

Diagonalisation and matrix powers

Split a vector along the eigenvectors, and a matrix applied a hundred times becomes two numbers raised to a power; see where repeated steps lead.

Helps to know firstFinding eigenvalues

Helps to know first
This topic

First, the picture

Apply one matrix again and again. Watch a ring of points flatten onto a single line while it grows.

Where repeated steps lead

A = [1.5 1; 0.5 1] applied k times, drawn 2^k times smaller.

Forty points on and inside the unit circle, and the two eigen-lines of A, along (2, 1) and (1, −1).

steps k
0
true scale
× 1
long axis
0.2°
0.00 / 11.60 s
Describe this picture

One panel with the two eigen-lines of A=[1.510.51]\mathbf{A}=\begin{bmatrix}1.5&1\\0.5&1\end{bmatrix} drawn dashed, along (2,1)(2,1) and (1,−1)(1,-1), and the unit circle drawn faintly. A cloud of 40 points, 32 on the rim of the unit circle and 8 inside it, is hit by A\mathbf{A} again and again. After each step the cloud is drawn shrunk by 2−k2^{-k} so that it stays on screen, and a readout gives the true scale, ×2k\times2^k. Over about 12 s the cloud glides to its places after 1, 2, 5 and 10 steps: it stretches into a thinner and thinner ellipse and settles onto the line of (2,1)(2,1); a readout gives the angle of its long axis, which falls to 26.57°. One control after the clip: a slider for the step count kk from 0 to 10.

Along the eigenvectors, a step is a number

A matrix step mixes the coordinates of a point, and doing it ten times by hand is tedious. Along an eigenvector it is easy: the matrix only stretches. So split the point into eigenvector parts first.

Take A=[1.510.51]\mathbf{A}=\begin{bmatrix}1.5&1\\0.5&1\end{bmatrix}, with A(2,1)=2 (2,1)\mathbf{A}(2,1)=2\,(2,1) and A(1,−1)=0.5 (1,−1)\mathbf{A}(1,-1)=0.5\,(1,-1), as on Finding eigenvalues. The point (1,0)(1,0) splits as

(1,0)=13(2,1)+13(1,−1).(1,0)=\tfrac13(2,1)+\tfrac13(1,-1).

Each step doubles the first part and halves the second. After kk steps:

Ak(1,0)=13 2k (2,1)+13 0.5k (1,−1).\begin{aligned} \mathbf{A}^k(1,0)&=\tfrac13\,2^k\,(2,1)\\ &\quad+\tfrac13\,0.5^k\,(1,-1). \end{aligned}

Here Ak\mathbf{A}^k means A\mathbf{A} applied kk times, the matrix product AA⋯A\mathbf{A}\mathbf{A}\cdots\mathbf{A}. After 10 steps the first part has grown by 210=10242^{10}=1024 and the second has shrunk by 0.510≈0.0010.5^{10}\approx0.001. Almost nothing is left off the line of (2,1)(2,1). That is what the picture shows: the direction settles within a handful of steps, while the length keeps doubling.

In general, if x=c1v1+⋯+cnvn\mathbf{x}=c_1\mathbf{v}_1+\dots+c_n\mathbf{v}_n along eigenvectors, then

Akx=c1λ1 k v1+⋯+cnλn k vn.\mathbf{A}^k\mathbf{x}=c_1\lambda_1^{\,k}\,\mathbf{v}_1+\dots+c_n\lambda_n^{\,k}\,\mathbf{v}_n.

Provided its coefficient is not 0, the eigenvalue largest in size wins in the long run.

Diagonalising

Put the eigenvectors side by side as the columns of a matrix X\mathbf{X}, and the eigenvalues on the diagonal of a matrix Λ\boldsymbol{\Lambda} (capital lambda), with zeros elsewhere:

X=[211−1],Λ=[2000.5].\mathbf{X}=\begin{bmatrix}2&1\\1&-1\end{bmatrix},\qquad \boldsymbol{\Lambda}=\begin{bmatrix}2&0\\0&0.5\end{bmatrix}.

A\mathbf{A} times each column of X\mathbf{X} is that column times its eigenvalue. Written for both columns at once:

AX=XΛ.\mathbf{A}\mathbf{X}=\mathbf{X}\boldsymbol{\Lambda}.

If the eigenvectors are independent, X\mathbf{X} has an inverse, as in The inverse matrix. Multiply on the right by X−1\mathbf{X}^{-1}:

A=XΛX−1.\mathbf{A}=\mathbf{X}\boldsymbol{\Lambda}\mathbf{X}^{-1}.

This is diagonalising A\mathbf{A}. Read it right to left as three steps: X−1\mathbf{X}^{-1} finds the eigenvector parts of a point, Λ\boldsymbol{\Lambda} stretches each part, and X\mathbf{X} puts the parts back together. Check it with numbers. Here X−1=13[111−2]\mathbf{X}^{-1}=\tfrac13\begin{bmatrix}1&1\\1&-2\end{bmatrix} and XΛ=[40.52−0.5]\mathbf{X}\boldsymbol{\Lambda}=\begin{bmatrix}4&0.5\\2&-0.5\end{bmatrix}, so

XΛX−1=13[4.531.53]=[1.510.51]=A.\begin{aligned} \mathbf{X}\boldsymbol{\Lambda}\mathbf{X}^{-1}&=\tfrac13\begin{bmatrix}4.5&3\\1.5&3\end{bmatrix}\\ &=\begin{bmatrix}1.5&1\\0.5&1\end{bmatrix}=\mathbf{A}. \end{aligned}

Powers

Now square it. The inner X−1X\mathbf{X}^{-1}\mathbf{X} cancels:

A2=XΛX−1 XΛX−1=XΛ2X−1.\mathbf{A}^2=\mathbf{X}\boldsymbol{\Lambda}\mathbf{X}^{-1}\,\mathbf{X}\boldsymbol{\Lambda}\mathbf{X}^{-1}=\mathbf{X}\boldsymbol{\Lambda}^2\mathbf{X}^{-1}.

Every further step cancels the same way, so Ak=XΛkX−1\mathbf{A}^k=\mathbf{X}\boldsymbol{\Lambda}^k\mathbf{X}^{-1}. The power of a diagonal matrix is easy: raise each diagonal entry to the power kk.

Watch out

A2\mathbf{A}^2 is not each entry squared. Multiplying out, A2=[2.752.51.251.5]\mathbf{A}^2=\begin{bmatrix}2.75&2.5\\1.25&1.5\end{bmatrix}, while squaring the entries gives [2.2510.251]\begin{bmatrix}2.25&1\\0.25&1\end{bmatrix}, a different matrix that does not mean “two steps”. The power is always the matrix product.

There is a tidy way to write the answer. Let P1=13[2211]\mathbf{P}_1=\tfrac13\begin{bmatrix}2&2\\1&1\end{bmatrix}, the matrix that keeps the (2,1)(2,1) part of a point and drops the (1,−1)(1,-1) part, and P2=I−P1\mathbf{P}_2=\mathbf{I}-\mathbf{P}_1, which does the opposite. (These are projections, not the permutation matrices of Transposes and permutations. They are slanted projections: they drop along the other eigenvector, not at a right angle, so unlike those of Projections they are not symmetric.) Then

Ak=2k P1+0.5k P2.\mathbf{A}^k=2^k\,\mathbf{P}_1+0.5^k\,\mathbf{P}_2.

For k=2k=2 this gives 4P1+0.25P2=[2.752.51.251.5]4\mathbf{P}_1+0.25\mathbf{P}_2=\begin{bmatrix}2.75&2.5\\1.25&1.5\end{bmatrix}, as above. For k=10k=10:

A10≈[682.667682.666341.333341.334].\mathbf{A}^{10}\approx\begin{bmatrix}682.667&682.666\\341.333&341.334\end{bmatrix}.

Both columns are almost exactly 341.33 (2,1)341.33\,(2,1): after ten steps, every point has been sent onto the line of (2,1)(2,1).

Fibonacci

The Fibonacci numbers 0,1,1,2,3,5,8,…0,1,1,2,3,5,8,\dots add the last two to get the next: Fk+1=Fk+Fk−1F_{k+1}=F_k+F_{k-1}. Keep the last two as a vector, and one step is a matrix:

[Fk+1Fk]=[1110][FkFk−1].\begin{bmatrix}F_{k+1}\\F_k\end{bmatrix}=\begin{bmatrix}1&1\\1&0\end{bmatrix}\begin{bmatrix}F_k\\F_{k-1}\end{bmatrix}.

Its trace is 1 and its determinant −1-1, so its eigenvalues solve λ2−λ−1=0\lambda^2-\lambda-1=0:

φ=1+52=1.618034,ψ=1−52=−0.618034.\begin{aligned} \varphi&=\frac{1+\sqrt5}{2}=1.618034,\\ \psi&=\frac{1-\sqrt5}{2}=-0.618034. \end{aligned}

On this page φ\varphi is this number, the golden ratio, not a phase. Its eigenvector is (φ,1)(\varphi,1): the matrix sends it to (φ+1, φ)=(φ2,φ)=φ (φ,1)(\varphi+1,\,\varphi)=(\varphi^2,\varphi)=\varphi\,(\varphi,1), because φ2=φ+1\varphi^2=\varphi+1. Splitting the start (F1,F0)=(1,0)(F_1,F_0)=(1,0) along the two eigenvectors gives the closed form

Fk=φk−ψk5.F_k=\frac{\varphi^k-\psi^k}{\sqrt5}.

Since ∣ψ∣<1\lvert\psi\rvert<1, its power fades, and FkF_k grows like φk\varphi^k.

Fibonacci

The numbers grow by φ each step; their direction settles on the eigen-line.

The Fibonacci step: (F_{k+1}, F_k) goes to (F_{k+1} + F_k, F_{k+1}), the matrix [1 1; 1 0].

0.00 / 11.50 s
Describe this picture

Two panels (stacked on a phone). On the left, bars for the Fibonacci numbers 1,1,2,3,5,…,891,1,2,3,5,\dots,89, appearing one by one. On the right, the vectors (Fk+1,Fk)(F_{k+1},F_k), (1,1)(1,1), (2,1)(2,1), (3,2)(3,2), (5,3)(5,3) and on, drawn as arrows of one length, the newest bright and the earlier ones faded, beside the dashed eigen-line of (φ,1)(\varphi,1). The arrows swing from side to side of that line, by less each time, and settle onto it. There is no control.

Watch the arrows close in on the line. They swing from one side to the other because ψ\psi is negative, and the swing shrinks because its size is less than 1.

In signal processing · difference equations

A filter’s output with no input is a matrix power too. Take y[n]=1.5 y[n−1]−0.56 y[n−2]y[n]=1.5\,y[n-1]-0.56\,y[n-2] with y[−1]=0y[-1]=0 and y[0]=1y[0]=1. Its companion matrix has eigenvalues 0.8 and 0.7, as on Finding eigenvalues, and splitting the start along its eigenvectors gives y[n]=8(0.8)n−7(0.7)ny[n]=8(0.8)^n-7(0.7)^n. The first values are 1, 1.5, 1.69, 1.695 and 1.5961. Difference equations, in the signal processing course, solves such equations the same way. Samples count from n=0n=0, vector entries from 1.

When it fails

Diagonalising needs nn independent eigenvectors, so that X\mathbf{X} has an inverse. Most matrices have them, but not all. The shear [1101]\begin{bmatrix}1&1\\0&1\end{bmatrix} has the eigenvalue 1 twice and only one line of eigenvectors, through (1,0)(1,0). Any X\mathbf{X} built from its eigenvectors has two columns on one line, so it has no inverse, and the shear can’t be diagonalised. Similar matrices and the Jordan form shows what to use instead.

Worked example

1. Diagonalise. For A=[1.510.51]\mathbf{A}=\begin{bmatrix}1.5&1\\0.5&1\end{bmatrix}: X=[211−1]\mathbf{X}=\begin{bmatrix}2&1\\1&-1\end{bmatrix}, Λ=[2000.5]\boldsymbol{\Lambda}=\begin{bmatrix}2&0\\0&0.5\end{bmatrix}, X−1=13[111−2]\mathbf{X}^{-1}=\tfrac13\begin{bmatrix}1&1\\1&-2\end{bmatrix}, and XΛX−1=A\mathbf{X}\boldsymbol{\Lambda}\mathbf{X}^{-1}=\mathbf{A}.

2. Square it two ways. Directly, A2\mathbf{A}^2 has entries 2.25+0.5=2.752.25+0.5=2.75, 1.5+1=2.51.5+1=2.5, 0.75+0.5=1.250.75+0.5=1.25 and 0.5+1=1.50.5+1=1.5. By eigenvalues, 4P1+0.25P24\mathbf{P}_1+0.25\mathbf{P}_2 gives the same matrix.

3. Ten Fibonacci steps. [1110]10=[89555534]\begin{bmatrix}1&1\\1&0\end{bmatrix}^{10}=\begin{bmatrix}89&55\\55&34\end{bmatrix}, so F10=55F_{10}=55. The closed form agrees: (122.9919−0.0081)/2.236068=55(122.9919-0.0081)/2.236068=55. Twenty steps give F20=6765F_{20}=6765, and F21/F20=10946/6765=1.618034F_{21}/F_{20}=10946/6765=1.618034, the golden ratio to six decimals.

4. Can it be diagonalised? The shear: no, one line of eigenvectors.

Try these before you read the answers.

  • By what factor does the (2,1)(2,1) part grow in A10\mathbf{A}^{10}? 210=10242^{10}=1024.
  • Does the 0.5100.5^{10} part matter? It is about 0.001: almost nothing.
  • A matrix has eigenvalues 0.9 and 0.5. Do its powers die out? Yes: both parts shrink every step.
  • After many steps from (1,0)(1,0), which way does Ak(1,0)\mathbf{A}^k(1,0) point? Along (2,1)(2,1), at 26.57°, which is 0.4636 radians.

Where you’ll meet this

Stability. Any system updated by xk+1=Axk\mathbf{x}_{k+1}=\mathbf{A}\mathbf{x}_k settles to zero exactly when every eigenvalue has size less than 1. The largest size is called the spectral radius; a filter is stable when its companion matrix has spectral radius below 1.

Growth rates. A recursion like Fibonacci’s grows by its largest eigenvalue each step: φ≈1.618\varphi\approx1.618 for Fibonacci.

Long-run behaviour. Populations moving between places, and the chances of a random process being in each state, follow uk+1=Muk\mathbf{u}_{k+1}=\mathbf{M}\mathbf{u}_k. Markov matrices uses this page to find where they end up.

Reference card

QuantityFormulaNotes
Eigenvector matrixX=[ v1 ⋯ vn ]\mathbf{X}=[\,\mathbf{v}_1\ \cdots\ \mathbf{v}_n\,]eigenvectors as columns
Eigenvalue matrixΛ=diag(λ1,…,λn)\boldsymbol{\Lambda}=\mathrm{diag}(\lambda_1,\dots,\lambda_n)zeros off the diagonal
Columns at onceAX=XΛ\mathbf{A}\mathbf{X}=\mathbf{X}\boldsymbol{\Lambda}each column is Avq=λqvq\mathbf{A}\mathbf{v}_q=\lambda_q\mathbf{v}_q
DiagonalisedA=XΛX−1\mathbf{A}=\mathbf{X}\boldsymbol{\Lambda}\mathbf{X}^{-1}needs nn independent eigenvectors
PowersAk=XΛkX−1\mathbf{A}^k=\mathbf{X}\boldsymbol{\Lambda}^k\mathbf{X}^{-1}never entry by entry
A point’s futureAkx=∑qcqλq kvq\mathbf{A}^k\mathbf{x}=\sum_q c_q\lambda_q^{\,k}\mathbf{v}_qthe largest ∣λ∣\lvert\lambda\rvert wins
Stableevery ∣λq∣<1\lvert\lambda_q\rvert<1powers die out
FibonacciFk=(φk−ψk)/5F_k=(\varphi^k-\psi^k)/\sqrt5φ,ψ=(1±5)/2\varphi,\psi=(1\pm\sqrt5)/2

Keep reading with a free account.

By creating an account you accept the terms of use.

Sign in

Already have an account? Use the service you signed up with.

Or keep reading: get new lessons by email

Are you 13 or over?

Accounts and email updates are for people aged 13 or over. We keep only your answer, never your date of birth.

End of the lesson

Where to go next.

Phasorium

Account

Sign inKeep your place on any device

Subjects

Site

Look