# How to find the sum of all entries in the matrix $A^5$

Let $A$ be a $4 × 4$ matrix with non-negative entries such that the sum of the entries in each row of $A$ equals $1$. Find the sum of all entries in the matrix $A^5$.

If $A=I_4$ then $A^5=I_4$ and sum of all entries in the matrix $A^5=4$. But how I show the general result. Please help.

-

Let $j=\left(\begin{matrix}1\\\vdots\\1\end{matrix}\right)$. Then the sum of entries of matrix $A^5$ is just $j^TA^5j$. What can you say about $Aj$?
I think $Aj=j$. Am I correct? –  A.D Jan 27 '13 at 13:55
@A.D Yes, because $(1,j)$ is an eigenpair of $A$. –  Git Gud Jan 27 '13 at 13:57