$M =\begin{bmatrix}40&1\\-1&40\end{bmatrix}$
I've found that the eigenvalues and eigenvectors for this given 2x2 matrix is
$\lambda= \left\{\begin{matrix} 40+i\\ 40-i\\ \end{matrix}\right.$
$v_{1}=[-i,1], v_{2}=[i,1]$
write the start vectors
$$\begin{bmatrix}x_{0}\\y_{0}\end{bmatrix}=\begin{bmatrix}2\\80\end{bmatrix}$$
as a linear combination of the eigenvectors from the matrix M, and use this to show that
$$y_{n}=(40+i)^{n+1}+(40-i)^{n+1}$$ for $$n\geq0$$
This is what I did
$$L=\begin{bmatrix}-i&i&2\\1&1&80\end{bmatrix}$$
I'll skip the calculation, but what I did was rref it which yielded me this as answer
$$RREF(L) =\begin{bmatrix}1&0&40+i\\0&1&40-i\end{bmatrix}$$
which gives me that
$$x=40+i$$
$$y=40-i$$
Q:but i don't know why and how I should get it for $y_{n}$
ps it also mentions that $x_{n+1}=40x_{n}+y_{n}$, $y_{n+1}=40y_{n}-x_{n}$
EDIT: Forgot to mention this: $y_n$ is the amount of mean beetles and $x_n$ is the amount of nice beetles by the time $t=n$ where the time is in weeks
Note that$$\begin{bmatrix}x_0\\y_0\end{bmatrix}=\begin{bmatrix}2\\80\end{bmatrix}=(40+i)\begin{bmatrix}-i\\1\end{bmatrix}+(40-i)\begin{bmatrix}i\\1\end{bmatrix}.$$So\begin{align}\begin{bmatrix}x_n\\y_n\end{bmatrix}&=M^n.\begin{bmatrix}x_0\\y_0\end{bmatrix}\\&=(40+i)^{n+1}\begin{bmatrix}-i\\1\end{bmatrix}+(40-i)^{n+1}\begin{bmatrix}i\\1\end{bmatrix}\end{align}and therefore $y_n=(40+i)^{n+1}+(40-i)^{n+1}$.