### Pictures of Modular Curves (I)

#### Posted by John Baez

*guest post by Tim Silverman*

**Introduction—and a Kind of Apology**

It is with considerable relief that I finally find myself in a position to make a (hopefully) more substantive contribution here: namely, the second in the series I started here, an alarmingly long time ago. I took the long way around to generate the pretty pictures I wanted, and did a lot of reading and calculation—mostly for articles that I intend to appear after this one! Somehow, it all took a lot longer than I expected—even after taking into account that, as I know all too well, these things tend to take a lot longer than expected.

But we’re here at last! My aim in this series is to give the most elementary discussion of modular curves and modular forms that I can manage at each stage, partly for my own benefit, and partly for the benefit of, well, people like me, I guess. One of the strange (but nice) things about the theory of modular curves and modular forms is that, although it lies at the confluence of many areas of mathematics, and leads directly on to some subjects that are very hard indeed, nevertheless, there is a surprising amount that one can do in it using only quite basic geometry and arithmetic. This aspect of the subject is perhaps sometimes somewhat obscured by all the other aspects, but one of my aims here is to bring it out more clearly.

I’m a little embarrassed that this article, and the next few ones at least, are not really categorical, let alone n-categorical, but if things go according to plan, I will at least end up talking a lot about the sorts of things that people often talk about here, albeit at a more elementary level than usual. In any case, I hope that it will provide some interest and amusement to the n-Café patrons, and ideally also to the crowds of urchins in the street outside with their noses pressed against the café window, not to mention the more elegant ladies and gentlemen who pass by and look in but do not enter.

With that warning out of the way, let me start by summarising where we got to in the first article.

**The Story so Far**

A Farey sequence consists of those fractions, reduced to their lowest terms, which lie between $0$ and $1$ and have denominators less than some given natural number, the fractions being placed in order of increasing value (as rational numbers).

Here are the first few Farey sequences:

$\frac{0}{1}\; \frac{1}{1}$

$\frac{0}{1}\; \frac{1}{2}\; \frac{1}{1}$

$\frac{0}{1}\frac{1}{3}\; \frac{1}{2}\; \frac{2}{3}\; \frac{1}{1}$

$\frac{0}{1}\; \frac{1}{4}\; \frac{1}{3}\; \frac{1}{2}\; \frac{2}{3}\; \frac{3}{4}\; \frac{1}{1}$

$\frac{0}{1}\; \frac{1}{5}\; \frac{1}{4}\; \frac{1}{3}\; \frac{2}{5}\; \frac{1}{2}\; \frac{3}{5\; }\frac{2}{3}\; \frac{3}{4}\; \frac{4}{5}\; \frac{1}{1}$

$\frac{0}{1}\; \frac{1}{6}\; \frac{1}{5}\; \frac{1}{4}\; \frac{1}{3}\; \frac{2}{5}\; \frac{1}{2}\; \frac{3}{5}\; \frac{2}{3}\; \frac{3}{4}\; \frac{4}{5}\; \frac{5}{6}\; \frac{1}{1}$

$\frac{0}{1}\; \frac{1}{7}\; \frac{1}{6}\; \frac{1}{5}\; \frac{1}{4}\; \frac{2}{7}\; \frac{1}{3}\; \frac{2}{5}\; \frac{3}{7}\; \frac{1}{2}\; \frac{4}{7}\; \frac{3}{5}\; \frac{2}{3}\; \frac{5}{7}\; \frac{3}{4}\; \frac{4}{5}\; \frac{5}{6}\; \frac{6}{7}\; \frac{1}{1}$

Given any two adjacent fractions $\frac{a}{b}$ and $\frac{c}{d}$ in any Farey sequence, we have $a d-b c=-1$. Given any three adjacent fractions $\frac{a}{b}$, $\frac{a'}{b'}$ and $\frac{a''}{b''}$ in any Farey sequence, where $\frac{a'}{b'}$ is in the middle, we have $\frac{a'}{b'}=\frac{a+a''}{b+b''}$. That is, the middle fraction is the *mediant* of the fractions on either side. We get later Farey sequences (with larger maximum denominator) by inserting mediants between pairs of adjacent fractions in earlier sequences.

