Part 5 of 14. The definition of a modular form, and why there are so few: each weight has about k/12 of them, all built from two Eisenstein series.
Parts 1 to 4 set up the group SL₂(ℤ), its fundamental domain and the cusp. This part puts them together into the definition of a modular form. A modular form is much more constrained than a general holomorphic function on the upper half-plane. The weight-k factor ties its values together along each SL₂(ℤ)-orbit, and it may not blow up at the cusp. At weight k these conditions leave only about k/12 independent forms, all built from two generators. That finiteness is what makes modular forms useful: when a space has dimension one, any two forms in it are proportional, and comparing their q-expansions gives identities between integer sequences.
The simplest examples are the Eisenstein series Ek, built in Part 6. The heatmap shows log|Ek(τ)| on the fundamental domain, where the dark spots are zeros.
log|Ek(τ)| for the selected weight; brighter is larger. The side panel checks the S-law at the marked point, where f(−1/τ) should equal τkf(τ). The colour scale is fitted to each weight.
Near the top of the domain every Ek tends to 1, because the higher q-terms decay like e−2πn Im τ. The zeros lie lower down. E4 vanishes at ρ = e2πi/3, E6 vanishes at i, E10 vanishes at both, and the zero of E12 sits on the arc |τ| = 1 between them. The valence formula below explains where these zeros are forced to be.
A modular form of weight k for SL₂(ℤ) is a holomorphic function f: ℍ → ℂ satisfying two conditions:
The growth condition says f does not blow up at i∞. Since f(τ + 1) = f(τ), there is a Fourier expansion in q = e2πiτ with no negative powers:
If a₀ = 0 (vanishing at the cusp), f is called a cusp form. The space of weight-k forms is Mk and the cusp forms inside it are Sk.
It is enough to check the law on the two generators. T = [[1,1],[0,1]] has (cτ+d)k = 1, so
which is the periodicity behind the q-expansion. For S = [[0,−1],[1,0]], (cτ+d)k = τk:
This is the substantive condition: it relates f at τ to f at −1/τ. Since S and T generate SL₂(ℤ) (Part 2), the two equations give the law for every γ.
There are no nonzero forms of odd weight. −I is in SL₂(ℤ) and acts trivially on ℍ, so the law with γ = −I reads f(τ) = (−1)k f(τ), which forces f = 0 when k is odd.
(cτ+d)k is the automorphy factor. For consistency under composition it must satisfy a cocycle condition.
Write j(γ, τ) = (cτ+d)k. Apply γ₁ then γ₂:
For compatibility with γ₂γ₁:
The (2,1) and (2,2) entries of γ₂γ₁ verify the identity:
This makes the automorphy factor a 1-cocycle. Equivalently, the slash operator (f|kγ)(τ) = (cτ+d)−kf(γτ) is a right action of SL₂(ℤ) on holomorphic functions, and modular forms are its fixed points that stay bounded at the cusp.
The checker below evaluates Ek from its q-expansion at τ and at γτ, then compares the two sides. The q-series is summed until the next term is below double precision, and the difference is measured against the size of the terms being added, so it stays meaningful at a zero of Ek, where both sides vanish. What is left over is rounding error: about 10−15 for most points, growing toward 10−10 when τ or γτ sits close to the real axis and the series needs many large terms that cancel.
Drag the blue point τ (or click to place it, or focus it and use the arrow keys), then choose γ and k. The red point is γτ. The last line divides the difference of the two sides by |cτ+d|k times the sum of the absolute values of the q-series terms.
If f has weight j and g has weight k, the product picks up both factors:
So fg has weight j + k, and the direct sum M* = ⊕k Mk is a graded ring. E4 and E6 sit in it, so every monomial E4aE6b is a modular form of weight 4a + 6b. The structure theorem says these monomials account for everything:
E4 and E6 are algebraically independent, so the monomials with 4a + 6b = k form a basis of Mk. (If a nontrivial relation held, E43/E62 would be a root of a polynomial with constant coefficients, hence constant. It cannot be, because it is 0 at ρ and 1 at i∞.)
Over the integers two generators are not enough. The discriminant Δ = q − 24q2 + 252q3 − ··· has integer coefficients, but Δ = (E43 − E62)/1728, and no integer combination aE43 + bE62 equals it (the constant term forces b = −a, which gives 1728aΔ). The forms with integer q-expansions make up the ring
so Δ has to be added as a third generator, tied to the other two by one relation.
The count comes from the valence formula. For a nonzero f in Mk, the orders of vanishing at the cusp, at the two elliptic points i and ρ, and at the other points of the fundamental domain satisfy
The elliptic points count with weight ½ and ⅓ because their stabilisers in PSL₂(ℤ) have order 2 and 3 (Part 3). The left side is a sum of non-negative terms, and for small k there are very few ways to reach k/12:
Two consequences give the dimension. First, since Δ never vanishes on ℍ, dividing a cusp form of weight k by Δ gives a holomorphic form of weight k − 12, so
Second, for even k ≥ 4 some monomial E4aE6b has weight k and constant term 1, so Mk is that one form plus Sk, and dim Mk = dim Mk−12 + 1. The valence formula also gives dim Mk = 1 for k = 0, 4, 6, 8, 10 and 0 for k = 2. Starting from those values and stepping by 12:
The dimension goes up by one every 12 steps of weight, except that k ≡ 2 (mod 12) is one short. The same recursion is the proof of the structure theorem: subtract the right multiple of a monomial to kill the constant term, divide the resulting cusp form by Δ = (E43 − E62)/1728, and repeat at weight k − 12.
A form in Mk is determined by its first dim Mk coefficients. (The difference of two forms that agree that far would vanish at the cusp to order at least dim Mk, and the valence formula does not allow that for a nonzero form.) For the selected weight, the figure multiplies out the monomials E4aE6b in exact integer arithmetic, takes their first d = dim Mk coefficients as a d×d matrix, and row-reduces. The result is the basis f0, …, fd−1 with fi = qi + O(qd), whose members from f1 on span Sk. It then writes Ek in that basis using only Ek's first d coefficients, and compares the prediction with the divisor-sum formula for every later coefficient it has computed.
dim Mk (blue) and dim Sk (red) up to k = 48; click a bar or drag the slider to pick a weight. The tables show the exact determinant of the monomial block and check Ek against σk−1 up to q15. Coefficients over 10 digits are rounded.
At weight 12 the check produces E12 = f0 + (65520/691) f1, and in monomials
The prime 691 in the denominator is the numerator of the Bernoulli number B12. Part 7 turns it into Ramanujan's congruence τ(n) ≡ σ11(n) (mod 691).
When dim Mk = 1, any two forms of weight k with constant term 1 are equal. Weights 8 and 10 give
and comparing q-coefficients turns each into a statement about divisor sums. For weight 8 it reads
an identity about integers whose standard proof is the finite-dimensionality of M8. The same argument at weight 12 says that the cusp form E43 − E62 is a multiple of Δ, and matching the q-coefficient gives the 1728:
The figure checks the first two: at k = 8 and 10 the reduced basis is the single monomial E42 or E4E6, so its Ek check is the identity itself, coefficient by coefficient. At k = 12 its f1 is Δ itself, with coefficients 1, −24, 252, −1472, …. The first weight where the cusp forms are more than one-dimensional is k = 24, with S24 = Δ·M12 spanned by ΔE43 and Δ2. There dimension counting no longer picks out a basis, and Part 8 uses Hecke operators to choose one.