As a sidebar, it is important to know (at least when finding the root of a transition matrix) that if A= P'EP and B =R'SR where E and S are a diagonal matrix of eigenvalues. The P and R matrices are composed of the respective eigenvectors, and PP' = RR' = I. Then:
A^n = P'(E^n)P and B^n = R'(S^n)R
Note, A*A = P'(E)PP'(E)P = P'(E)I(E)P = P'(E^2)P
so one only needs to raise the diagonal elements (the eigenvalues) to the power of n (where n can also be a fraction, that is, taking a root).
As such, (A^n)*(B^n) = P'(E^n)P*R'(S^n)R