Orientation-preserving mapping class group of the torus
In mathematics, the modular group is the projective special linear group formula_1 of 2 × 2 matrices with integer coefficients and determinant 1. The matrices "A" and −"A" are identified. The modular group acts on the upper-half of the complex plane by fractional linear transformations, and the name "modular group" comes from the relation to moduli spaces and not from modular arithmetic.
Definition.
The modular group Γ is the group of linear fractional transformations of the upper half of the complex plane, which have the form
formula_2
where "a", "b", "c", "d" are integers, and "ad" − "bc" 
 1. The group operation is function composition.
This group of transformations is isomorphic to the projective special linear group PSL(2, Z), which is the quotient of the 2-dimensional special linear group SL(2, Z) over the integers by its center {"I", −"I"}. In other words, PSL(2, Z) consists of all matrices
formula_3
where "a", "b", "c", "d" are integers, "ad" − "bc" 
 1, and pairs of matrices "A" and −"A" are considered to be identical. The group operation is the usual multiplication of matrices.
Some authors "define" the modular group to be PSL(2, Z), and still others define the modular group to be the larger group SL(2, Z). 
Some mathematical relations require the consideration of the group GL(2, Z) of matrices with determinant plus or minus one. (SL(2, Z) is a subgroup of this group.) Similarly, PGL(2, Z) is the quotient group GL(2, Z)/{"I", −"I"}. A 2 × 2 matrix with unit determinant is a symplectic matrix, and thus SL(2, Z) 
 Sp(2, Z), the symplectic group of 2 × 2 matrices.
