# Formula for the Length Function on Teichmuller Space

Let $S_g$ denote the closed orientable surface of genus $g\geq 2$. Then there is a natural bijection between the Teichmuller space $\text{Teich}(S_g)$ of $S_g$ and the set of all the discrete-faithful representations (up to conjugation) $\text{DF}(\pi_1S_g, \text{PSL}_2(\mathbf R))/\text{PSL}_2(\mathbf R)$.

On pg. 284 of Farb and Margalit's A Primer on Mapping Class Groups, the following is mentioned:

Let $\gamma\in \pi_1(S_g)$. Then for $\mathcal X\in \text{Teich}(S_g)$, the length $l_{\mathcal X}(\gamma)$ of the geodesic representative of $\gamma$ is same as $2\cosh^{-1}(\text{trace}(\rho_{\mathcal X}(\gamma))/2)$, where $\rho_{\mathcal X}$ is the discrete faithful representation corresponding to $\mathcal X$.

I am unable to see how this formula comes about. Can somebody please provide a proof or a reference? Thanks.

Let $\gamma \in \pi_1(S_g)$. Since $S_g$ is a closed surface, $\rho_{\mathcal{X}}(\gamma)$ is a hyperbolic element of $PSL(2,\mathbb{R})$. If $A_{\gamma}$ denotes the axis of this hyperbolic element in $\mathbb{H}^2$ (the unique geodesic of $\mathbb{H}^2$ connecting the fixed points of $\rho_{\mathcal{X}}(\gamma)$) then the geodesic $\gamma_*:=A_{\gamma}/ \langle \gamma \rangle$ is the unique geodesic with respect to the hyperbolic metric $\mathcal{X}$ in the free homotopy class of $\gamma$. Since we are working up to conjugation by $PSL(2,\mathbb{R})$, we can consider $\rho_{\mathcal{X}}(\gamma)(z)=\lambda z$ where $\lambda>1$, where we are assuming this corresponds to the Moebius transformation $a=\sqrt{\lambda}$, $b=0$, $c=0$ and $d=\frac{1}{\sqrt{\lambda}}$. With this conjugation, the axis $A_{\gamma}$ is the imaginary axis. The length of $\gamma_*$ can be found by computing the distance of a segment along this axis going between a point and its corresponding translate by $\gamma$. For example, take the point $z=1$. Its translate is $\rho_{\mathcal{X}}(\gamma)(1)=\lambda$. Thus,
$$l(\gamma_*)=\int_1^{\lambda} \frac{dy}{y}=\log(\lambda)=2\log(a).$$
Finally, observe that $$\operatorname{trace}(\gamma)=\sqrt{\lambda}+\frac{1}{\sqrt{\lambda}}=2\cosh \left( \frac{l(\gamma_*)}{2} \right)$$