A stochastic matrix is one which each column sum equal one.
$$P= \begin{bmatrix} P_{11} & P_{12} & \ldots & P_{1N} \\ P_{21} & P_{22} & \ldots & P_{2N} \\ \ldots & \ldots & \ldots & \ldots \\ P_{N1} & P_{N2} & \ldots & P_{NN} \end{bmatrix}$$
Show that is $P$ is a stochastic matrix. Then $P^2$ is a stochastic matrix.
Then show $P^n$ is stochastic for all postive integer N.
I am not sure how to do this I think by induction. I know stochastic is that $\forall i $ $\sum_{j=1}^{N}p_{ij}=1$
Let $e$ be the all one-matrix, the condition for $P$ to be a stochastic matrix can be rewritten as $$e^TP=e^T.$$
Now, let me try to show that $P^2$ is a stochastic matrix.
$$e^TP^2=(e^TP)P=(e^T)P=e^TPe=e^T$$
Hence $P^2$ is stochastic.
I will leave the case for $P^n$ as an exercise.