# Values of the j-function

In general, how do you compute the algebraic values of the modular j-function at quadratic imaginary points? (In other words, how do you compute the algebraic values of singular moduli?)

For instance, the Mathematica website (http://mathworld.wolfram.com/j-Function.html) gives the standard nine integral examples that result when the class number $h_k=1$, but then it gives 18 examples for when the class number is 2 without any specific references. How does one compute these? More importantly, can you also do it for higher degree cases? Or even just find the defining degree-$h_k$ polynomial?

-

One crude but effective method is to compute all the h conjugates aj numerically to high precision, from which you can find the polynomial Π(x-aj) they are the roots of using the fact that it has integral coefficients, (h=class number, and the values aj are the values of j at the imaginary quadratic integers with the same discriminant.)

Alternatively see the paper On singular moduli by Gross and Zagier, which gives an explicit expression for the values of j as products of many small algebraic integers.

-
In the case of using Mathematica, I guess that would be first computing the values of the j-function (which IIRC is expressible as ratios of powers of theta functions) numerically and then subjecting them to Recognize[] I suppose. (I don't know which package you should be loading for this in $VersionNumber >=6, but in$VersionNumber < 6 it's NumberTheoryRecognize) –  J. M. Aug 20 '10 at 22:41
and of course David Cox's book Primes of the form $x^2 + Ny^2$, Section 3.12