Question: The **Perron Frobenius theorem** states:

> 
> Any square matrix $A$ with positive entries has a unique eigenvector with
>  positive entries (up to a multiplication by a positive scalar), and
>  the corresponding eigenvalue has multiplicity one and is strictly
>  greater than the absolute value of any other eigenvalue.
> 
> 
> 

---

So I **tempted fate** using this matrix:

$$ A =\begin{bmatrix} 1 & 1 \\ 1 & 1 \end{bmatrix}$$

I find my eigenvalues to be $\lambda\_1 = 0, \lambda\_2 = 2$

Now I find my eigenvector, taking $v\_{11} = 1$, $v\_{21} = 1$

I find 
$v\_1 = \begin{bmatrix} v\_{11} & v\_{12} \end{bmatrix}$ = $\begin{bmatrix} 1 & -1 \end{bmatrix}$

$v\_1 = \begin{bmatrix} v\_{21} & v\_{22} \end{bmatrix}$ = $\begin{bmatrix} 1 & 1 \end{bmatrix}$

**This verifies the Perron-Frobenius theorem.**

---

Now what is the great implication that every positive square matrix has a real eigenvector with an eigenvalue that is the largest of all eigenvalues?

Can someone show me an application of this theorem?

Answer: 
The Perron-Frobenius theorem is used in Google's Pagerank. It's one of the things that make sure that the algorithm works. [Here](http://www.math.pku.edu.cn/teachers/yaoy/Fall2011/lecture07.pdf) it's explained why the the theorem is useful, you have a lot of information with easy explanations on Google.
First of all, the conclusion is more interesting if you also try an example where the matrix entries are still real, but not positive. For example, if $A$ is the $2\times2$ rotation matrix
$$A=\pmatrix{\cos\theta&\sin\theta\\ -\sin\theta&\cos\theta}$$
then you can check that the eigenvectors are no longer real, and there's no longer a unique eigenvalue of maximum modulus: the two eigenvalues are $e^{i\theta}$ and $e^{-i\theta}$.

I second Robert Israel's nomination of Markov chains as a great application. I'll add the following, though. (I'll remark that you don't actually need the matrix to have positive entries - just for some power of it to have positive entries.) Suppose you have a finite connected graph (or strongly connected digraph) such that the gcd of the cycle lengths is $1$. Then if $A$ is the adjacency matrix for the graph, some power $A^r$ will have positive entries so Perron-Frobenius applies. Since the entries of $A^n$ count paths in the graph, we conclude that for any pair of vertices in the graph, the number of paths of length $n$ between them is $c\lambda\_1^n(1+o(1))$, where $\lambda\_1$ is the Perron-Frobenius eigenvalue and $c$ is a computable constant. Applications of this particular consequence of Perron-Frobenius include asymptotic growth rate results for "regular languages," which are defined in terms of paths on graphs.

In particular, there is a cute formula giving the $n$-th Fibonacci number as
$$F\_n=\left\langle \frac1{\sqrt5}\phi^n\right\rangle$$
where $\phi$ is the "golden ratio" $(1+\sqrt5)/2$ and $\langle\cdot\rangle$ denotes "closest integer." This formula, and many others like it, become less surprising
once you check that
$$\pmatrix{1&1\\1&0}^n=\pmatrix{F\_{n+1}&F\_n\\ F\_n&F\_{n-1}}$$
and note that $\phi$ is the Perron-Frobenius eigenvalue (and the other eigenvalue is smaller than $1$ in absolute value.)