In studying the representation of primes by quadratic forms, Euler came across a phenomenon that is quite easy to observe numerically but rather difficult to explain. Sometimes a congruence condition tells us that a prime is represented by a particular quadratic form. Sometimes it tells us only that the prime is represented by one of several forms. And sometimes a representation that is impossible over the integers becomes possible as soon as we allow fractions. What is the relationship between these observations? We shall see that Gauss’s principal genus theorem gives a surprisingly precise answer.
A conjecture of Goldbach and Euler
In their correspondence in 1753, Goldbach and Euler considered the following question. If a prime is congruent to
modulo
, can it be written as
? The familiar theorem on sums of two squares gives an affirmative answer when
. Several other examples suggest that the same thing might happen for larger values of
.
In each line the prime is congruent to modulo four times the coefficient of the second square. But Euler noticed an interesting exception. Take
and
. Certainly
. If
with integers
, then
. The only possible values of
are
, none of which is a square. Yet Euler found the following representation:
So the conjecture fails over the integers but succeeds in this example over the rationals. Euler accordingly proposed that the variables should be allowed to be rational. In modern notation, the Goldbach–Euler conjecture says that for every positive integer and every prime
, there are rational numbers
such that
What exactly have we gained by allowing fractions? Clearing denominators shows that this is equivalent to finding integers , with
, such that
. In other words, we no longer insist that the form represent
itself. It is sufficient that it represent
multiplied by a square. For Euler’s example, the multiplier is
:
. This small change in the representation problem is the reason that squares in the group of quadratic forms will enter the argument.
Forms representing primes
Let us first suppose that is squarefree. We want to find a square root of
modulo
. Why might this help? If
, then
is divisible by
. We have at least found a value of the principal form divisible by the prime, even if we have not yet found a representation of the prime itself. The existence of
follows from quadratic reciprocity. For every odd prime
, the condition
gives
and
. Consequently
. If
, then
, so
. Also
. Multiplying these equalities gives
.
Choose such an and put
. Instead of trying to make
smaller, let us use the equation
to construct another quadratic form:
Its discriminant is , which is exactly the discriminant of
. It is primitive: a common prime divisor of the coefficients would have to divide both
and
, and hence
, which is impossible. Moreover,
. Thus we have found an integral quadratic form of the right discriminant which represents our prime. The only remaining question is how this form is related to the principal form.
For example, for and
we can take
, since
. We obtain
, where
denotes the form
. Making the determinant-one substitution
,
gives
The reduced form represents
, since
. The prime has not disappeared from the arithmetic of discriminant
. It belongs to a different class from the one we had originally hoped to use.
Square Classes and Rational Solutions
We now come to the main calculation. Suppose that a form of discriminant
represents a positive integer
, and that its class is a square under Gauss composition. We shall show that this alone is enough to obtain a rational representation of
by
.
Write . We may choose a representative
with
coprime to
. Here is why. For each prime dividing
, at least one of the three values
is nonzero modulo that prime, since otherwise all three coefficients would vanish modulo it. Choose coordinates separately at these primes and combine them by the Chinese remainder theorem. Divide out any common divisor of the coordinates, and complete the resulting primitive pair to a determinant-one integer matrix using Bezout’s identity. The represented value is now the leading coefficient of an equivalent form. In the indefinite case one may also arrange positivity by choosing coordinates in an open positive cone while preserving their congruences.
Since , we have
. Replace
by
. The middle half-coefficient becomes
and the last coefficient becomes
. Choose
so that
. We have now arranged that the last coefficient is a multiple of the first, so we can write
The advantage of this arrangement is that the composition rule becomes especially simple:
One can see the multiplication behind this rule explicitly. Put and
. Then direct expansion gives
. The condition
is the condition for the usual primitive composition formula in this case.
The form is equivalent to
, so there are integers
such that
. Multiply by
and complete the square:
Dividing by gives the desired rational representation:
This is the important point in the argument. A square class has a representative whose leading coefficient is a square. When we complete the square in that representative, the leading coefficient supplies precisely the square multiplier that Euler needed. In fact the calculation proves more than the assertion about a single prime: the entire form is equivalent to the principal form over the rationals.
Principal Genus
We have reduced Euler’s problem to showing that is a square class. This is where Gauss’s principal genus theorem enters. It tells us that a primitive form belongs to the principal genus if and only if its class is a square. We shall use the theorem for primitive forms, with proper equivalence (and the positive or narrow class convention for indefinite forms). In particular we allow discriminants of nonmaximal orders, such as
.
Put , and let
be the set of invertible residues modulo
represented by the principal form
. This set is a subgroup of
. Indeed,
belongs to it and the identity
shows that it is closed under multiplication. Since the group is finite, closure under multiplication also gives closure under inversion.
Now notice the identity
As is coprime to
, the substitution
is invertible modulo
. Thus the invertible residues represented by
are precisely those represented by
. The residues represented by
itself form the coset
. Since
, this is just
. In particular
belongs to the principal genus: its invertible represented residues are those of the principal form. By the principal genus theorem its class is a square, and the preceding calculation gives the rational representation of
.
This proves the Goldbach–Euler theorem for squarefree . For arbitrary positive
, write
with
squarefree. Apply the result to
, using
, and replace
by
in the resulting representation. The proof is complete.
Example:
Let us see how the square-root calculation works for discriminant . The primitive reduced forms are
,
and
. We found that
is represented by the last of these. The class group has order three, so every class is a square. We can also calculate a square root directly. Replacing
by
in
gives
. Hence
The form on the right is equivalent to , as is seen by substituting
. The prime
is represented by the square form, since
. Completing the square, we get
Thus . This is a different answer from Euler’s, but it has been obtained systematically from the composition square root. Other examples of the same phenomenon are
None of these three primes has an integral representation by . The class group has three elements but just one genus. Congruences distinguish the genus, not the individual class. In a class group of odd order, squaring is a bijection, so every class is in the principal genus even when the principal class is only a small part of the class group.
Another Problem
Euler also considered the equation for a squarefree integer
. If
are integers, we can immediately obtain a necessary condition by looking at the parity of
. If
is even, then
is divisible by
. If
is odd, then
. Hence
for some integer . Euler conjectured that this condition was sufficient for an integral solution. Lagrange found a counterexample, discussed below. We will see that for an odd prime
the displayed congruence is equivalent to rational solvability of
. This restriction to odd primes is deliberate: the congruence criterion as printed in Lemmermeyer’s Lemma 1 requires a qualification at
, for example
but
is neither a square nor a square plus seven modulo
.
The argument is very close to the one we have just given. Let be the invertible residues represented by
modulo
. The parity calculation shows that Euler’s criterion is exactly the assertion
, since the residues in its two alternatives are attained by setting
or
. If we know
, choose
and construct
. The identity
shows that the invertible residues of
are
. Thus
belongs to the principal genus. Taking a composition square root and completing the square as before gives a rational representation by
. We only need to justify the modular square root, and to check necessity when denominators are allowed.
For each odd prime , Euler’s two alternatives become the same condition modulo
, namely
. At two, there are three possibilities. If
, the two alternatives allow both odd residues modulo four: take an odd
in the first alternative and an even
in the second. If
, both alternatives require
. Finally, if
is even, then
is twice an odd number and the oddness of
forces
to be odd. Odd squares are
modulo eight, so the allowed residues are
and
modulo eight. Conversely these separate conditions imply Euler’s criterion, by choosing the appropriate alternative at two and combining the square roots at odd primes using the Chinese remainder theorem.
These are precisely the genus-character conditions. To see this, let be the fundamental discriminant of
, so that
if
and
otherwise. Factor
into prime discriminants. An odd prime
contributes
, and quadratic reciprocity says
. The possible factors at two are
, whose characters are positive on precisely the three restricted sets of residues in the table. To check which factor occurs, note that the product of the odd prime discriminants is always
modulo four. If
one needs the factor
; if
, one needs
for
and
for
.
Consequently Euler’s criterion is equivalent to
Multiplying these symbols gives , and since
is a square, this gives
. This establishes the modular square root required above and finishes the sufficiency argument.
Denominators
Suppose now that we have a rational representation. Clear denominators and cancel the common divisor to get with
. For an odd prime
, reducing modulo
gives
. If
, then
, and returning to the equation gives
. Since
is squarefree, this forces
, a contradiction. Thus
is invertible modulo
and
.
At two, if there is no condition to check. If
and
is even, reducing modulo four forces both
and
to be even. Thus
is odd. The variables
have opposite parity, and in either case
. If
is even and
is even, reduction modulo two forces
even, and reduction modulo four then forces
even. Again
is odd, and so is
. Reducing modulo eight now gives
, which is either
or
according to the parity of
. We have recovered every condition in the table. So allowing rational coordinates removes the obstruction coming from individual form classes but does not remove the genus obstructions.
Examples:
For , the prime discriminants are
and
. Thus rational representation by
requires
and
, or equivalently
. By contrast, the weaker condition
allows
. For example,
divides
, but cannot be represented even rationally:
would force
, and then
, to be divisible by five. The reduced forms of discriminant
are
and
, so the class group has order two and its square subgroup is trivial. Thus in this case the rational criterion is also an integral criterion. For instance,
,
, and
.
For , the prime discriminants are
. Rational representation requires
and
. The resulting residue classes modulo
are
. The four reduced classes are
. The last two are inverses and
, so the principal genus consists of the first two forms. We can actually see their rational equivalence by expanding the identity
For instance, gives
. Similarly
. Neither prime has an integral representation by the principal form: for
the possible differences
are
, and for
they are
.
Euler himself observed a related phenomenon for discriminant . The forms
and
have the same prime residue classes although they are inequivalent over the integers. His example was
, which is not represented integrally by
. We can recover its rational representation from composition. The form
is equivalent to
by the substitution
. Squaring gives
, which is equivalent to
by interchanging variables with a sign change and then translating the first variable. Completing the square gives
Taking gives
. Euler’s own representation was
. Both express the rational equivalence of the two forms. Notice that the discriminant
of these integral forms is not the fundamental discriminant
of their quadratic field. The prime discriminants for the latter are
and
, so the rational criterion is
, with no extra condition modulo four.
Lagrange’s counterexample to Euler’s integral conjecture is particularly interesting because the form is indefinite. Take and
. The congruence condition is satisfied, since
. Nevertheless
has no integral solution. How can we prove this? Unlike positive definite forms, we cannot bound
merely by looking at the equation. But the Pell equation supplies a symmetry that allows us to reduce any hypothetical solution to a small one.
Observe that . Thus multiplication by
preserves the norm and takes integer coefficients to integer coefficients. Its inverse
also has integer coefficients. If
is a solution, change its sign if necessary to make it positive, and multiply it by a suitable integer power of
. We can arrange
Since the conjugate of is
, it lies in the same interval with endpoints possibly reversed. Hence
Squaring and using gives
, so
. The eight possible values of
are
, none of which is a square. Thus there is no integer solution. But there is a rational one:
Here the extra freedom provided by a denominator is decisive.
Legendre’s descent
The corrected conjecture can also be seen through the ternary equation . Legendre’s theorem gives rational solvability when the coefficients have the appropriate signs and
is a square modulo
and
is a square modulo
. These are exactly the two congruences established above. To see how the descent actually works, consider Lagrange’s example. We have
, then
, and finally
. These three identities reduce the equation through the sequence
The reason these reductions are reversible over the rationals is the multiplication identity . If
, a solution of
gives one of
by setting
. The same operation, exchanging
, works in reverse.
Start with for the last equation. Reversing the third step with
gives
for
. Interchange
and reverse the second step using
to obtain
, or after division by two,
, for
. Interchange the last two coordinates once more and reverse the first step with
. We obtain
, and division by two gives
. Thus
. The descent has supplied another rational solution, without any guessing of its coordinates.
Conclusion
There are really three different questions about a prime and a quadratic form
. First, can
divide a primitive value of
? This is equivalent to
. Second, can
itself be represented rationally by
? For odd primes coprime to
this requires each of the prime-discriminant characters to be positive, not just their product. Finally, can
be represented integrally by
? This requires the form class representing
to be the principal class in the chosen order. The first two questions are congruence questions; the third generally needs finer information.
Euler’s original conjecture tried to distinguish the principal class using information that distinguishes only the principal genus. His passage to rational representations was exactly the right correction. Gauss’s theorem explains this through the equality of the principal genus and the subgroup of squares, while the elementary completion of the square explains why those squares correspond to the denominators of rational representations. It is a particularly concrete instance of the relationship between congruences, norms, and class groups that would later become central to class field theory.
The historical examples and the connection with genus theory are discussed in Lemmermeyer’s article . The explicit form-composition calculations, the proof of the congruence equivalence, and the Pell reduction and descent computations here are expanded mathematical explanations. We have used quadratic reciprocity, Gauss’s composition law, and the principal genus theorem as previously established results, rather than reproving them in this article.