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: 
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.)
I'll add an answer from the world of symbolic dynamics and tiling theory.

If you have a substitution on some alphabet $\mathcal{A}=\{a\_1,\ldots,a\_k\}$, say something like the Fibonacci substitution $$\sigma\colon\begin{cases}a\mapsto ab\\ b\mapsto a\end{cases}$$ then you have an associated *transition matrix* $M\_{\sigma}$ where $m\_{ij}$ is the number of times the letter $a\_i$ appears in the word $\sigma(a\_j)$. So for example the transition matrix for the Fibonacci substitution is $M\_{\sigma}=\left(\begin{smallmatrix}1&1\\ 1&0\end{smallmatrix}\right)$.

Whenever there exists a $k$ such that $M\_{\sigma}^k$ has strictly positive entries, we say that $\sigma$ is a *primitive* substitution. Transition matrices of primitive substitutions therefore satisfy the hypothesis of the Perron Frobenius theorem and we can say the following thanks to it.

> 
> **Theorem**
>  Let $|w|$ be the length of a word.
>  If $\sigma$ is a primitive substitution, then the PF eigenvalue $\lambda\_{PF}$ has the property that $\lim\_{n\to \infty} |\sigma^n(a\_i)|/\lambda\_{PF} = 1$ for any $a\_i\in\mathcal{A}$. That is, the length of the words $\sigma^n(a\_i)$ are roughly $\lambda\_{PF}^n$.
> 
> 
> If $v\_{PF}$ is the associated dominant right eigenvector then the frequency of letters in the limit word $\sigma^{\infty}(a\_j)$ is given by $\mbox{freq}(a\_i)=(v\_{PF})\_i/\|v\_{PF}\|\_1$, and this is independent of choice of seed letter $a\_j$.
> 
> 
> 

We can use the left eigenvector to assign lengths to intervals in the line which are labelled by the symbols $a\_i$, and we can then think of $\lambda\_{PF}$ as being a natural *expansion factor* for a geometric substitution, whereby we apply $\sigma$ to the interval assigned the letter $a\_i$ by expanding it by a factor of $\lambda\_{PF}$ and then cutting it up into intervals of lengths associated to the eigenvector, and in the order prescribed by the substitution.

A good paper to read more about this stuff, including how we can similarly do substitutions in higher dimensions is [this paper](http://www.sciencedirect.com/science/article/pii/S0723086908000042#) by Natalie Priebe-Frank.