Summary
In today's class we began by reviewing the criteria we saw for evaluating Legendre symbols last class period, particularly when the "numerator" was either -1 or 2. Afterwards we set to proving
(1)
This required Gauss' Lemma, which lets us determine whether a is a square based on residues of products ja, where j ranges over the "first half" of residues mod p. After this, we stated and applied the Quadratic Reciprocity Law.
Review
Last class period we wrote down some rules for determining whether -1 or 2 is a square modulo a given odd prime p. Let's try to put these skills to the test.
Example: Determining whether -2 is a square
Let's try to determine whether -2 is a square modulo 467, 569, 821 and 383 (all these numbers are prime). For the first one, we notice that
(2)
Now to determine whether -1 is a square mod 467, we note that
. This means that -1 is not a square. On the other hand, to determine whether 2 is a square mod 467, we note that
. This means that 2 is also not a square mod 467. Hence we have

and so we see that -2 is a square mod 467.
Similarly we have
(4)

Gauss' Lemma
Having practiced the rules we learned last time, let's prove the result concerning the Legendre symbol
. To do so, we'll need the following
Gauss' Lemma: For p an odd prime and
, let
Then.
Before we prove this result, let's see it in practice.
Example: Is 5 a square mod 11?
Let's try to compute
. For this, we're told we need to compute
for values of j between 1 and
. So let's do it:

Notice that there are 2 residues on this list which are greater than
, and so Gauss' Lemma says that


Proof of Gauss' Lemma: To start off, we'll split the least non-negative residues from the set
(7)
into two groups: the set
will be the set of those residues that are greater than
, and the set
of residues which are less than
. Notice that none of these residues actually hit
on the nose, since this number is not an integer. So really we have
and
.
Now we claim that the integers
(8)
are the same modulo p as the integers
(9)
To see that this is true, notice that the integers from 8 are all between 1 and
— the
certainly live in this range, but since we have
we also have
. So to show that these collections are the same, we just need to show that the top collection has no repeats.
For this, we'll check three things:
- there are no repeats of the form

- there are no repeats of the form
and - there are no repeats of the form
.
To check the first, let
be given so that
and
. Then we get

Hence if
and
arose by multiplying a by distinct (mod p) numbers
and
, then
. This means we solved condition 1 above.
The proof that condition 2 works is the same as that for condition 1. For condition 3, suppose that
. Then let's let
be an integer between 1 and
so that
, and let's let
be an integer between 1 and
so that
. Then we have

This latter congruence, though, is impossible, since
has least non-negative residue between
and
. So this means condition 3 is satisfied as well.
Now that we've established our claim that 8 and 9 are the same sets mod p, we'll compute
. Now we know that this factorial is given by multiplying all the elements in together, which means that it's the same as multiplying all the elements in 8 together. Hence:

Now we can cancel the factorial on both sides of this equation (since this factorial is relatively prime to p, as it is the product of numbers all relatively prime to p). This leaves us with
(13)
Moving the minus ones to the other side of the equation, and recalling Euler's Criterion, tells us that
(14)

Corollary: For any odd prime p we have
Proof: Gauss' Lemma tells us that to compute
, we need to count the j between 1 and
for which
has least non-negative residue greater than
. But since our j lie in the range between 1 and
, this means that
lies in the range between 1 and
. In other words, we don't need to worry about "modding out" by any multiple of p to compute the least non-negative residue for
: the product
is already the least non-negative residue mod p. Hence we can say that the least non-negative residue of
mod p is greater than
precisely when

Since j is an integer and
is not, we can rewrite this last inequality as

The number of j between 1 and
which satisfy this criteria is
. Hence we have

All we need to do now is determine conditions on p that tells us when
is even or odd. For this, we'll do some investigating mod 8.
Case I: Suppose that
. This tells us that
for some integer k. In this case we get

Since this number is even, that means we have
.
Case II: Suppose that
. This tells us that
for some integer k. In this case we get

Since this number is even, that means we have
.
Case III: Suppose that
. This tells us that
for some integer k. In this case we get

Since this number is even, that means we have
.
Case IV: Suppose that
. This tells us that
for some integer k. In this case we get

Since this number is even, that means we have
.

Quadratic Reciprocity
Recall that for an arbitrary integer
and an odd prime p not dividing n, we have

Now these first two terms we know how to compute, based on the residue class of p modulo 4 and 8 (respectively). But what about the rest? If q is an odd prime distinct from p, how do we compute the Legendre symbol
? Though this sounds like a much more daunting task than the Legendre symbols we computed for -1 and 2, it is in fact just as easily resolved.
Theorem (Quadratic Reciprocity): Suppose that p and q are distinct odd prime numbers. Then we have
Notice that this theorem tells us that if either p or q is congruent to 1 modulo 4, then we have
(23)
and that if both p and q are congruent to 3 modulo 4, then we have
(24)
Example: This might have seemed impossible yesterday…
Let's try to compute
. It will help to know that both of these are prime, and it turns out that we also know that
. Quadratic reciprocity then tells us that

Now since
, this means that we have

Now you might be tempted to use quadratic reciprocity to "flip" this Legendre symbol, but note that it isn't a prime number! That means we can't flip it, but instead need to factor 660 in the hopes of factoring the Legendre symbol into simpler terms. For this, we used the fact that
, so that

Now the first of these terms is clearly 1, since
is "visibly" a square. For the other terms, we'll use quadratic reciprocity to flip them. For all these Legendre symbols, notice that the "denominator" is 1 modulo 4, meaning that we can flip the symbol without introducing a minus sign. Hence we have

Again, to compute these symbols we just reduct 1061 modulo 3, 5 and 11. It turns out that
,
, and that
. We can substitute these values in to find

Now the first term must be -1 based on our rule for whether 2 is a square modulo an odd prime (in particular,
, meaning that 2 isn't a square mod 3). The second term is "visibly" 1 since
. The last term was computed earlier in class as 1. So all together, we get








, let
.