Now lets make this more geometrical. Suppose, wherever two fractions are adjacent in some Farey sequence, we join them by an edge. From what we said above, it follows that when we have three such fractions of which one is the mediant of the other two, we find the three fractions give the vertices of a triangle. By taking the limit of increasing denominators, so that we eventually include all Farey sequences, we get to include all rational numbers between $0$ and $1$, and we can also extend the idea (in the obvious way!) to include all rational numbers—or (to express ourselves geometrically) to the entire affine line over $\mathbb{Q}$. And from there, it’s just one short step to extend to the *projective* line over $\mathbb{Q}$: we simply throw in the fraction $\frac{1}{0}$, which is just as capable of forming mediants as any other fraction. Having done this, we find that if we are given any pair of points on $\mathbb{Q}\mathop{P}^1$ such that they both lie in some triangle (and hence are connected by an edge), then they also both lie in exactly *one* other triangle, on the “other side” of the edge, and indeed all the triangles together form a tiling of a (hyperbolic) surface. In the Poincaré Disc view it looks something like the picture below, where the edges appear as segments of circles and the elements of $\mathbb{Q}\mathop{P}^1$ are distributed around the circumference of the disc. (Just to be clear: in the hyperbolic plane, all these triangles are (or can be made) congruent).

Notice that each rational number is at the vertex of an infinite number of triangles. Note also that $\frac{1}{0}$ is adjacent to, precisely, the integers—and each integer is also adjacent to its predecessor and successor integers.

**The Action of the Modular Group**

Taking another, quite different, geometrical approach, we may consider points of $\mathbb{Q}\mathop{P}^1$ to be lines in $\mathbb{Z}^2$.

The group $PSL(2, \mathbb{Z})$ acts on this plane, preserving lines (and preserving enclosed areas, if we consider $\mathbb{Z}^2$ as a subset of the Euclidean plane). But more than that, $PSL(2, \mathbb{Z})$ preserves crucial features of the structure of Farey sequences. It preserves the relationship $\vert a d-b c\vert=1$ between adjacent elements (since this just says that the points $(a, b)$ and $(c, d)$, corresponding to reduced fractions $\frac{a}{b}$ and $\frac{c}{d}$, form the vertices of a parallelogram of area $1$; and area is preserved). It also preserves mediancy, since, in the lattice $\mathbb{Z}^2$, this just corresponds to the sum of vectors. So elements of $PSL(2, \mathbb{Z})$ preserve the adjacency and mediancy relations, and hence preserve the triangles—at least combinatorially.

In fact, it’s much better than that. The metric structure on the hyperbolic plane gives it a natural conformal structure—which enables it to be considered as a region of $\mathbb{C}P^1$. Also, of course, $PSL(2, \mathbb{Z})$ is a subgroup of $PSL(2, \mathbb{C})$, and the latter naturally acts on $\mathbb{C}P^1$, preserving its conformal structure. And the conformal structure implies a unique metric structure of constant curvature (up to an overall scale factor). So in this way $PSL(2, \mathbb{Z})$ acts as a group of conformal transformations, hence as a group of isometries of the hyperbolic plane, and preserves the tiling by triangles. In fact, more even than that, this group *is* precisely the symmetry group of the tiling.

**Reducing mod $N$**

Now one thing we can do with $\mathbb{Z}$ is reduce it mod $N$:

$\mathbb{Z}\rightarrow\mathbb{Z}_N$ $a\mapsto a mod N$

Since a lot of the things we have been talking about so far come from $\mathbb{Z}$, it might be interesting to see to what extent reduction mod $N$ can be applied to these other things. The rings $\mathbb{Z}_N$ provide, in a way, simpler microcosms of $\mathbb{Z}$ itself, and we might achieve a similar simplification of related objects. So let’s see where we can go with this.

