How do you find the transition matrix