There are 3 ways to walk from B to B in two steps:
![{\displaystyle B\rightarrow B\rightarrow B,\qquad B\rightarrow A\rightarrow B,\qquad B\rightarrow C\rightarrow B.}](https://wiki.ubc.ca/api/rest_v1/media/math/render/svg/7b944c45796cee49b4468dd5f12715fbd8119204)
Each individual path has probability
, for
, and where
is the probability of going from vertex
to vertex
(which is also the
entry of the transition matrix computed in the previous question). The total probability of starting at B and ending at B after two steps is the sum
![{\displaystyle p_{2,1}\cdot p_{1,2}+p_{2,2}\cdot p_{2,2}+p_{2,3}\cdot p_{3,2}=0.2\cdot 0.2+0.6\cdot 0.6+0.4\cdot 0.2=0.48,}](https://wiki.ubc.ca/api/rest_v1/media/math/render/svg/cfc8a7bb675797e23667fbcc155a9cce9653b528)
which is the (2,2) entry of the transition matrix squared.