How to calculate row sums of a power of a matrix Let $P $ be an $n\times n$ matrix  whose  row sums $=1$.Then how to calculate the row sums of $P^m$ where $m $ is  a positive integer?
 A: The row sums of any power of $P$ are always 1. To see this, write $[P]_{ij}:=p_{ij}$. Then
$$[P^2]_{ij}=\sum_{k}^np_{ik}p_{kj}$$
and
$$\sum_{j=1}^n[P^2]_{ij}=\sum_{j=1}^n\sum_{k=1}^np_{ik}p_{kj}=\sum_{k=1}^np_{ik}\sum_{j=1}^np_{kj}=\sum_{k=1}^np_{ik}\cdot 1=1.$$
Then the result for $P^m$ follows by induction.
A: A generalization:  if $P$ and $Q$ are two such matrices, the rows of $PQ$ also sum to $1$.  For with
$P = [p_{ij}] \tag{1}$
and
$Q = [q_{ij}] \tag{2}$
with
$\sum_j p_{ij} = \sum_j q_{ij} = 1, \tag{3}$
then
$\sum_k (PQ)_{ik} = \sum_k \sum_j p_{ij}q_{jk} = \sum_j \sum_k p_{ij} q_{jk} = \sum_j p_{ij} \sum_k q_{jk} = \sum_j p_{ij} = 1. \tag{4}$
From this it follows, via a simple induction, that if $P_l$, $1 \le l \le m$, are $m$ such matrices, then
$\sum_j (\prod_1^m P_l)_{ij} = 1, \tag{5}$
for clearly if (5) holds for some $m$, then taking $P = \prod_1^m P_l$ and $Q = P_{m + 1}$ we may apply (4) to conclude that the row sums of $\prod_1^{m + 1} P_l$ are also $1$; (4)  forms a base for the induction.  Now taking $P_l = P$, $1 \le l \le m$ for any $m$ yields the specific result requested in the text of the question:
$\sum_j (P^m)_{ij} = 1. \tag{6}$
QED.
Note:  While were on the theme of generalization, it should be observed that the entries of the $P_l$ may be taken $\Bbb Z$, $\Bbb Q$, $\Bbb R$, or $\Bbb C$, and the result will bind.  Leaping further, the assertion proved here holds as long as the entries of the $P_l$ are taken from any unital ring $R$, commutative or not, from $\Bbb Z_2$ to $B(X)$, the set of bounded operators on a Banach space $X$ and beyond, as long as ring $R$ has a unit, these matrices may be taking from any $M_n(R)$, and as long as the $P_l$ satisfy
$\sum_j (P_l)_{ij} = 1_R, \tag{7}$
so will their product.  A result of quite broad scope, indeed! End of Note.
Hope this helps.  Cheerio,
and as ever,
Fiat Lux!!!
A: Since every row of $P$ sums to $1$, $v=[1,1,...,1]^T$ is an eigenvector of $P$ with eigenvalue $1$. Thus $Pv=v\implies P^2v=P(Pv)=Pv=v \implies P^mv=v$, thus every row of $P^m$ sums to $1$ .