Finding elements.
To find an explicit matrix formula_4 in SL(2, Z), begin with two coprime integers formula_5, and solve the determinant equationformula_6(Notice the determinant equation forces formula_5 to be coprime since otherwise there would be a factor formula_8 such that formula_9, formula_10, henceformula_11would have no integer solutions.) For example, if formula_12 then the determinant equation readsformula_13then taking formula_14 and formula_15 gives formula_16, henceformula_17is a matrix. Then, using the projection, these matrices define elements in PSL(2, Z).
Number-theoretic properties.
The unit determinant of
formula_3
implies that the fractions , , , are all irreducible, that is having no common factors (provided the denominators are non-zero, of course). More generally, if is an irreducible fraction, then
formula_19
is also irreducible (again, provided the denominator be non-zero). Any pair of irreducible fractions can be connected in this way; that is, for any pair and of irreducible fractions, there exist elements
formula_20
such that
formula_21
Elements of the modular group provide a symmetry on the two-dimensional lattice. Let "ω"1 and "ω"2 be two complex numbers whose ratio is not real. Then the set of points
formula_22
is a lattice of parallelograms on the plane. A different pair of vectors "α"1 and "α"2 will generate exactly the same lattice if and only if
formula_23
for some matrix in GL(2, Z). It is for this reason that doubly periodic functions, such as elliptic functions, possess a modular group symmetry.
The action of the modular group on the rational numbers can most easily be understood by envisioning a square grid, with grid point ("p", "q") corresponding to the fraction (see Euclid's orchard). An irreducible fraction is one that is "visible" from the origin; the action of the modular group on a fraction never takes a "visible" (irreducible) to a "hidden" (reducible) one, and vice versa.
Note that any member of the modular group maps the projectively extended real line one-to-one to itself, and furthermore bijectively maps the projectively extended rational line (the rationals with infinity) to itself, the irrationals to the irrationals, the transcendental numbers to the transcendental numbers, the non-real numbers to the non-real numbers, the upper half-plane to the upper half-plane, et cetera.
If and are two successive convergents of a continued fraction, then the matrix
formula_24
belongs to GL(2, Z). In particular, if "bc" − "ad" 
 1 for positive integers "a", "b", "c", "d" with "a" ; "b" and "c" ; "d" then and will be neighbours in the Farey sequence of order max("b", "d"). Important special cases of continued fraction convergents include the Fibonacci numbers and solutions to Pell's equation. In both cases, the numbers can be arranged to form a semigroup subset of the modular group.
Group-theoretic properties.
Presentation.
The modular group can be shown to be generated by the two transformations
formula_25
so that every element in the modular group can be represented (in a non-unique way) by the composition of powers of "S" and "T". Geometrically, "S" represents inversion in the unit circle followed by reflection with respect to the imaginary axis, while "T" represents a unit translation to the right.
The generators "S" and "T" obey the relations "S"2 
 1 and ("ST")3 
 1. It can be shown that these are a complete set of relations, so the modular group has the presentation:
formula_26
This presentation describes the modular group as the rotational triangle group D(2, 3, ∞) (infinity as there is no relation on "T"), and it thus maps onto all triangle groups (2, 3, "n") by adding the relation "Tn" 
 1, which occurs for instance in the congruence subgroup Γ("n").
Using the generators "S" and "ST" instead of "S" and "T", this shows that the modular group is isomorphic to the free product of the cyclic groups "C"2 and "C"3:
formula_27
Braid group.
The braid group "B"3 is the universal central extension of the modular group, with these sitting as lattices inside the (topological) universal covering group . Further, the modular group has a trivial center, and thus the modular group is isomorphic to the quotient group of "B"3 modulo its center; equivalently, to the group of inner automorphisms of "B"3.
The braid group "B"3 in turn is isomorphic to the knot group of the trefoil knot.
Quotients.
The quotients by congruence subgroups are of significant interest.
Other important quotients are the (2, 3, "n") triangle groups, which correspond geometrically to descending to a cylinder, quotienting the "x" coordinate modulo "n", as "Tn" 
 ("z" ↦ "z" + "n"). (2, 3, 5) is the group of icosahedral symmetry, and the (2, 3, 7) triangle group (and associated tiling) is the cover for all Hurwitz surfaces.
Presenting as a matrix group.
The group formula_28 can be generated by the two matrices
 formula_29
since
 formula_30
The projection formula_31 turns these matrices into generators of formula_32, with relations similar to the group presentation.
Relationship to hyperbolic geometry.
The modular group is important because it forms a subgroup of the group of isometries of the hyperbolic plane. If we consider the upper half-plane model H of hyperbolic plane geometry, then the group of all
orientation-preserving isometries of H consists of all Möbius transformations of the form
formula_33
where "a", "b", "c", "d" are real numbers. In terms of projective coordinates, the group PSL(2, R) acts on the upper half-plane H by projectivity:
formula_34
This action is faithful. Since PSL(2, Z) is a subgroup of PSL(2, R), the modular group is a subgroup of the group of orientation-preserving isometries of H.
Tessellation of the hyperbolic plane.
The modular group Γ acts on formula_35 as a discrete subgroup of formula_36, that is, for each "z" in formula_35 we can find a neighbourhood of "z" which does not contain any other element of the orbit of "z". This also means that we can construct fundamental domains, which (roughly) contain exactly one representative from the orbit of every "z" in H. (Care is needed on the boundary of the domain.)
There are many ways of constructing a fundamental domain, but a common choice is the region
formula_38
bounded by the vertical lines Re("z") 
 and Re("z") 
 −, and the circle . This region is a hyperbolic triangle. It has vertices at + "i" and − + "i", where the angle between its sides is , and a third vertex at infinity, where the angle between its sides is 0.
There is a strong connection between the modular group and elliptic curves. Each point formula_39 in the upper half-plane gives an elliptic curve, namely the quotient of formula_40 by the lattice generated by 1 and formula_39. 
Two points in the upper half-plane give isomorphic elliptic curves if and only if they are related by a transformation in the modular group. Thus, the quotient of the upper half-plane by the action of the modular group is the so-called moduli space of elliptic curves: a space whose points describe isomorphism classes of elliptic curves. This is often visualized as the fundamental domain described above, with some points on its boundary identified.
The modular group and its subgroups are also a source of interesting tilings of the hyperbolic plane. By transforming this fundamental domain in turn by each of the elements of the modular group, a regular tessellation of the hyperbolic plane by congruent hyperbolic triangles known as the V6.6.∞ Infinite-order triangular tiling is created. Note that each such triangle has one vertex either at infinity or on the real axis Im("z") 
 0. 
This tiling can be extended to the Poincaré disk, where every hyperbolic triangle has one vertex on the boundary of the disk. The tiling of the Poincaré disk is given in a natural way by the "J"-invariant, which is invariant under the modular group, and attains every complex number once in each triangle of these regions. 
This tessellation can be refined slightly, dividing each region into two halves (conventionally colored black and white), by adding an orientation-reversing map; the colors then correspond to orientation of the domain. Adding in ("x", "y") ↦ (−"x", "y") and taking the right half of the region "R" (where Re("z") ≥ 0) yields the usual tessellation. This tessellation first appears in print in , where it is credited to Richard Dedekind, in reference to .
The map of groups (2, 3, ∞) → (2, 3, "n") (from modular group to triangle group) can be visualized in terms of this tiling (yielding a tiling on the modular curve), as depicted in the video at right.
Congruence subgroups.
Important subgroups of the modular group Γ, called "congruence subgroups", are given by imposing congruence relations on the associated matrices.
There is a natural homomorphism SL(2, Z) → SL(2, Z/"NZ) given by reducing the entries modulo "N". This induces a homomorphism on the modular group PSL(2, Z) → PSL(2, Z/"NZ). The kernel of this homomorphism is called the principal congruence subgroup of level "N", denoted Γ("N"). We have the following short exact sequence:
formula_42
Being the kernel of a homomorphism Γ("N") is a normal subgroup of the modular group Γ. The group Γ("N") is given as the set of all modular transformations
formula_2
for which "a" ≡ "d" ≡ ±1 (mod "N") and "b" ≡ "c" ≡ 0 (mod "N").
It is easy to show that the trace of a matrix representing an element of Γ("N") cannot be −1, 0, or 1, so these subgroups are torsion-free groups. (There are other torsion-free subgroups.)
The principal congruence subgroup of level 2, Γ(2), is also called the modular group Λ. Since PSL(2, Z/2Z) is isomorphic to "S"3, Λ is a subgroup of index 6. The group Λ consists of all modular transformations for which "a" and "d" are odd and "b" and "c" are even.
Another important family of congruence subgroups are the modular group Γ0("N") defined as the set of all modular transformations for which "c" ≡ 0 (mod "N"), or equivalently, as the subgroup whose matrices become upper triangular upon reduction modulo "N". Note that Γ("N") is a subgroup of Γ0("N"). The modular curves associated with these groups are an aspect of monstrous moonshine – for a prime number "p", the modular curve of the normalizer is genus zero if and only if "p" divides the order of the monster group, or equivalently, if "p" is a supersingular prime.
Dyadic monoid.
One important subset of the modular group is the dyadic monoid, which is the monoid of all strings of the form "STn1STn2STn3"... for positive integers "ni". This monoid occurs naturally in the study of fractal curves, and describes the self-similarity symmetries of the Cantor function, Minkowski's question mark function, and the Koch snowflake, each being a special case of the general de Rham curve. The monoid also has higher-dimensional linear representations; for example, the "N" 
 3 representation can be understood to describe the self-symmetry of the blancmange curve.
Maps of the torus.
The group GL(2, Z) is the linear maps preserving the standard lattice Z2, and SL(2, Z) is the orientation-preserving maps preserving this lattice; they thus descend to self-homeomorphisms of the torus (SL mapping to orientation-preserving maps), and in fact map isomorphically to the (extended) mapping class group of