##### Objectives
1. Learn examples of stochastic matrices and applications to difference equations.
2. Recipe: find the steady state of a positive stochastic matrix.
3. Picture: dynamics of a positive stochastic matrix.
4. Theorem: the Perron–Frobenius theorem.
5. Vocabulary: difference equation, (positive) stochastic matrix, steady state, importance matrix, Google matrix.

# Subsection6.7.1An eigenvalue of 1

If a discrete dynamical system is such that has an eigenvalue of then something interesting happens. If happens to be an eigenvector for the eigenvalue then

That is, if the state of the system is ever an eigenvector for the eigenvalue then the system will stay in that state forever. The state is said to be a steady state for the system.

A common occurrence is when is diagonalizable, has the eigenvalue and when every other eigenvalue of satisfies In this case, the long-term behaviour of the system will be to converge to a steady state.

##### Example

Here is an example that appeared in Section 6.6. The matrix is and the initial state is

The eigenvalues of are and It is an upper-triangular matrix, which makes this calculation quick. An eigenvector for can be found: and an eigenvector for is

Now, let's write as a linear combination of

Using the recipe in Section 6.6, we can calculate the general term

Because of the special property of the number this simplifies a little to

and as the quantity tends to This means that as time passes, the state of the system converges to

# Subsection6.7.2Probabilities

In this subsection, we discuss difference equations representing probabilities, like the truck rental example in Section 6.6. Such systems are called Markov chains. The most important result in this section is the Perron–Frobenius theorem, which describes the long-term behavior of a Markov chain.

##### Note

Not every example of a discrete dynamical system with an eigenvalue of arises from a Markov chain. For instance, the example in Section 6.6 does not.

##### Definition

A square matrix is stochastic if all of its entries are nonnegative, and the entries of each column sum to

A matrix is positive if all of its entries are positive numbers.

A positive stochastic matrix is a stochastic matrix whose entries are all positive numbers. In particular, no entry is equal to zero. For instance, the first matrix below is a positive stochastic matrix, and the second is not:

##### Example

Continuing with the truck rental example in Section 6.6, the matrix

is a positive stochastic matrix. The fact that the columns sum to says that all of the trucks rented from a particular location must be returned to some other location (remember that every customer returns the truck the next day). For instance, the first column says:

Of the trucks rented from location

The sum is as all of the trucks are returned to one of the three locations.

The matrix represents the change of state from one day to the next:

If we sum the entries of we obtain

This says that the total number of trucks in the three locations does not change from day to day, as we expect.

The fact that the entries of the vectors and sum to the same number is a consequence of the fact that the columns of a stochastic matrix sum to

Let be a stochastic matrix, let be a vector, and let Then the sum of the entries of equals the sum of the entries of

The eigenvalues of stochastic matrices have very special properties.

In fact, for a positive stochastic matrix one can show that if is a (real or complex) eigenvalue of then The -eigenspace of a stochastic matrix is very important.

##### Definition

Recall that a steady state of a difference equation is an eigenvector with eigenvalue If we are talking about stochastic matrices in particular, then we will further require that the entries of the steady-state vector are normalized so that the entries are non-negative and sum to

The Perron–Frobenius theorem describes the long-term behavior of a difference equation represented by a stochastic matrix. Its proof is beyond the scope of this text.

Translation: The Perron–Frobenius theorem makes the following assertions:

• The -eigenspace of a positive stochastic matrix is a line.
• The -eigenspace contains a vector with positive entries.
• All vectors approach the -eigenspace upon repeated multiplication by

One should think of a steady state vector as a vector of percentages. For example, if the movies are distributed according to these percentages today, then they will be have the same distribution tomorrow, since And no matter the starting distribution of movies, the long-term distribution will always be the steady state vector.

The sum of the entries of is the total number of things in the system being modeled. The total number does not change, so the long-term state of the system must approach it is a multiple of because it is contained in the -eigenspace, and the entries of sum to

##### Recipe 1: Compute the steady state vector

Let be a positive stochastic matrix. Here is how to compute the steady-state vector of

1. Find any eigenvector of with eigenvalue by solving
2. Divide by the sum of the entries of to obtain a normalized vector whose entries sum to
3. This vector automatically has positive entries. It is the unique normalized steady-state vector for the stochastic matrix.

The above recipe is suitable for calculations by hand, but it does not take advantage of the fact that is a stochastic matrix. In practice, it is generally faster to compute a steady state vector by computer as follows:

##### Recipe 2: Approximate the steady state vector by computer

Let be a positive stochastic matrix. Here is how to approximate the steady-state vector of with a computer.

