<s>[INST] Markov's Chain stationary matrix determination I have the following transition matrix $P$
\begin{equation}
P=
\begin{pmatrix}
1/2 & 1/3 & 1/6\\
1/4 & 3/4 & 0\\
1/5 & 2/5 & 2/5
\end{pmatrix}
\end{equation}
I have tried to calculate the stationary matrix as
\begin{equation}
P^n= C D^n C^{-1} 
\end{equation}
With $D=C^{-1} P C$ the diagonal matrix. Calculating $C$ with the eigenvalues and eigenvectors
\begin{equation}
C=
\begin{pmatrix}
v_1 & w_1 & z_1\\
v_2 & w_2 & z_2\\
v_3 & w_3 & z_3
\end{pmatrix}
\end{equation}
where the eigenvectors are
\begin{align}
\vec{v} =\langle (v_1,v_2,v_3)\rangle &= \langle(1,1,1)\rangle \\
\vec{w} =\langle(w_1,w_2,w_3)\rangle &= \langle\left(\frac{2i\sqrt{39}+3}{6},\frac{-3i\sqrt{39}-7}{16},1\right)\rangle \\
\vec{v} =\langle(v_1,v_2,v_3)\rangle &= \langle\left(\frac{-2i\sqrt{39}+3}{6},\frac{3i\sqrt{39}-7}{16},1\right)\rangle \\
\end{align}
so the diagonal matrix is
\begin{equation}
D=
\begin{pmatrix}
1 & 0 & 0\\
0 & \frac{-i\sqrt{39}+39}{120} & 0\\
0 & 0 & \frac{i\sqrt{39}+39}{120}
\end{pmatrix}
\end{equation}
how can i calculate $D^{n}$? is the diagonalization correct?
I tried by other way using $BP=B$ where B is the final vector state, then
\begin{align}
[p_1 \quad p_2 \quad p_3]  \begin{pmatrix}
1/2 & 1/3 & 1/6\\
1/4 & 3/4 & 0\\
1/5 & 2/5 & 2/5
\end{pmatrix} = [p_1 \quad p_2 \quad p_3]
\end{align}
using Gauss-Jordan elimination for solving this system it gives me infinite solutions.
I dont know if it is a problem with the transition matrix.
 [/INST] Since $1$ is the dominant eigenvalue of the Markov Chain (the derivation of that fact can be found elsewhere, thus I leave that up to the reader to investigate if desired), all we need to solve is
$$ \begin{bmatrix} 1/2 & 1/4 & 1/5 \\1/3 & 3/4 & 2/5 \\ 1/6 & 0 & 2/5 \end{bmatrix} \begin{bmatrix} x  \\y \\ z \end{bmatrix}= \begin{bmatrix} x  \\y \\ z \end{bmatrix}$$
Solving gives infinite (why?) solutions as follows: $x=3.6z,y=6.4z$  with $z$ free. Using the constraint $x+y+z=1$ we find $z=18/55,y=32/55,z=1/11$ and thus we find for the Stationary matrix: $$ \begin{bmatrix} 18/55 & 18/55 & 15/55 \\32/55 & 32/55 & 32/55 \\ 1/11 & 1/11 & 1/11 \end{bmatrix}$$ The rudiments of the calculations is nothing but row operations (Gauss Elimination)
</s>