MathOverflow is a question and answer site for professional mathematicians. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 ( 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?

share|cite|improve this question

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.

share|cite|improve this answer
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

In case the Gross-Zagier paper doesn't meet your needs, you can also refer to the following

  1. Harold Baier Efficient computation of singular moduli
  2. Noriko Yui On The Singular Values Of Weber Modular Functions

and of course David Cox's book Primes of the form $x^2 + Ny^2$, Section 3.12

The bad thing about the j-function is that it is a level 1 modular function so the coefficients of its defining polynomial are going to explode with increasing degree. Its easier to compute the singular moduli using a modular function of some higher level (e.g. Weber func has level 48) as demonstrated in the papers mentioned above as well in Cox's book.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.