One sum, squared two ways
Worth reading first: Counting one rectangle, twice · The polygon an equation forces.
Every proof of reciprocity so far on this ladder has counted something: lattice points below a diagonal, folds in a strip of residues, cycles in a shuffle. This one adds up complex numbers, and it is the proof that leaves the integers behind.
Fix an odd prime , let , and define
Half the terms are added and half are subtracted, and which half is decided by whether the index is a square modulo . There is no obvious reason for that sum to be anything in particular. It is , or , and which of the two is decided by modulo four.
Why the walk closes where it does
The claim to establish first is about , and the argument is a change of variable rather than a computation.
Substitute , which is legitimate because is invertible and then ranges over all non-zero residues as does. The symbol is multiplicative, so , and the exponent becomes :
The inner sum is when , since every term is then , and it is otherwise, because the full sum of all powers of is zero and the term is missing. So
using that the symbols over all non-zero sum to zero, half being and half .
The whole derivation is one substitution and one fact about roots of unity, and the fact — that the non-trivial powers of sum to — is the statement that a regular polygon’s corners have their centre at the origin.
The sign Gauss could not get
So , and therefore is one of or . The square says nothing about which.
Gauss determined the sign in 1801 and it took him four years. The answer is that when and when — always the positive root, never the negative one. In a letter of 1805 he wrote that the problem had tormented him and that the resolution arrived, as such things do, unbidden.
The figures here compute the walk directly and land on the right point, which is evidence rather than proof: a walk of twelve steps confirms and says nothing about . What the generator does assert is the part that is provable in three lines — that and that has the right sign — and it says so rather than claiming the harder half.
Reciprocity, from evaluating one number twice
The reason this construction proves the law is that can be computed in two ways.
Working modulo — that is, in a ring where has been set to zero, which is legitimate because everything in sight is an algebraic integer — the map is additive, since the binomial coefficients in between are all divisible by . So
Substituting and using multiplicativity again turns the right-hand side into .
On the other hand , and by Euler’s criterion that last factor is congruent to modulo .
Cancelling , which is invertible because and :
and the first factor is by the first supplement. Rearranged, that is the law.
What the computation actually used
Three things, and it is worth listing them because each is a different kind of ingredient.
The symbol is multiplicative. That came from the cyclic structure of the residues and is used twice, once in each substitution.
The powers of sum to zero. That is geometry — the corners of a regular polygon balance — and it is what makes the inner sum collapse.
Raising to the -th power is additive modulo . That is the freshman’s dream, true in characteristic and false everywhere else, and it is the step no counting proof has an analogue of.
The third is the one that makes this proof generalise. Counting lattice points is a technique with a ceiling; working in a ring of characteristic and using that the -th power map is a homomorphism is the beginning of a subject.
The sum as a shape
The walks are worth looking at as pictures rather than only as computations, because they have a structure the algebra does not mention.
Each is made of unit steps at angles , and the sign attached to each step means the walk goes round the circle of directions taking every other one forward and every other one backward, in the pattern of the squares. The pattern of squares modulo is not periodic in any simple way, so the walk is not a polygon and not a spiral; it wanders and returns.
What is fixed is the endpoint. Whatever the shape of the excursion, it finishes at distance from where it began, and along one of two axes. A picture where the intermediate points look arbitrary and the last one does not is a good picture of a theorem: the content is in the destination.
These curves are not the ones usually shown. The famous Gauss-sum picture is of the partial sums of , which trace out a curve of spirals and straight runs and were studied for their own sake. The walk here is a close relative — the two sums are equal, since counts each square residue twice and adds — and the drawing is different because the terms are taken in a different order.
Why the two sums are the same
That identity is worth doing, since it explains why the literature’s sum and this page’s are interchangeable.
The count is for , for a non-zero square, and for a non-square — which is exactly . So the sum is
because the first part sums all roots of unity to zero. The two sums agree exactly, and the choice between them is a choice of which computation to make visible.
A worked evaluation, at five
Small enough to do by hand. Modulo five the squares are and , and the non-squares are and . So
with . The pairs are conjugate, so and , and both are real. Numerically and , so , which is .
Those two cosines are the golden ratio and its negative reciprocal, which is not a coincidence: they are the two roots of , the quadratic whose roots are Gauss’s periods for . The Gauss sum is their difference, and the difference of the roots of a quadratic is the square root of its discriminant — here .
That is the general mechanism in its smallest case. The Gauss sum is the difference between the sum of the square roots of unity and the sum of the non-square ones, those two sums are the roots of a quadratic with integer coefficients, and says the discriminant of that quadratic is .
The sum is a Fourier transform of itself
There is a second reason this particular sum is the one everybody studies, and it has nothing to do with reciprocity.
The Legendre symbol, read as a function on the residues modulo , is one of the multiplicative characters of that group, and the Gauss sum is exactly its discrete Fourier transform evaluated at one point. More is true: the symbol is its own transform up to the factor . Transforming the function returns the same function multiplied by , which makes the symbol an eigenvector of the transform and its eigenvalue.
That is why the absolute value comes out at rather than at anything else. The discrete transform on points scales lengths by , so any eigenvector has an eigenvalue of that size, and is a statement about the transform rather than about squares. The theorem that took three lines above is, from this angle, a special case of a conservation law: the transform preserves total energy, and an eigenvector’s eigenvalue has to have modulus matching the scaling.
Two subjects agreeing on a number is usually a sign they are the same subject. The discrete transform on the residues modulo and the arithmetic of squares modulo are built from the same group, and every fact about one is a fact about the other written in different notation. The Gauss sum is the dictionary entry that gets used most.
Where the quadratic field comes in
The last observation is the door out of elementary number theory, and it is worth opening a crack.
The sum of the square roots of unity and the sum of the non-square ones both lie in the field generated by , and each is fixed by every element of that field’s symmetry group that squares things — so both live in a subfield of index two. That subfield is where , and is the element that generates it.
So the Gauss sum is a bridge: it exhibits the quadratic field sitting inside the cyclotomic field . Reciprocity, in the language that grew out of this, is the statement that every quadratic field sits inside a cyclotomic one — and Kronecker and Weber later proved the same is true of every field with abelian symmetry group whatever.
That is what makes this proof the important one. The lattice count is a beautiful argument that ends where it starts. This one names an object that turns out to be the first case of a general theory, and it names it in the course of proving something elementary.
Four years for a sign, and what that says about the subject
The chronology of this one result is unusually well documented, because Gauss kept a diary.
He had the theorem by 1801, when the Disquisitiones appeared, and he needed the sign for his fourth proof of reciprocity. He computed the sum numerically for many primes, saw the pattern immediately, and could not prove it. The diary entry recording the eventual proof is dated 30 August 1805, and the accompanying letter to Olbers describes four years of trying every week without success, and then the answer arriving all at once, unconnected to anything he had been doing.
What is worth taking from that is not the anecdote but the difficulty ratio. The square of the sum takes three lines. The sign of the sum took the best analyst of the age four years. The two statements look equally hard from outside and are not remotely: one is an algebraic identity that any manipulation will produce, the other is a determination of a branch, and determining branches is a different kind of problem with a different kind of proof.
Modern proofs of the sign go through a limiting argument, or through the analytic behaviour of theta functions, or through counting eigenvalues of the discrete transform — and all of them import machinery from outside the algebra. That, rather than Gauss’s persistence, is the lesson: an algebraic identity leaves a sign undetermined precisely because algebra cannot see order, and settling it needs an ingredient that can.
The pattern repeats throughout this subject. The existence of a solution is often much easier than the size of one; the fact that something is a square is easier than exhibiting the root; and a magnitude is easier than an argument. Where a proof stops is usually where the technique stops seeing.
What the picture cannot show
The sign is asserted and not proved. The figures compute the walk for one prime at a time and find the positive root, at every prime they are drawn for. Gauss’s four years were spent on the statement that this always happens, and nothing in a picture of one walk bears on it.
The proof of the law happens in a ring the picture does not contain. Working modulo inside the algebraic integers is where reciprocity comes from above, and there is no drawing of it: the objects are congruence classes of algebraic numbers, and a plane figure of the walk lives in the complex numbers with no congruence in sight.
And the walks are only drawn small. At every step is visible; at the excursion is a tangle. The theorem is about all primes and the pictures stop where legibility does.
What such sums are actually used for
Reciprocity is the historical reason for the Gauss sum and not the main modern one. The main one is counting.
Ask how many pairs of residues satisfy an equation modulo — say , or . The count is close to , because a curve through a grid of points meets about of them, and the interesting quantity is the error. Writing the number of square roots of a residue as , exactly as the identity between the two sums did above, turns the count into a sum of Legendre symbols, and a sum of Legendre symbols against a character is a Gauss sum or a close relative called a Jacobi sum.
The consequence is a bound. Since , the error in the count is of size rather than of size — and that single fact, in its general form, is the Weil conjecture for curves. The square root that took Gauss four years to sign is the square root in every modern estimate of how many solutions an equation has modulo a prime.
The smallest instance is worth carrying because it can be checked by hand. The number of solutions of modulo a prime is exactly , and modulo it is exactly — a discrepancy of one either way, decided by the same congruence that decides the first supplement. The circle over a finite field remembers whether is a square, and it is the only thing about the field it remembers.
That is the shape of the whole business. A count that is nearly what it should be is uninteresting; the error term is where the arithmetic is, and the Gauss sum is the object that measures it.
Where it fails, and what it needs
The sum is quadratic and the pattern does not simply continue. The obvious generalisation replaces the Legendre symbol with a cubic or quartic character, and the resulting sums do have absolute value — but their arguments are not determined by any congruence, and the corresponding higher reciprocity laws need the cubic or quartic residue symbol to be defined over or rather than over .
The proof needs and distinct and odd. The step cancelling requires invertible modulo , which needs . The supplements are outside this argument for the same reason they are outside the lattice one.
And the sum is over a prime modulus. For composite the analogous sum can vanish, and the theory of when it does is a subject with its own name.
Where the ladder goes next
The last rung asks what all this is for, and the answer turns out not to be about squares at all. Which primes a quadratic form represents is decided by a congruence condition exactly when the relevant class group is small enough, and reciprocity is the first and easiest case of that. The Gauss sum is the object the general theory is built on, and the last rung is where it is pointed at something.
Sideways: the cyclotomic polynomial is the algebra behind the roots of unity used throughout, and the sign of a shuffle is the previous rung’s completely different route to the same law.
What is worth carrying away
An identity between two evaluations of one quantity is worth more than either evaluation.
Nothing here computes anything hard. takes a substitution; takes the freshman’s dream. What produces a theorem is that the two are computations of the same number, so setting them equal says something neither said alone.
And the object outlives the proof. The lattice-point argument proves reciprocity and stops. The Gauss sum proves reciprocity and then turns out to be the element exhibiting one field inside another, which is the beginning of class field theory. When a proof introduces a new object rather than a new count, the object is usually the part that lasts.
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 two supplements, and where the eight comes from — both name legendre symbol, quadratic reciprocity, quadratic residue
Named objects
A dashed tag is an object no other essay names yet.
Complex numbersCyclotomic polynomialGauss sumLegendre symbolPrimitive elementQuadratic reciprocityQuadratic residueRoots of unity