What an eigenvector is, and why Google wanted one Image: Unknown author (public domain)

What an eigenvector is, and why Google wanted one

A 2 by 2 matrix is a rule for moving every point of the plane: multiply the point's coordinates by the matrix and you get the new point. Most points are moved to somewhere off the line through the origin on which they started; the matrix turns them. For almost every matrix, though, there are a few special directions that are not turned at all, only stretched or squashed. A vector in such a direction is called an eigenvector, from the German eigen, own, and the stretch factor is its eigenvalue. The idea is the centre of Unit 11 of the masterclass, and this article is about three places where it earns its keep.

The definition and one example

A non-zero vector \(\mathbf{v}\) is an eigenvector of the square matrix \(A\) with eigenvalue \(\lambda\) when \(A\mathbf{v} = \lambda\mathbf{v}\). Take the matrix with rows \((2, 1)\) and \((1, 2)\). It sends \((1, 1)\) to \((3, 3)\) and \((1, -1)\) to \((1, -1)\). So \((1, 1)\) is an eigenvector with eigenvalue 3 and \((1, -1)\) is an eigenvector with eigenvalue 1: the matrix stretches the plane by 3 along one diagonal and leaves it alone along the other. Every other vector is a combination of these two and is sent to the corresponding combination of the stretched versions, which is why knowing the eigenvectors means knowing the matrix.

Finding them is a problem in polynomials. The equation \(A\mathbf{v} = \lambda\mathbf{v}\) has a non-zero solution exactly when the matrix \(\lambda I - A\) fails to be invertible, which by Unit 4 means its determinant is zero. For an \(n\) by \(n\) matrix that determinant is a polynomial of degree \(n\) in \(\lambda\), the characteristic polynomial, and the eigenvalues are its roots. For the example it is \((\lambda - 2)^2 - 1 = \lambda^2 - 4\lambda + 3 = (\lambda - 1)(\lambda - 3)\). That link between matrices and roots of polynomials is the reason eigenvalues belong in an algebra program as much as in a physics one.

The Fibonacci matrix

The Fibonacci numbers 1, 1, 2, 3, 5, 8, 13, ... obey \(F_{n+1} = F_n + F_{n-1}\), which can be written as a matrix acting on a pair of consecutive terms:

\[ \begin{pmatrix} F_{n+1} \\ F_n \end{pmatrix} = \begin{pmatrix} 1 & 1 \\ 1 & 0 \end{pmatrix} \begin{pmatrix} F_n \\ F_{n-1} \end{pmatrix}. \]

So the \(n\)-th Fibonacci number is read off from the \(n\)-th power of the matrix. Its characteristic polynomial is \(\lambda^2 - \lambda - 1\), with roots \(\phi = (1 + \sqrt 5)/2 = 1.6180\ldots\) and \(\psi = (1 - \sqrt 5)/2 = -0.6180\ldots\). Along the eigenvector of \(\phi\) the matrix multiplies by \(\phi\) at each step, along the other it multiplies by \(\psi\), and the starting vector \((1, 0)\) splits into a piece in each direction. The result is Binet's formula,

\[ F_n = \frac{\phi^n - \psi^n}{\sqrt 5}, \]

which also explains two things everyone notices about the sequence: the ratio of consecutive terms tends to \(\phi\), the golden ratio, because \(\psi^n\) dies away, and the formula contains \(\sqrt 5\) because the characteristic polynomial does. Unit 11 derives this and then does the same for any linear recurrence, which is how the growth rates of populations, of compound interest with a lag, and of recursive algorithms are found.

Markov chains and where they settle

Andrey Markov introduced his chains in 1906 to show that the law of large numbers holds for dependent events, and in 1913 he applied them to the first 20,000 letters of Pushkin's Eugene Onegin, classifying each as vowel or consonant and counting how often each follows each. A Markov chain is a system that moves between finitely many states, with the probability of the next state depending only on the current one. The probabilities form a matrix \(P\), and if the row vector \(\mathbf{p}\) gives the probabilities of being in each state today, then \(\mathbf{p}P\) gives them tomorrow and \(\mathbf{p}P^n\) in \(n\) days.

The question of what happens in the long run is an eigenvector question. A distribution \(\boldsymbol{\pi}\) with \(\boldsymbol{\pi}P = \boldsymbol{\pi}\) is an eigenvector of \(P\) with eigenvalue 1, and it is the distribution the chain settles into: start anywhere, run long enough, and the probabilities approach \(\boldsymbol{\pi}\). A theorem of Oskar Perron (1907) and Georg Frobenius (1912) guarantees that for a chain in which every state can be reached from every other, and which does not cycle with a fixed period, such a \(\boldsymbol{\pi}\) exists, is unique, has positive entries, and attracts every starting distribution. A toy weather model with the states sunny and rainy, in which a sunny day is followed by a sunny one with probability 0.9 and a rainy day by a rainy one with probability 0.5, has the stationary distribution \((5/6, 1/6)\), which is the long-run fraction of sunny days whatever the weather was on the first day. Unit 11 works this example and explains why the other eigenvalues, all of modulus less than 1, decide how quickly the chain forgets its start.

The eigenvector of the web

In 1998 Sergey Brin and Larry Page, two graduate students at Stanford, described in a paper called The Anatomy of a Large-Scale Hypertextual Web Search Engine a way of ranking web pages that did not depend on their text. Picture a surfer who starts on a random page and, at each step, follows a random link from the page they are on. The web is then a Markov chain with one state per page, and the question "which pages are important" becomes "where does the surfer spend most time in the long run", which is the stationary distribution of the chain. A page's PageRank is its entry in the eigenvector \(\boldsymbol{\pi}\) of the link matrix with eigenvalue 1. A page is important when important pages link to it, and that circular-sounding definition is made precise, and made solvable, by the eigenvector.

Two adjustments make the theorem of Perron and Frobenius apply. Pages with no outgoing links would trap the surfer, so from such a page the surfer jumps to a random page. And to guarantee that every page is reachable, the surfer is made to abandon the links with probability 0.15 at each step and jump anywhere; the figure 0.85 for following links is the damping factor of the original paper. With these changes the matrix has a unique stationary vector with positive entries, and it can be found by the simplest method there is: start from any distribution and multiply by the matrix again and again, which is called the power method and converges because the second-largest eigenvalue is at most 0.85. In 1998 the web had about 24 million pages in Brin and Page's crawl; the eigenvector of a matrix of that size, found by repeated multiplication, became the first version of Google.

What the three have in common

In each case a process is repeated, and repeating a matrix \(A\) means forming \(A^n\), and powers of a matrix are easy to understand only along the eigenvectors, where \(A^n\) is just \(\lambda^n\). The largest eigenvalue governs growth, the eigenvector that goes with it governs the shape the system settles into, and the ratio of the second eigenvalue to the first governs how quickly. That is the content of Unit 11, which builds vector spaces, bases, and linear maps from the matrices of Unit 4 and then proves the facts about eigenvalues used above, including the Cayley-Hamilton theorem that every matrix satisfies its own characteristic polynomial. The research spotlight of the same unit presents Daniel Spielman's work on spectral graph theory, which reads the shape of a network from the eigenvalues of its matrix and is the current research descendant of Markov's letters and Page's surfer. For Markov himself, the MacTutor biography includes his quarrel with the Russian Academy and the chain he computed by hand. The curriculum has the rest.

Study algebra properly

The Algebra Masterclass: weekly units, quizzes, a final exam, and a certificate.
About the program