get an element by finitely generated set I want to know the method to get a element in a finitely generated group by its generated set, is there a general way to calculate? For example, $SL(2,\mathbb{Z})=<a,b|a=\begin{pmatrix}0 &1\\-1 &0\end{pmatrix}, b=\begin{pmatrix}1&1\\-1&0\end{pmatrix}>$, how to write $\begin{pmatrix}1&1\\0&1\end{pmatrix}$ as the multiplication of {$a,b,a^{-1},b^{-1}$}? Thanks.
 A: The question in your first paragraph does not quite make sense: how is the element to be given in general, if not by a product of generators? In specific instances that question could make sense, such as the instance of $SL_2(\mathbb{Z})$ where elements are given by matrices.
For the special case of $SL(2,\mathbb{Z})$, one way to calculate is to use the presentation $\langle a,b \, | \, a^4 = b^6 = 1, a^2 = b^3 \rangle$, which expresses $SL(2,\mathbb{Z})$ as the free product of $\mathbb{Z}/4$ and $\mathbb{Z}/6$ amalgamated over $\mathbb{Z}/2$. Using this presentation it follows that $a^2=b^3$, which is minus the identity matrix, generates the center of the group. It also follows that every element of $SL(2,\mathbb{Z})$ can be represented uniquely as the product of an element of the center times a word $w$ which alternates between the letter $a$ and one of the letters $b,b^{2}$.
So then, suppose you are given a matrix $M \in SL(2,\mathbb{Z})$, and you wish to compute the corresponding word $w$. There is an inductive procedure that you can use to figure out the last "letter" of $w$, which will be one of the three elements $a,b,b^2$. Once you know that last letter, you can postmultiply $M$ by the inverse of that letter, which will shorten the representing word. 
So, try some calculations, and you should be able to figure out the algorithm which from the matrix $M$ produces that last letter.
