I'm trying to understand the statement:
The probability in going form state $i$ to state $j$ in $n$ steps is given by $$\left(P^n\right)_{i,j}$$
this is followed by an example for $k=2$ steps:
$$P_{i,1}P_{1,j} + P_{i,2}P_{2,j} + ... + P_{i,n}P_{n,j} = \sum_{k=1}^n P_{i,k}P_{k,j} = \left(P^2\right)_{i,j}$$
to be honest, this doesn't make much sense to me, why does this work? The only way that I'm maybe getting it is by going about it like so:
- take the i,j indices to the outside:
$$P_{i,1}P_{1,j} + P_{i,2}P_{2,j} + ... + P_{i,n}P_{n,j} \tag 1$$
$$=\left(P_{1,1}P_{1,1} + P_{2,2}P_{2,2} + ... + P_{n,n}P_{n,n}\right)_{i,j} \tag 2$$
$$= \left( P_{1,1}^2 + P_{2,2}^2 + ... + P_{n,n}^2 \right)_{i,j} \tag3$$
but I'm unsure that's true, and if it is, how is it that (3) is equal to $\left(P^2\right)_{i,j}$