In this lecture, we will prove the Fundamental Theorem of Markov Chains and discuss the PageRank algorithm.
In order to prove the Fundamental Theorem of Markov Chains, we need to review some concepts from linear algebra.
Linear Algebra Review
Eigenvalues, Eigenvectors, and Spectral Radius
Given a square matrix , a scalar is called an eigenvalue of if there exists a non-zero unit vector (that is, ) such that .
The vector is called an eigenvector of corresponding to the eigenvalue .
The eigenvalues of a matrix are the roots of the characteristic polynomial , where is the identity matrix of size . The characteristic polynomial is a univariate polynomial of degree in the variable .
The eigenspace corresponding to an eigenvalue is the set of all eigenvectors corresponding to , together with the zero vector. The eigenspace corresponding to an eigenvalue is a subspace of .
There are two ways of defining the multiplicity of an eigenvalue :
- The algebraic multiplicity of an eigenvalue is the multiplicity of as a root of the characteristic polynomial.
- The geometric multiplicity of an eigenvalue is the dimension of the eigenspace corresponding to .
These two notions of multiplicity are equal for symmetric matrices (by the spectral theorem), but can differ for non-symmetric matrices.
For instance, the matrix
has a single eigenvalue with algebraic multiplicity 2 and geometric multiplicity 1.
The spectral radius of a matrix is defined as
The Frobenius norm of a matrix is defined as
$$|A|F = \sqrt{\sum{i=1}^n \sum_{j=1}^n A_{ij}^2} = \sqrt{\text{trace}(A^T A)}.$$
Note that the Frobenius norm of a matrix upper bounds the spectral radius of the matrix, i.e., .
One can see this as follows:
Let be an eigenvalue of with eigenvector .
Then, we have
Note that the above argument also shows that the following inequality holds for any unit vector :
Proposition 1 (Gelfand’s formula): For any matrix , we have
For two vectors , we say that if for all .
We say that if and .
With this definition at hand, we have the following easy lemma.
Lemma 2 (Positivity Lemma): Let be a positive matrix, i.e., for all .
Let be distinct vectors such that .
Then, we have .
Moreover, there is such that .
Proof: Since , and we have and .
Let .
Then, we have
Therefore, .
The moreover part follows from taking a small enough .
We are now ready to state and prove the main tool that we will use to prove the Fundamental Theorem of Markov Chains.
Perron-Frobenius Theorem
We begin with Perron’s theorem for positive matrices.
Theorem 3 (Perron’s Theorem): Let be a positive matrix.
Then, the following hold:
- The spectral radius is an eigenvalue of , and it has a positive eigenvector .
- is the only eigenvalue of in the complex circumference .
- has geometric multiplicity 1.
- is simple, i.e., its algebraic multiplicity is 1.
Proof: By definition of , there exists an eigenvalue of such that .
Let be an eigenvector corresponding to .
Let be defined as for all .
Then, we have
Therefore, .
If the inequality is strict, then by Lemma 2 we have , and there is some such that .
By induction, we have for all .
Hence, by Gelfand’s formula, by setting , we have
which is a contradiction.
Therefore, the inequality must be an equality, and is a non-negative eigenvector of corresponding to .
However, since is positive, the eigenvector must be positive, as
This proves the first part of the theorem.
To prove the second part, let be an eigenvalue of such that , but .
Let be an eigenvector corresponding to .
Let be defined as for all .
Then, by the above discussion, we must have
From the above conditions, we can deduce that there is such that (as the triangle inequality must be an equality).
But in this case, we have , which is a contradiction. This proves the second part of the theorem.
Now we are ready to prove item 3: the geometric multiplicity of is 1.
Suppose, for the sake of contradiction, that the geometric multiplicity of is greater than 1.
Let be linearly independent eigenvectors corresponding to (by the above discussion, we know that such eigenvectors must be real vectors).
Let be such that and at least one of the components of is zero.
Note that as and are linearly independent.
Then, by Lemma 2, we have
which contradicts the fact that has a zero component.
This proves the third part of the theorem.
Finally, we prove the fourth part of the theorem: the algebraic multiplicity of is 1.
Let be a positive eigenvector corresponding to , and let be a positive eigenvector of , corresponding to (which is equal to , by Gelfand’s formula).
We know exists by the first part of the theorem.
Claim: the space is invariant under .
Proof of Claim: Let .
Then, we have .
Note that is a subspace of of dimension , and , as , since both vectors are positive.
Hence, we have that is the direct sum of and .
Let be a basis of , and be the matrix whose columns are .
By the above, is invertible, and we have that leaves the subspaces and invariant.
Thus, is a block matrix of the form
Since and are similar, they have the same eigenvalues.
Moreover, we have .
Thus, if had algebraic multiplicity greater than 1, then would have as an eigenvalue, and therefore would have as an eigenvalue with geometric multiplicity greater than 1, which is a contradiction.
This proves the fourth part of the theorem.
The Perron-Frobenius theorem is a generalization of Perron’s theorem to non-negative matrices.
Theorem 4 (Perron-Frobenius Theorem): Let be a non-negative matrix, which is irreducible and aperiodic.
Then, the following hold:
- The spectral radius is an eigenvalue of , and it has a positive eigenvector .
- is the only eigenvalue of in the complex circumference .
- has geometric multiplicity 1.
- is simple, i.e., its algebraic multiplicity is 1.
Proof: By Lemma 1 of Lecture 9, we know that there is a positive integer such that is positive.
Apply Perron’s theorem to , and note that the eigenvalues of are the -th powers of the eigenvalues of , with the same eigenvectors.
Fundamental Theorem of Markov Chains
We are now ready to prove (most of) the Fundamental Theorem of Markov Chains.
Theorem 5 (Fundamental Theorem of Markov Chains): Let be the transition matrix of a finite, irreducible and aperiodic Markov chain.
Then, the following statements hold:
- There exists a unique stationary distribution of the Markov chain, where for all , where is the number of states of the Markov chain.
- For any initial distribution , we have
- The stationary distribution is given by
Proof: We will prove items 1 and 2 of the theorem.
As is the transition matrix of an irreducible and aperiodic Markov chain, we know that is non-negative, irreducible, and aperiodic.
By the Perron-Frobenius theorem, we know that there exists a unique positive eigenvector of corresponding to the spectral radius .
Moreover, we know that , since for any non-negative vector with , we have , as it is the probability distribution of the next state of the Markov chain.
Hence is the unique stationary distribution of the Markov chain.
To prove item 2, let the the change of basis matrix used in the proof of Perron’s theorem.
Then, we have that is a block matrix of the form
where is a matrix of size with eigenvalues strictly inside the unit circle, which implies that .
Thus, we have that and therefore .