I need to the following formula: let $g,h\in SL_2\mathbb{R}$, clearly $[g,h]\in SL_2\mathbb{R}$ since its determinant is one. Reading a publication I found the following equality:
$$tr[g,h]=tr^2(g)+tr^2(h)+tr^2(gh)-tr(g)tr(h)tr(gh)-2. $$
I wasn't able to prove it, maybe I don't know some useful identity about the trace. Thanks you so much.
We may assume $g=\begin{pmatrix}0&-1\\1&u\end{pmatrix}$ (otherwise, $g$ is a scalar matrix and the result is obviously true). Then (Maple) $tr(g.h.adj(g).adj(h))-tr(g)^2-tr(h)^2-tr(gh)^2+tr(g)tr(h)tr(gh)+2=(u^2-2)(\det(h)-1)$.