Obviously the surjective morphism of rings $\mathbb{Z}\rightarrow\mathbb{Z}_N$ will induce a morphism of the plane $\mathbb{Z}^2\rightarrow{\mathbb{Z}_N}^2$. But a line in the former plane is defined algebraically (as all points of the form $(c p, c q)$ for a certain point $(p, q)$). So the lines in $\mathbb{Z}^2$ get carried down, in a well-defined way, to “lines” in the reduced plane ${\mathbb{Z}_N}^2$. And so the projective line over $\mathbb{Q}$—or perhaps it might almost be better here to say the “projective line” over $\mathbb{Z}$, if that weren’t confusing for other reasons—gets sent to a sort of projective line over $\mathbb{Z}_N$. If $N$ is prime, so that $\mathbb{Z}_N$ is a field, then this is a completely ordinary projective line over a finite field. In any case, we can try to represent points of this projective line by fractions of some kind, but “reduced mod $N$”.

Here is how we reduce these fractions mod $N$: we identify two fractions $\frac{a}{b}$ and $\frac{a'}{b'}$ if $a\equiv a' (mod N)$ and $b\equiv b' (mod N)$. This will sometimes leave common factors between top and bottom (e.g. $\frac{13}{8}$ reduces to $\frac{3}{3} mod\;5$) but we won’t cancel these factors unless they could also have been canceled back in fractions over $\mathbb{Z}$—which means we only cancel factors of $-1$. This means that some lines may get associated with several different fractions—I’ll say a little more about this later.

What about Farey sequences? These can be reduced too! The fractions corresponding to points in the projective line over $\mathbb{Q}$ go to reduced fractions corresponding to points in the reduced “projective line” over $\mathbb{Z}_N$. But, in addition, the “adjacency” relation between successive members of a Farey sequence, viz. $\frac{a}{b}$ and $\frac{c}{d}$ are adjacent in some Farey sequence iff $a d-b c=-1$, also has a well-defined reduction mod $N$. So we get a reduced adjacency relation, and therefore a set of “reduced edges” between adjacent “reduced points” (i.e. adjacent reduced fractions). Not only that, but the mediancy relation, $\frac{a'}{b'}=\frac{a+a''}{b+b''}$ is also defined algebraically, so we can also reduce the triangles mod $N$! In fact, the whole tiled surface can be reduced mod $N$!

We can think of this whole thing alternatively in terms of quotients of the original surface by certain subgroups of $PSL(2, \mathbb{Z})$.

Of course, $PSL(2, \mathbb{Z})$ will act on the reduced plane ${\mathbb{Z}_N}^2$ through its action on $\mathbb{Z}^2$, hence on lines in the reduced plane, and so on the ‘projective line’ over $\mathbb{Z}_N$. Now, the automorphisms of the latter are what we might call $PSL(2, \mathbb{Z}_N)$. That is, they are given by the group of $2\times 2$ matrices whose entries are elements of $\mathbb{Z}_N$ and whose determinants are equal to $1$ mod $N$, all modulo scalar multiplication by $\{1, -1\}$.

On the other hand, by reducing matrix elements mod $N$, we get the obvious surjection $PSL(2, \mathbb{Z})\mapsto PSL(2, \mathbb{Z}_N)$. And since the action of these matrices is defined in terms of addition and multiplication, the reduction mod $N$ commutes with the action: we can either act on $\mathbb{Z}^2$ with $PSL(2, \mathbb{Z})$, then reduce $\mathbb{Z}^2$ to ${\mathbb{Z}_N}^2$, or we can reduce $PSL(2, \mathbb{Z})$ to $PSL(2, \mathbb{Z}_N)$, and act with the latter on ${\mathbb{Z}_N}^2$ and get the same result.

