MATH3301/3401 -Quadratic Reciprocity

This page - Gauss's Lemma Quadratic Reciprocity References

Gauss's Lemma

Whilst looking for a simple proof of the Law of Quadratic Reciprocity, Gauss (in 1808) discovered a lemma which now bears his name. Given an odd prime p and a residue a (mod p) which is prime to p, the lemma describes a necessary and sufficient condition for a to be a quadratic residue (mod p). Before stating the lemma, we need to recall some facts.
The p-1 integers ±1, ±2, ...,±(p-1)/2 form a reduced set of residues mod p. Consequently, for each x in the range 1 through (p-1)/2,
ax ≡ ±ux (mod p)
where the integer ux is again in the range 1 through (p-1)/2.
The numbers ux (x = 1, 2, ..., (p-1)/2) are in fact distinct [Exercise: prove this] and are therefore the numbers 1, 2, ..., (p-1)/2 in some order.
Let M be the number of these congruences in which the sign is negative. We are now ready to state Gauss's lemma ...

Lemma   -   With the above notation, (a/p) = (-1)M.

[In words:   a is a quadratic residue (mod p) if, and only if, M is even.]

Proof We multiply together the (p-1)/2 congruences

ax ≡ ±ux (mod p)   (x = 1, ..., (p-1)/2)
to obtain
a(p-1)/2.1.2....(p-1)/2 ≡ (-1)M.1.2....(p-1)/2   (mod p).
[Recall that the ux's are the numbers 1, ..., (p-1)/2 in some order.]
As the product 1.2....(p-1)/2 is prime to p, we may cancel it to obtain
a(p-1)/2 ≡ (-1)M (mod p).
We now use Euler's Criterion which states that
a(p-1)/2 ≡ (a/p) (mod p).
As (a/p) = ±1 and p is odd, we conclude that (a/p) and (-1)M must be equal:
(a/p) = (-1)M.QED

Two examples of Gauss's lemma

p = 13a = 3x =   123456 
  ax =   369121518 
  ±ux =   36-4-125 ⇒   3 is a square mod 13
p = 13a = 7x =   123456 
  ax =   71421283542 
  ±ux =   -61-52-43 ⇒   7 is a non-square mod 13

An important corollary

If p is any odd prime then
2 is a square mod p if p ≡ 1 or 7 (mod 8);
2 is a non-square mod p if p ≡ 3 or 5 (mod 8).
Proof Taking a = 2 in Gauss's lemma, we obtain
2 is a square mod p if, and only if, M is even.
To complete the proof, we need to determine M, ie the number of congruences
2x ≡ ±ux (mod p)   (x = 1, ..., (p-1)/2;   1 ≤ ux ≤ (p-1)/2)
in which the sign is negative. It's not hard to see that the sign will be negative if, and only if, x lies in the range (p-1)/4 < x ≤ (p-1)/2. [See the examples below.] The number of integers in this range is precisely (p-1)/2 - [(p-1)/4] where [...] is the floor function. Thus
M = (p-1)/2 - [(p-1)/4].
As p is odd, there are just two cases to consider: The corollary is now proved. QED
CommentThis corollary is usually stated in the form (2/p) = (-1)(p2-1)/8.
[Exercise: Prove that the two ways of stating the corollary are equivalent.]

Some numerical examples of the corollary

p = 7x =   123 
≡ 7 (mod 8)2x =   246 
 ±ux =   2-3-1 ⇒   M = 2   (2 is a square mod 7)
p = 11x =   1234 5 
≡ 3 (mod 8)2x =   246810 
 ±ux =   24-5-3-1 ⇒   M = 3   (2 is a non-square mod 11)
p = 13x =   1234 56 
≡ 5 (mod 8)2x =   24681012 
 ±ux =   246-5-3-1 ⇒   M = 3   (2 is a non-square mod 13)
p = 17x =   1234 5678 
≡ 1 (mod 8)2x =   246810121416 
 ±ux =   2468-7-5-3-1 ⇒   M = 4   (2 is a square mod 17)

Quadratic Reciprocity

In my view, one of the clearest expositions of the Law of Quadratic Reciprocity appears in "Number Theory for Beginners" by André Weil. Weil's proof of the Law works (like Eisenstein's proof) by counting integer points in a certain rectangle. My (slight) adaptation of Weil's proof makes explicit use of Gauss's lemma.
The Law of Quadratic Reciprocity (known to Euler but first proved by Gauss) states that
(p/q).(q/p) = (-1)(p-1)(q-1)/4
where p and q are any distinct odd primes. Weil's proof uses the closed rectangular region R:
Weil's Rectangle
where
m = (p-1)/2,   n = (q-1)/2.   [As p and q are odd, m and n are integers.]
Proof(after Weil)

References

Weil A., Number Theory for Beginners
Serre J-P., A Course in Arithmetic (for Eisenstein's 'Sine' proof of Quadratic Reciprocity)
Proofs of Quadratic Reciprocity (University of Heidelberg)
MATH3301/3401 home page