P = [3/4 0 0; 1/8 3/4 1/4; 1/8 1/4 3/4]

X0 = [1; 0; 0]
P*X0
P^2*X0
P^3*X0
P^10*X0
v = P^100*X0
P*v

[S, D] = eig(P)

clc
P = [0 1; 1 0]
%repeat the same experiment