1. Choose any vector whose entries sum to (e.g., a standard coordinate vector).
2. Compute etc.
3. These converge to the steady state vector
##### Example

Continuing with the truck rental example, we can illustrate the Perron–Frobenius theorem explicitly. The matrix

has characteristic polynomial

Notice that is strictly greater in absolute value than the other eigenvalues, and that it has algebraic (hence, geometric) multiplicity We compute eigenvectors for the eigenvalues to be, respectively,

The eigenvector necessarily has positive entries; the steady-state vector is

The eigenvectors form a basis for for any vector in we have

Iterating multiplication by in this way, we have

as This shows that approaches which is an eigenvector with eigenvalue , as guaranteed by the Perron–Frobenius theorem.

What do the above calculations say about the number of trucks in the rental locations? Suppose that the locations start with 100 total trucks, with trucks at location 1, trucks at location and trucks at location Let be the vector describing this state. Then there will be trucks at the locations the next day, the day after that, and so on. We let

(Of course it does not make sense to have a fractional number of trucks; the decimals are included here to illustrate the convergence.) The steady-state vector says that eventually, the trucks will be distributed in the kiosks according to the percentages

which agrees with the above table. Moreover, this distribution is independent of the beginning distribution of trucks at locations.

Now we turn to visualizing the dynamics of (i.e., repeated multiplication by) the matrix This matrix is diagonalizable; we have for

The matrix leaves the -coordinate unchanged, scales the -coordinate by and scales the -coordinate by Repeated multiplication by makes the - and -coordinates very small, so it “sucks all vectors into the -axis.”

The matrix does the same thing as but with respect to the coordinate system defined by the columns of This means that “sucks all vectors into the -eigenspace”, without changing the sum of the entries of the vectors.

The picture of a positive stochastic matrix is always the same, whether or not it is diagonalizable: all vectors are “sucked into the -eigenspace,” which is a line, without changing the sum of the entries of the vectors. This is the geometric content of the Perron–Frobenius theorem.

Internet searching in the 1990s was very inefficient. Yahoo or AltaVista would scan pages for your search text, and simply list the results with the most occurrences of those words. Not surprisingly, the more unsavory websites soon learned that by putting the words “Alanis Morissette” a million times in their pages, they could show up first every time an angsty teenager tried to find Jagged Little Pill on Napster.

Larry Page and Sergey Brin invented a way to rank pages by importance. They founded Google based on their algorithm. Here is roughly how it works.

Each web page has an associated importance, or rank. This is a positive number. This rank is determined by the following rule.

##### The Importance Rule

If a page links to other pages then each page inherits of ’s importance.

In practice, this means:

• If a very important page links to your page (and not to a zillion other ones as well), then your page is considered important.
• If only one unknown page links to yours, your page is not important.

Alternatively, there is the random surfer interpretation. A “random surfer” just sits at his computer all day, randomly clicking on links. The pages he spends the most time on should be the most important. So, the important (high-ranked) pages are those where a random surfer will end up most often. This measure turns out to be equivalent to the rank.

##### The Importance Matrix

Consider an internet with pages. The importance matrix is the matrix whose -entry is the importance that page passes to page

Observe that the importance matrix is a stochastic matrix, assuming every page contains a link: if page has links, then the th column contains the number times, and the number zero in the other entries.

##### Example

Consider the following internet with only four pages. Links are indicated by arrows.

The importance rule says:

• Page has links, so it passes of its importance to pages
• Page has links, so it passes of its importance to pages
• Page has one link, so it passes all of its importance to page
• Page has links, so it passes of its importance to pages

In terms of matrices, if is the vector containing the ranks of the pages then

The matrix on the left is the importance matrix, and the final equality expresses the importance rule.

The above example illustrates the key observation.

##### Key Observation

The rank vector is an eigenvector of the importance matrix with eigenvalue

In light of the key observation, we would like to use the Perron–Frobenius theorem to find the rank vector. Unfortunately, the importance matrix is not always a positive stochastic matrix.

Here is Page and Brin’s solution. First we fix the importance matrix by replacing each zero column with a column of s, where is the number of pages:

The modified importance matrix is always stochastic.

Now we choose a number in called the damping factor. (A typical value is )

Let be the importance matrix for an internet with pages, and let be the modified importance matrix. The Google Matrix is the matrix

In the random surfer interpretation, this matrix says: with probability our surfer will surf to a completely random page; otherwise, he'll click a random link on the current page, unless the current page has no links, in which case he'll surf to a completely random page in either case.

The reader can verify the following important fact.

If we declare that the ranks of all of the pages must sum to then we find: