  We first describe, over a field K of characteristic different from 2, the
orbits for the adjoint actions of the Lie groups PGL(2, K) and PSL(2, K) on
their Lie algebra sl(2, K). While the former are well known, the latter lead to
the resolution of generalised Pell-Fermat equations which characterise the
corresponding orbit. The synthetic approach enables to change the base field,
and we illustrate this picture over the fields with three and five elements, in
relation with the geometry of the tetrahedral and icosahedral groups. While the
results may appear familiar, they do not seem to be covered in such generality
or detail by the existing literature.
  We apply this discussion to partition the set of PSL(2, Z)-classes of
integral binary quadratic forms into groups of PSL(2, K)-classes. When K = C we
obtain the class groups of a given discriminant. Then we provide a complete
description of their partition into PSL(2, Q)-classes in terms of Hilbert
symbols, and relate this to the partition into genera. The results are
classical, but our geometrical approach is of independent interest as it may
yield new insights into the geometry of Gauss composition, and unify the
picture over function fields.
  Finally we provide a geometric interpretation in the modular orbifold PSL(2,
Z) \ H for when two points or two closed geodesics correspond to PSL(2,
K)-equivalent quadratic forms, in terms of hyperbolic distances and angles
between those modular cycles. These geometric quantities are related to linking
numbers of modular knots. Their distribution properties could be studied using
the geometry of the quadratic lattice (sl(2, Z), det) but such investigations
are not pursued here.
