A matrix can have up to eigenvectors, the special directions along which it only stretches: . We found them geometrically (the directions where the input-to-output segments lie flat) and algebraically (the values of that make singular). When a matrix has distinct eigenvalues, it has eigenvectors pointing in different directions. This chapter follows that lucky case to its beautiful conclusion.
In this chapter we focus on square () matrices that have distinct eigenvalues and eigenvectors. There is an elegant relationship between such a matrix and the matrix whose columns are the eigenvectors of . As usual we will use matrices for the pictures.
Consider a rank- matrix with unique eigenvectors and corresponding eigenvalues . Because no two eigenvectors share a direction, the matrix whose columns are these eigenvectors also has rank :
We can navigate the entire -dimensional space with weighted sums of the columns of either or . How are the two matrices related? The relation is surprisingly easy to see. Multiply by one column at a time, and use :
That last matrix is just with each column scaled, which is exactly times a diagonal matrix of the eigenvalues, where has the eigenvalues on its diagonal and zeros everywhere else. Putting the two halves together and multiplying on the right by :
We just decomposed into a product of three matrices. This is the eigendecomposition of .
Let's understand by tracking what happens to a vector as it passes through , then , then .
So is a three-step pipeline:
Let's watch this happen for the matrix from the previous chapter, whose exact eigendecomposition is
The grey unit circle is our set of input vectors. First look at directly, in one shot. Now let's rebuild that exact ellipse in three steps.
This final ellipse sits exactly where 's ellipse was: encoding, scaling, then decoding reproduces . That is the whole content of .
Why is useful? One especially neat application is computing high powers of . Watch what happens when we multiply the decomposition by itself, and notice the inner cancelling to the identity:
This is a huge shortcut, because is trivial to compute. Since is diagonal, raising it to the -th power just raises each diagonal entry to the -th power:
We can cache and once and reuse them, so the whole cost of collapses to scalar powers on the diagonal. Let's confirm this visually: squaring the eigenvalues should turn 's ellipse into 's ellipse.
Here is , with eigenvalues and . Now reveal , whose eigenvalues are and : the direction that was already stretched grows even more, while the shrinking direction shrinks further. The eigenvectors (the axes of the ellipse) never move; only the eigenvalues change.
Multiply , which is the same as running the step-1/step-2/step-3 pipeline from section 15.2 but scaling by instead of in the middle. Encoding and decoding are unchanged; only the stretch factors are squared.
We will see real applications of matrix powers, such as Fibonacci numbers and Markov chains, in the chapters ahead.
In the next chapter we look at symmetric matrices, whose eigenvectors turn out to be perpendicular to one another, making a rotation matrix and the decomposition even cleaner.
โ 14. Eigenvectors and eigenvalues ยท 16. Eigenvectors of symmetric matrices โ