TITLE: I need to calculate $x^{50}$
QUESTION [18 upvotes]: $x=\begin{pmatrix}1&0&0\\1&0&1\\0&1&0\end{pmatrix}$, I need to calculate $x^{50}$
Could anyone tell me how to proceed?
Thank you.

REPLY [28 votes]: The graph with adjacency matrix $$x:=\begin{pmatrix}1&0&0\\1&0&1\\0&1&0\end{pmatrix}$$
is drawn below:

For $i,j \in \{1,2,3\}$, the element in cell $(i,j)$ in $x^{50}$ is the number of walks from vertex $i$ to vertex $j$ of length $50$ in the above graph.
We can thus immediately deduce from the graph structure that $x^{50}$ has the form $$x^{50}:=\begin{pmatrix}1&0&0\\?&1&0\\?&0&1\end{pmatrix}$$ since $50$ is even.
With a bit of thought, we can surmise that there are $25$ walks from vertex $2$ to vertex $1$ of length $50$ (we can land at vertex $1$ after step $1,3,\ldots,49$, after which the walk is determined).  Similarly, there are $25$ walks from vertex $3$ to vertex $1$ of length $50$.
Hence $$x^{50}:=\begin{pmatrix}1&0&0\\25&1&0\\25&0&1\end{pmatrix}.$$