# Solving a Matrix Difference equation using the Z-transform

Let $T_n$ be a sequence of $2 \times 2$ matrices defined by the difference equation $$T_{n+1} = B T_{n}+AT_{n-1}$$ with initial conditions $T_0 =1, T_1 = B$ where $B$ and $A$ are also $2 \times 2$ matrices which don't commute (the only thing I know about $A$ and $B$ is that the determinant of $A$ is $1$). I want to solve to be able to give a closed form expression for $T_n$ (actually, I would be happy to get a closed form expression for $\det(T_n)$, not $T_n$ itself). I've tried solving this expression using a matrix valued $Z$ transform like one would when $T_n$ is just a sequence of numbers and not matrices.

In particular, define $Z$ transform as $$\Gamma(z) = \sum_{n=0}^{\infty}z^{-n}T_n \equiv \mathcal{Z}[T_n]$$ Using several properties of the $Z$ transform ($\mathcal{Z}[T_{n-1}] =z^{-1}\Gamma(z)$ and $\mathcal{Z}[T_{n+1}] = z \Gamma(z)-z T_0$ ) we arrive at the $Z$ transform of the sequence $T_n$ $$\Gamma(z) = \dfrac{z^2}{z^2-zB-A}$$ The matrix $T_n$ is then give by $$T_n = \dfrac{1}{2\pi i}\oint_\Omega \dfrac{z^{n+1}}{z^2-zB-A}dz$$ where $\Omega$ is a closed curve which circles all the points for which $\det(z^2-zB-A) = 0$. This is a fourth order polynomial in $z$ so let's assume that it has 4 distinct roots in the complex plane. I would like to use the residue theorem $$T_n = \sum_{i=1}^4 \dfrac{z_i^{n+1}}{2z_i-B}$$ where $z_i$ is a root of the polynomial $\det(z^2-zB-A)$. But I'm almost sure this is wrong since, for example, I don't think that $T_0 = 1$. Does anyone have a solution to this problem? Thanks!

In your last equality, $T_n$ is a polynomial in $B$, that is false in general.
A closed form fo $T_n$ seems to me hopeless. It would work if we had (for example) a relation between $A,B$, as $(AB)^2=0$.