Algorithm to generate an arbitrary matrix of special linear group $SL(2,\mathbb{Z})$ I have a given $2\times 2$ special linear matrix, for example
\begin{equation}
m=\begin{pmatrix} 55 & 8469 \\ 1 & 154 \end{pmatrix}
\end{equation}
and I would like to get the generating form of it from the s and t matrices which are these:
\begin{equation}
t=\begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix}\qquad\qquad\qquad s=\begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix}
\end{equation}
I don't know if exist an algoritmh for this problem or any proceedings which could help me.

This rather small example can also be done by hand without any algorithms.
Note that
$$
\begin{pmatrix}
a & b \\ 
c & d
\end{pmatrix}
\begin{pmatrix}
1 & 1 \\ 
0 & 1
\end{pmatrix}
=
\begin{pmatrix}
a & a+b \\ 
c & c+d
\end{pmatrix}
$$
While $S$ switches the columns and puts a minus sign in.
Then by guesstimating powers, we reduce the size of scalars quite efficiently.
For example:
$$
\begin{pmatrix}
55 & 8469 \\ 
1 & 154
\end{pmatrix}
\begin{pmatrix}
1 & -153 \\ 
0 & 1
\end{pmatrix}
=
\begin{pmatrix}
55 & 54 \\ 
1 & 1
\end{pmatrix}.
$$
Multiply by $S^3=S^{-1}$:
$$
\begin{pmatrix}
55 & 54 \\ 
1 & 1
\end{pmatrix}
\begin{pmatrix}
0 & 1 \\ 
-1 & 0
\end{pmatrix}=
\begin{pmatrix}
-54 & 55 \\ 
-1 & 1
\end{pmatrix}
$$
This look quite close to a power of $T$. So mulitply it by $T$:
$$
\begin{pmatrix}
-54 & 55 \\ 
-1 & 1
\end{pmatrix}
\begin{pmatrix}
1 & 1 \\ 
0 & 1
\end{pmatrix}=
\begin{pmatrix}
-54 & 1 \\ 
-1 & 0
\end{pmatrix}
$$
This we recognize as $T^{54}S$. Working backwards, this all means that
$$
MT^{-153}ST=T^{54}S.
$$
Hence $M=T^{54}ST^{-1}S^{-1}T^{153}$. (this might be simplified though)