Now the kernel of the reduction $PSL(2, \mathbb{Z})\rightarrow PSL(2, \mathbb{Z}_N)$ is the group of matrices congruent to the identity $\left(\array{1&0\\0&1}\right)$ mod $N$. This well-known and interesting subgroup of $PSL(2, \mathbb{Z})$ is called $\Gamma(N)$.

$0\rightarrow\Gamma(N)\rightarrow PSL(2,\mathbb{Z})\rightarrow PSL(2,\mathbb{Z}_N)\rightarrow 0$

So $PSL(2,\mathbb{Z}_N)$ is the “residual” action of $PSL(2,\mathbb{Z})$ left after we have taken the quotient of the latter by $\Gamma(N)$. And in the same way, the “projective line” over $\mathbb{Z}_N$ is what is left after we have taken the quotient of the “projective line” over $\mathbb{Z}$ by the action of $\Gamma(N)$ as matrices. And, finally, the reduced surface tiled with reduced triangles (made up of reduced edges joining reduced points) is the quotient of the full hyperbolic plane (or complex upper half-plane—which is what we are really after) by the action of $\Gamma(N)$ on the tiling. There is left a remaining group of symmetries of the reduced tiling by the residual (i.e. quotient) group $PSL(2,\mathbb{Z}_N)$.

The special case of reduction mod $N=0$ obviously gives the identity map $\mathbb{Z}\rightarrow\mathbb{Z}$, and makes $\Gamma(N)$ the trivial group, so we get the full tiled hyperbolic plane. At the opposite extreme, reduction mod $N=1$ sends $\mathbb{Z}$ to the trivial ring, and sets $\Gamma(N)$ to the entirety of $PSL(\mathbb{Z}, 2)$, so reduces the surface down to one covered by a single tile.

Including $\Gamma(N)$ in larger subgroups enables us to quotient the reduced surfaces even further.

And this is basically what I’m going to be talking about for the next few weeks.

I’ll just say something about how I’m going to write the reduced fractions. I’ll represent the congruence classes of the numerator and denominator in the usual way by numbers lying in $[0,N)$. The fact that we can cancel a factor of $-1$ enables us to send $\frac{a}{b}$ to $\frac{-a}{-b}$, or in other words to $\frac{N-a}{N-b}$ (mod $N$), so we’ll use this to ensure that all denominators are $≤N/2$ when writing our reduced fractions down; also, by the same mechanism, we can ensure that if the denominator is $0$, or if $N$ is even and the denominator is $N/2$ (hence equal to minus itself), then the numerator is also $≤N/2$. So, for instance, (mod $10$) we’ll be writing $\frac{2}{3}$ rather than $\frac{8}{7}$, and $\frac{3}{5}$ rather than $\frac{7}{5}$.

**The Plane over $\mathbb{Z}/(4)$**

Let’s look at an example of this. Here, in the picture below, are the six lines which lie in the plane over $\mathbb{Z}/(4)$. Since $\mathbb{Z}/(4)$ is cyclic, the plane over it is a kind of torus, and the lines wrap round! But since I’m forced to draw this on a flat surface, some of the lines end up broken into several pieces in the diagram below. I’ve given each line a different colour to make it clear what belongs with what.

Let’s look at an example of this. Here, in the picture below, are the six lines which lie in the plane over $\mathbb{Z}/(4)$. Since $\mathbb{Z}/(4)$ is cyclic, the plane over it is a kind of torus, and the lines wrap round! But since I’m forced to draw this on a flat surface, some of the lines end up broken into several pieces in the diagram below. I’ve given each line a different colour to make it clear what belongs with what.

Let’s be more explicit. Listing the lines by the points they contain, we have

$\frac{1}{0}: \{\frac{1}{0},\frac{2}{0},\frac{3}{0},\frac{0}{0}\}$

$\frac{0}{1}: \{\frac{0}{1},\frac{0}{2},\frac{0}{3},\frac{0}{0}\}$

$\frac{1}{1}: \{\frac{1}{1},\frac{2}{2},\frac{3}{3},\frac{0}{0}\}$

