I am looking for a proof of this: Let $A_{1}=\begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix}$ e $B_{1}=\begin{pmatrix} 1 & 0 \\ 1 & 1 \end{pmatrix}$
A matrix $M=\begin{pmatrix} a & b \\ c & d \end{pmatrix}$ with $a,b,c,d\in\mathbb{N}$, $a+b>c+d$ and $ad-bc=1$ can be factorized as follows:
if $n$ is even and $a>b$: $M=A_{1}^{q_{n}}B_{1}^{q_{n-1}}\dots A_{1}^{q_{2}}B_{1}^{q_{1}}$
if $n$ is odd and $a>b$: $M=\Omega B_{1}^{q_{n}}A_{1}^{q_{n-1}}\dots A_{1}^{q_{2}}B_{1}^{q_{1}}$
if $n$ is even and $a<b$: $M=\Omega B_{1}^{q_{n}}A_{1}^{q_{n-1}}\dots B_{1}^{q_{2}}A_{1}^{q_{1}}$
If $n$ is odd $a<b$: $M=A_{1}^{q_{n}}B_{1}^{q_{n-1}}\dots B_{1}^{q_{2}}A_{1}^{q_{1}}$
where $\Omega=\begin{pmatrix} 0 & 1 \\ -1 & 1 \end{pmatrix}$ and $q_{1}\dots q_{n}$ are the quotients that appear when Euclid's algorithm is applied to $(a,b)$.
I did myself an induction proof, but I'd like to see it in a book or something, if anyone knows where to look for.