Closed form of function composition Given that $f(x)=\dfrac{x+6}{x+2}$, find $f^{n}(x)$ where $f^{n}(x)$ indicates the $n$th iteration of the function. 
I first tried to find a pattern but there didn't seem to be an obvious one:
$$f(x) = \dfrac{x+6}{x+2}$$
$$f^2(x) = \dfrac{7x + 18}{3x + 10}$$
$$f^3(x) = \dfrac{25x + 78}{13x + 28}$$
$$\vdots$$
Then I tried to find a recurring sequence and find its closed form by induction:
I know that if $f^n(x)=\dfrac{ax+b}{cx+d}$, then substituting and expanding gives $$f^{n+1}(x) = \frac{(a+b)x + 6a + 2b}{(c+d)x + 6c + 2d}$$ 
How do I continue from here? Thanks.
 A: \begin{align}
a_{n+1} &= a_n + b_n \\
b_{n+1} &= 6a_n + 2b_n\\
c_{n+1} &= c_n + d_n \\
d_{n+1} &= 6c_n + 2d_n
\end{align}
Let's write it in matrix form:
$$\begin{bmatrix} a_{n+1}  & c_{n+1}\\ b_{n+1} & d_{n+1} \end{bmatrix}= \begin{bmatrix} 1 & 1 \\6 & 2  \\ \end{bmatrix}\begin{bmatrix} a_{n}  & c_{n}\\ b_{n} & d_{n} \end{bmatrix}$$
Hence in general $$\begin{bmatrix} a_{n}  & c_{n}\\ b_{n} & d_{n} \end{bmatrix}= \begin{bmatrix} 1 & 1 \\6 & 2  \\ \end{bmatrix}^{n-1}\begin{bmatrix} a_{1}  & c_{1}\\ b_{1} & d_{1} \end{bmatrix}=\begin{bmatrix} 1 & 1 \\6 & 2  \\ \end{bmatrix}^{n}$$
Using diagonalizaation:
\begin{align}\begin{bmatrix} a_{n}  & c_{n}\\ b_{n} & d_{n} \end{bmatrix}&= \begin{bmatrix} -\frac12 & \frac13   \\ 1 & 1 \end{bmatrix}\begin{bmatrix}(-1)^{n}  & 0\\ 0 & 4^{n} \end{bmatrix} \begin{bmatrix}  -\frac65 & \frac25 \\ \frac65 & \frac35\end{bmatrix} 
\\\end{align}
A: If $A=\left(\begin{smallmatrix}1&6\\1&2\end{smallmatrix}\right)$ and if $A^n=\left(\begin{smallmatrix}a_n&b_n\\c_n&d_n\end{smallmatrix}\right)$, then$$f(z)=\frac{a_nz+b_n}{c_nz+d_n}.$$But$$A=\begin{pmatrix}2&1\\-3&1\end{pmatrix}\begin{pmatrix}4&0\\0&-1\end{pmatrix}\begin{pmatrix}\frac15&-\frac15\\\frac35&\frac25\end{pmatrix}$$and therefore\begin{align*}A^n&=\begin{pmatrix}2&1\\-3&1\end{pmatrix}\begin{pmatrix}4^n&0\\0&(-1)^n\end{pmatrix}\begin{pmatrix}\frac15&-\frac15\\\frac35&\frac25\end{pmatrix}\\&=\frac15\begin{pmatrix}3(-1)^n+2\times4^n&6\bigl((-1)^{n+1}+4^n\bigr)\\(-1)^{n+1}+4^n&2(-1)^n+3\times4^n\end{pmatrix}\end{align*}