$\frac{2}{1}: \{\frac{2}{1},\frac{0}{2},\frac{2}{3},\frac{0}{0}\}$

$\frac{3}{1}: \{\frac{3}{1},\frac{2}{2},\frac{1}{3},\frac{0}{0}\}$

$\frac{1}{2}: \{\frac{1}{2},\frac{2}{0},\frac{3}{2},\frac{0}{0}\}$

Note that, e.g. $\frac{1}{3}=\frac{3}{1}$ but $\frac{1}{2}\ne\frac{2}{1}$.

Some, but not all, of the points “generate” the line they lie on: e.g. if we simultaneously multiply the numerator and denominator of $\frac{1}{3}$ by, successively $1$, $2$, $3$ and $0$, we get all the points on the line $\frac{3}{1}$ (viz. $\frac{1\cdot 1}{1\cdot 3}=\frac{1}{3}$, $\frac{2\cdot 1}{2\cdot 3}=\frac{2}{2}$, $\frac{3\cdot 1}{3\cdot 3}=\frac{3}{1}$, and $\frac{0\cdot 1}{0\cdot 3}=\frac{0}{0}$), but this does not work with $\frac{2}{2}$ (which, indeed, lies on *two* lines through the origin). We get a fraction which generates a line whenever the numerator and denominator do not have a factor in common which is also a factor of $N$. (Shared factors which are coprime to $N$ are fine.)

Because, in our rules for reducing mod $N$, we are not allowed to cancel common factors other than $-1$, the “fractions reduced mod $N$” correspond not to the lines in ${\mathbb{Z}_N}^2$ themselves but to all the points which generate the lines—mod cancellation of factors of $-1$ as usual. Mod $4$, there are two generators for each line—but the ability to cancel factors of $-1$ means that they are secretly the same (e.g. $\frac{1}{3}=\frac{-1}{-3}=\frac{3}{1}$); so in the case of mod $4$, there is just one fraction per line. But this is not generally true. For instance, mod $5$ we have that $\frac{1}{1}$ is different from $\frac{2}{2}$, since they correspond to different generating points, even though they generate the same line.

**We Want More!**

So much for reduced points. But what about reduced edges? And reduced triangles? And the reduced tilings of reduced surfaces!

Since there are only a finite number of fractions mod $N$, we end up with only a finite number of mediant triangles in our tiling, which will tile a compact quotient surface of the hyperbolic plane. My real goal in this post is to show you some pictures of this happening.

**Some Arrangements Of Triangles**

Let’s start nice and small with $N=3$. Our rule for denominators (that they must be $\leq \frac{N}{2}$) ensures that in this case the denominator must be either $0$ or $1$, and, in the case where the denominator is $0$, our rule for numerators ensures that the numerator must be either $0$ or $1$. However, $\frac{0}{0}$ is ruled out. The reason is that this would have to come from a fraction over $\mathbb{Z}$ whose numerator and denominator were both multiples of $3$—but those original fractions over $\mathbb{Z}$ were all reduced to their lowest form, and so wouldn’t have had this common factor in there in the first place. So the only fractions we are left with mod $3$ are $\frac{0}{1}$, $\frac{1}{1}$, $\frac{2}{1}$ and $\frac{1}{0}$. *Any* three of these form a mediant triangle (i.e. one is the mediant of the other two—mod $3$, of course!), so we get the following picture:

Lets go up to $N=4$.

Here, the allowed fractions are $\frac{1}{0}$, $\frac{0}{1}$, $\frac{1}{1}$, $\frac{2}{1}$, $\frac{3}{1}$ and $\frac{1}{2}$, as we saw above. Note that there is no $\frac{0}{2}$ or $\frac{2}{2}$ because $2$ is a factor of $N$ (viz. $4$) and so the parent fraction in $\mathbb{Q}$ would have had to have had a common factor of $2$ on top and bottom—which it can’t have done because it was reduced to lowest form. Not all of these triplets form mediant triangles: the arrangement of triangles actually looks like this:

