The context is essentially Markov chains, but the problem seems more of Linear Algebra.
We have $$P=\left(\begin{matrix}p & 1-p\\1-q & q\end{matrix}\right)$$where $0\leq p,q\leq1$
The task is
To find a pattern in $P^n$ , and eventually find $\lim\limits_{n\to\infty}P^n$
My work:
I found out $$P^2=\left(\begin{matrix}p^2+(1-p)(1-q) & (1-p)(p+q)\\(1-q)(p+q) & q^2+(1-p)(1-q)\end{matrix}\right)$$
and also $P^3$ . (I am not writing it here because it is too clumsy).
I had initially thought to see some pattern, but I failed to see any. How to solve the task?
Idea: Diagonalisation might be of some help.
But I honestly don't know which way to proceed. Please help.
Diagonalizable matrices are "easy" to raise. If you have that $$P=M^{-1}DM$$ then $$P^n=M^{-1}D^n M$$
The main diagonal of $D$ has the eigenvalues of $P$. The eigenvalues are the roots of the polynomial obtained by computing $$\det\begin{pmatrix}p-x&1-p\\1-q&q-x\end{pmatrix}$$
These roots are $1$ and $p+q-1$. If $p+q\neq 2$, these roots are different and $P$ is diagonalizable.
$$\begin{pmatrix}p&1-p\\1-q&q\end{pmatrix}=M^{-1}\begin{pmatrix}1&0\\0&p+q-1\end{pmatrix}M$$
Then $$P^n=M^{-1}\begin{pmatrix}1&0\\0&(p+q-1)^n\end{pmatrix}M$$
$M$ is the matrix of eigen vectors. To find them just write the system $$P\begin{pmatrix}x_j\\y_j\end{pmatrix}=\lambda_j\begin{pmatrix}x_j\\y_j\end{pmatrix}$$ for each eigenvalue $\lambda_j$. These systems must be indeterminate, and their solutions must be the $1$-dimensional spaces generated by the eigenvectors.
For example, for the eigenvalue $1$ we have $$\begin{pmatrix}p&1-p\\1-q&q\end{pmatrix}\begin{pmatrix}x_1\\y_1\end{pmatrix}=\begin{pmatrix}x_1\\y_1\end{pmatrix}$$
This yields: $$(p-1)x_1+(1-p)y_1=0$$ or the equivalent equation $$(1-q)x_1+(q-1)y_1=0$$ That is, an eigenvector for this eigenvalue will be any nonzero vector that satisfies these equations. For example, $(1,1)$.
If $p+q=2$ there is only one (double) eigenvalue: $1$, and the matrix could be non-diagnalizable. But this case is easy: since $p,q\le 1$, $p+q=2$ implies $p=q=1$, and the matrix is the identity.