# Mapping class group of torus, why is $(ST)^3=S^2$?

In the context of topological quantum field theories, I am interested in the mapping class group of a torus. Here I can consider the torus as a square with identified edges and also decorated with directed curves (see below).

The mapping class group is $$\mathsf{SL}(2,\Bbb Z)$$ and is generated by $$S$$ and $$T$$, which correspond to a 90deg rotation and a Dehn twist respectively. I take the Dehn twist to be along the vertical (meridian). These generators should satisfy $$S^2=C$$, and $$(ST)^3=S^2$$, where $$C$$ is conjugation corresponding to flipping both directions of the torus. The first is easy to see

However, I cannot get the second property, here is my working

Note in this second case I am not mapping back to the original square using the periodicity to make it clear what transformations I am doing.

$$(ST)^3=\Bbb 1$$ is true for the modular group $$\mathsf{PSL}(2,\Bbb Z)$$ but then we should also have $$S^2=\Bbb 1$$.

Can anyone point out where I am going wrong?

Flip the direction of rotation for $$S$$, or choose the other meridian for $$T$$.
We can see this at the level of matrices. Define $$S_1 = \begin{pmatrix} 0 & 1 \\ -1 & 0 \end{pmatrix}, \qquad S_2 = \begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix}$$ to be the two choices of our rotation matrix. Similarly define $$T_1 = \begin{pmatrix} 1 & 0 \\ 1 & 1 \end{pmatrix}, \qquad T_2 = \begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix}$$ to be the two choices for our Dehn twist. (I suppose there really are four choices - the off-diagonal entries could just as well be negative, depending on the orientation of the meridian you're Dehn twisting around - but I'll ignore that. It's not too hard to deal with that possibility.)
Then you can do the algebra to check that $$S_1^2 = S_2^2 = -\mathrm{Id} = C$$, and that $$(S_iT_j)^3 = -\mathrm{Id}$$ if $$i = j$$ and $$+\mathrm{Id}$$ otherwise. This tells you that you need to swap one of $$S$$ or $$T$$ as described above.