# What is a good number theoretic interpretation of primitive geodesics on the modular surface?

Given $SL_2( \mathbb{Z})$, what interpretation is available for the hyperbolic elements? What is true, if we consider a congruence subgroup?

I heard that there is a connection with certain class numbers.

-

Conjugacy classes of hyperbolic elements in $SL(2,Z)$ are in bijection with units in rings of algebraic integers in real quadratic fields. This follows directly from looking at the characteristic polynomial. On the quotient of the upper half-plane by $SL(2,Z)$, the (hyperbolic) geodesics connecting images of points under such elements _close_up_, giving "closed geodesics" on the modular surface. The (hyperbolic) length is the log of the absolute value of the unit. All this is straightforward computation, once one conceives the idea of it. Iwaniec' "Spectral theory of automorphic forms"' first chapters treat such things.
The most immediate connection with class numbers comes when periods along the corresponding adelized algebraic group $GL(1,k)\subset GL(2,Q)$ are computed, since the adelized $GL(1,k)$ "automatically" includes class groups (as in Iwasawa-Tate's rewrite of Hecke about GL(1) L-functions). For complex quadratic fields, instead of evaluation just at single points, such as $\sqrt{-5}$, one must take a weighted sum over representatives of points for all ideal classes. The analogous thing happens with real quadratic fields. That is, the "most natural" expression combines units and class numbers.