  The modular group PSL(2;Z) acts on the hyperbolic plane HP with quotient the
modular surface M, whose unit tangent bundle U is a 3-manifold homeomorphic to
the complement of the trefoil knot in the 3-sphere. The hyperbolic conjugacy
classes of PSL(2;Z) correspond to the closed oriented geodesics in M. Those
lift to the periodic orbits for the geodesic flow in U, which define the
modular knots. The linking numbers between modular knots and the trefoil is
well understood. Indeed, Etienne Ghys showed in 2006 that they are given by the
Rademacher invariant of the corresponding conjugacy classes. The Rademacher
function is a homogeneous quasi-morphism of PSL(2;Z) which he had recognised
with Jean Barge in 1992 as half the primitive of the bounded euler class. This
shed light on the 1987 work of Michael Atiyah concerning the logarithm of the
Dedekind eta function which identified it with no less than that six other
important functions appearing in diverse areas of mathematics. We are concerned
with the linking numbers between modular knots and derive several formulae with
arithmetical, combinatorial, topological and group theoretical flavours. In
particular we associate to a pair of modular knots a function defined on the
character variety of PSL(2;Z), whose limit at the boundary point recovers their
linking number. Moreover, we show that the linking number with a modular knot
minus that with its inverse yields a homogeneous quasi-morphism on the modular
group, and how to extract a free basis out of these. For this we prove that the
linking pairing is non degenerate.
