Which primes a form takes
Worth reading first: Counting one rectangle, twice · Two squares, and a lattice.
Fermat’s two-square theorem says that an odd prime is exactly when it is modulo four. It is a perfect answer: a question about representing a number by a quadratic expression, settled by a congruence anybody can check in a second.
The obvious next question is what happens to other forms, and the obvious guess is that each has its own congruence. That guess is right for a while and then it is spectacularly wrong, and the point at which it fails is where elementary number theory ends.
The three easy cases
For there is a congruence and it is short.
An odd prime is exactly when . It is exactly when or . It is exactly when , with the single exception itself.
Each of those is a theorem of Fermat’s or Euler’s, and each is proved the same way. The condition on is exactly the condition for to be a square modulo — which is what the supplements and reciprocity compute — and the step from there is a square root of to there is a representation goes through a ring.
For the ring is the Gaussian integers : a square root of modulo shows that is not prime there, and a factorisation of into conjugate factors is a representation. For it is and for it is the Eisenstein integers. In all three the ring has unique factorisation, and that is the load-bearing hypothesis.
Why the ring is the whole story
The chain of reasoning is worth setting out once in full, because everything that follows is about which link breaks.
Suppose is a square modulo , say . Then divides in the ring , while dividing neither factor — since dividing would mean divides , looking at the coefficient of . So is not a prime element of that ring.
If the ring has unique factorisation, not prime implies not irreducible: with both factors non-units. Taking norms, with both norms bigger than one, so . And , so a representation has appeared.
Every step is easy except the words if the ring has unique factorisation. That is where the subject actually lives, and the reason the elementary treatment covers and stops is that those are among the very few for which the ring behaves.
A form is a lattice, and two forms can be one lattice
The clean way to say what is going on uses lattices rather than expressions, and it makes the count of forms into a count of shapes.
The values of are the squared lengths of the points of a rectangular lattice with sides and . Changing coordinates by an invertible integer matrix of determinant one changes the expression and not the lattice, so and are the same object written twice. What is genuinely different is a lattice of the same determinant with a different shape, and the number of such shapes is the class number.
That reformulation is what makes the subject finite. For there are two shapes of lattice with the right determinant, giving and ; a prime represented by the first is a point at the right distance in the first lattice, and a prime represented by the second is a point in the other. For there is one shape, and that is exactly the statement that every prime passing the congruence is represented by the one form.
A lattice’s own arithmetic is therefore the object, and the form is a coordinate system on it. The switch of viewpoint costs nothing and explains why the answers come in finite lists.
Where unique factorisation fails
The standard first failure is . In ,
and all four factors are irreducible with no common refinement. So the argument above breaks: a prime can fail to be irreducible without a factor of norm existing.
The consequence is visible in the answers. A prime is when or , and it is represented by the other form when or . The congruence condition for to be a square modulo covers all four classes; which of the two forms actually represents needs one more bit of information, and that bit is still a congruence.
So is not the counterexample. It is the first case where the answer needs two forms rather than one, and the split between them is still decided modulo . The class group has order two, the two classes are told apart by congruences, and everything remains elementary.
The case where congruences run out
The counterexample is , and Gauss found the answer.
An odd prime is exactly when and is a cube modulo . The first condition is a congruence. The second is not, and cannot be made into one.
The hero figure demonstrates the failure without proving it. For every modulus up to a hundred and sixty, the search finds two primes in the same residue class that disagree about whether they are , over the fourteen hundred primes below twelve thousand. The smallest pair is easy to check by hand: , and is not , since and are neither of them squares. Both are modulo .
That is evidence and not a proof, and the essay says so where the figure does. What makes it a theorem is a statement about symmetry groups: a condition on expressible by congruences is exactly a condition that comes from a field whose symmetry group is abelian, and the field where is a cube is decided has symmetry group , which is not — and that group’s refusal to come apart is the same obstruction, in the same group, that stops the quintic being solved by radicals.
Why “abelian” is the dividing line
The reason is worth stating even in outline, because it is the whole of the modern answer.
A congruence condition on modulo is a statement about which class falls into in the group of units modulo . By the theory that grew out of the Gauss sum, that group is the symmetry group of the field generated by the -th roots of unity. So congruence conditions correspond exactly to fields sitting inside a cyclotomic one — and those are exactly the fields whose symmetry group is abelian, because a subgroup of an abelian group’s quotients is abelian.
The condition 2 is a cube modulo is about how splits in the field generated by a cube root of two, and that field’s symmetry group is . Since is not abelian, the field is not inside any cyclotomic field, and the condition is not any congruence.
So the reason is easy and is not is that one is governed by an abelian group and the other is not, and the whole of class field theory is the systematic version of that sentence.
Which n are easy, and how few there are
The forms for which a single congruence answers everything are those where the class group is trivial, and the list is short: among the small ones, and famously nothing beyond a finite list.
The precise statement is a landmark. The imaginary quadratic fields with unique factorisation have discriminants and no others — a fact conjectured by Gauss, and proved twice in the twentieth century after a first proof by Heegner in 1952 was wrongly dismissed for a decade.
Nine numbers, and then nothing forever. That is an unusual shape for a theorem in this subject, where answers are normally infinite families, and it says that the elementary case is not the typical case but a finite accident.
The next tier — class number two — is also a finite list, and covers cases like where two forms and a finer congruence suffice. Beyond that the classes multiply and no arrangement of congruences separates them.
The count, not just the existence
Once the existence question is settled the counting question follows almost for free, and it is worth having because it is prettier than the existence statement.
The number of ways to write as an ordered sum of two squares, counting signs and orders as different, is four times the difference between the number of divisors of congruent to modulo four and those congruent to . So has divisors , all modulo four, giving representations — which are the four sign choices on and , and the eight on and .
That formula is Jacobi’s, and it is a statement about the divisor structure of a number rather than about squares. The bridge is again the ring: counting representations counts factorisations in the Gaussian integers, and factorisations there are read off the factorisation in the integers by splitting each prime according to its residue class.
Existence is a yes-or-no about one prime; the count is a multiplicative function on all integers. The second is the stronger statement and it is the one that generalises to the other easy forms, each of which has its own count with its own divisor condition.
The Legendre symbol as the first case of everything
Standing back, reciprocity looks different from this rung than it did from the first.
The law says: whether is a square modulo is determined by modulo . Read in the language above, it says the condition is a square mod — which is a statement about how splits in — is a congruence condition, because sits inside a cyclotomic field. And the Gauss sum is the element that exhibits it there.
So the whole ladder has been climbing one statement. The rectangle counted two ways, the sign of a shuffle, the sum of signed roots of unity — each proves that a quadratic field is cyclotomic, in a language that hides what is being proved. The last rung’s job is to say what it was.
Every proof on this ladder proves the same theorem and only one of them names the object. That is the argument for the Gauss sum being the important proof, made from a rung it could not have been made from earlier.
Higher reciprocity, and why it needs a bigger ring
The natural extension asks about cubes and fourth powers, and it immediately leaves the integers.
Gauss found that a law for fourth powers is clean only over , and one for cubes only over the Eisenstein integers. Stated over they are a mess of cases; stated over the right ring they look like reciprocity again. His remark, in the 1828 paper on biquadratic residues, is that the natural home for such a theorem is not the ordinary integers, and that observation is the reason algebraic number theory exists.
The pattern the ladder has been describing therefore continues: each reciprocity law is a statement that a condition on primes is a congruence in a suitable ring, and the general theorem — Artin’s reciprocity law of 1927 — covers all of them and is the summit of the abelian theory. What lies beyond it, where the symmetry group is not abelian, is where lives, and that is not finished.
Doing one case by hand
Take and ask whether it is .
First condition: , so . Passed.
Second: is a cube modulo ? The cubes modulo form a subgroup of index three in the group of order sixty, so there are twenty of them, and is a cube exactly when . Computing, , so , which is not . So is not a cube modulo , and is not .
Checking directly: and , and is not a square. Correct.
The test that decided it was an exponentiation, not a congruence, and that is exactly the difference this rung is about. Nothing about ’s residue class modulo any fixed modulus was consulted at the second step.
What a table of primes shows and what it hides
It is worth being clear about what a reader can and cannot get from staring at the data, because this is a subject where the pattern is visible long before it is provable and one of the patterns is not there.
For the pattern is obvious after twenty primes: the represented ones are and the unrepresented , and the split by residue modulo four jumps out. Euler had exactly this kind of table and the conjecture cost him nothing; the proof cost seven years.
For the represented primes below three hundred are and , and there is no pattern to find, because there is none. A reader who sorts them by residue modulo any modulus small enough to try will see classes that are partly represented and partly not, and will conclude either that the modulus is too small or that something else is going on. Both conclusions are reasonable and only the second is right.
A negative result about patterns is much harder to reach from data than a positive one. Seeing a pattern takes twenty numbers; establishing that none exists takes the theory of field extensions, and no amount of further computation substitutes.
What the picture cannot show
The refusal is demonstrated over a range and not proved. The hero sweeps every modulus up to a hundred and sixty against fourteen hundred primes and finds a disagreeing pair each time. A modulus of ten thousand is not tested and a proof would have to cover all of them; the argument that does is the one about abelian symmetry groups, and it is algebra rather than search.
The failure of unique factorisation is invisible in a lattice. The points of look exactly like the points of , differently spaced. What distinguishes them is which elements divide which, and divisibility is not a property of a point’s position.
And the marked rows are of primes below two hundred. Every claim of the form exactly these residue classes is a statement about all primes; the search that supports it runs to twelve thousand and stops there.
Where the ladder goes next
This closes the ladder. It began with a rectangle of dots counted along its rows and then along its columns, and it ends with the observation that the theorem that rectangle proves is the first case of a correspondence between congruences and symmetry groups — which is a subject rather than a result.
What remains unwritten from here is not a further rung on reciprocity but a different anchor: the arithmetic of quadratic forms in their own right, where the class group is the object and reciprocity is a tool. Sideways, the primes that are sums of two squares is where this rung’s easiest case was proved for its own sake, and unique factorisation and where it fails is the hypothesis every argument here leaned on.
What is worth carrying away
The reach of an elementary method is usually decided by a structural fact nobody mentions while using it.
The two-square theorem is proved in a paragraph, and the paragraph works because has unique factorisation. Nine imaginary quadratic rings do; the rest do not; and the whole difference between a subject that can be done by hand and a subject that needs a theory is that finite list.
So the useful question about any elementary argument is which of its steps is quietly a theorem. Here it is the one that reads and therefore it factors, which is four words long and is the entire content.
What links here
Computed from the collection, not written here: the essays that point at this one.
Shares its objects with
Essays that name at least two of the same things, and that neither author linked.
- The symbol is the sign of a shuffle — both name legendre symbol, modular arithmetic, quadratic reciprocity, quadratic residue
- Always one before the double — both name primes, unique factorisation
- Eighteen people, and the seventeen that escape — both name modular arithmetic, quadratic residue
- Necklaces that prove a theorem — both name modular arithmetic, primes
- Numbers that wrap — both name modular arithmetic, primes
- The identity that multiplies sums of squares — both name primes, sums of two squares
Named objects
A dashed tag is an object no other essay names yet.
Gaussian integersLegendre symbolModular arithmeticPrimesQuadratic reciprocityQuadratic residueSums of two squaresUnique factorisation