And now up to $N=5$. Here we get to see two different fractions with denominator $0$ (viz. $\frac{1}{0}$ and $\frac{2}{0}$)—symmetrically placed opposite one another, at top and bottom.

Yes, if you’re not sure—that *is* an icosahedron.

Why would the Platonic solids fall out of modular arithmetic like that?

Well, actually it’s not really surprising. Consider the tiling of the hyperbolic plane induced by the full set of Farey sequences over $\mathbb{Z}$. Consider, in particular, the $\infty$ vertex $\frac{1}{0}$ and its neighbours, which are just the integers. Adding $1$ to all vertex fractions is a symmetry of this tiling, which sends $\frac{1}{0}$ to itself and each integer to its neighbour. (The corresponding element of $PSL(2, \mathbb{Z})$ is $\left(\array{1&1\\0&1}\right)$). Obviously there are an infinite number of integers, so we can just keep adding $1$ forever.

But think now of how this reduces mod $N$. Now, $\frac{1}{0}$ reduces to $\frac{1}{0}\;(mod N)$, $\left(\array{1&1\\0&1}\right)$ reduces to $\left(\array{1&1\\0&1}\right)\;(mod N)$ and adding $1$ reduces to adding $1$ (mod $N$). And the integers reduce to integers mod $N$. So after adding $1$ $N$ times, we get back to where we started. So there are just $N$ triangles with a vertex at $\frac{1}{0}$, rather than an infinite number as with $\mathbb{Q}P^1$. But all vertices are identical, so there are $N$ triangles meeting at *every* vertex. So we have a tiling of a surface by equilateral triangles, with $N$ of them meeting at each vertex. Which is pretty much all we need to get Platonic solids.

**Some Arrangements Of $N$-gons**

Actually, I don’t really like working with the triangular tiling, with $N$ triangles meeting at each vertex. I’d rather work with the dual tiling, where three $N$-gons meet at each vertex. As $N$ gets larger, I find the mass of triangles gets difficult to decipher and my eyes start to go funny. Also, my whole discussion obviously relies heavily on the importance of the fractions (reduced mod $N$) which in the triangle tiling get assigned to mere insubstantial *vertices*, whereas in the dual tiling they get placed into the centres of *faces*, which somehow I seem to feel is psychologically more appropriate to their important role—as well as making the numbers easier to read when you see them in a diagram. So here are the dual tilings. I’ve taken the liberty of pasting the fractions flat onto the faces instead of sticking them on invisible pins as in the previous pictures.

Here’s $N=3$.

Next, $N=4$.

Observe how rotating around the top face ($\frac{1}{0}$) adds $1$: adding $1$ to the top face does nothing ($\infty+1=\infty$); adding $1$ to the integers on the side faces sends them to their anticlockwise (as seen from above) neighbours; and $\frac{1}{2}+1=\frac{3}{2}=\frac{-3}{-2}=\frac{1}{2}$, so the bottom face is also correctly sent to itself.

Observe also that rotating $180^\circ$ around the edge separating $\frac{1}{0}$ from $\frac{0}{1}$ sends each fraction $q\rightarrow\frac{-1}{q}$. E.g. $\frac{1}{1}\rightarrow\frac{-1}{1}=\frac{3}{1}$ and $\frac{1}{2}\rightarrow\frac{-2}{1}=\frac{2}{1}$.

Both of these facts relating arithmetic and geometry are generally true, not just for $N=4$. These two operations correspond to the matrices $\left(\array{1&1\\0&1}\right)$ and $\left(\array{0&-1\\1&0}\right)$, which between them generate $PSL(2,\mathbb{Z})$ (or $PSL(2, \mathbb{Z}_N)$ as appropriate).

And here’s $N=5$.

## Re: Pictures of Modular Curves (I)

Great post, Tim! That’s gorgeous stuff.