# Summary

Today we talked more about quadratic reciprocity. We started by giving some more applications of this powerful theorem. We then concluded class by giving a proof of Eisenstein's Lemma, a sort of cousin of Gauss' Lemma.

# Announcement

I won't be able to post the project topics today as planned. The new plan is for me to post them this Sunday, sometime before noon.

# Some Applications of Quadratic Reciprocity

Last class period we gave the following theorem

Theorem (Quadratic Reciprocity): Suppose that

pandqare distinct odd prime numbers. Then we have$\displaystyle \left(\frac{p}{q}\right)\left(\frac{q}{p}\right) = (-1)^{\left(\frac{p-1}{2}\right)\left(\frac{q-1}{2}\right)} = \left\{\begin{array}{rl}1,&\mbox{ if }p \equiv 1 \mod{4} \mbox{ or } q \equiv 1 \mod{4}\\-1,&\mbox{ if }p \equiv q \equiv 3 \mod{4}.\end{array}\right.$

We'll start today by getting a few more nice consequences from this result. To do so, we give an important corollary.

Corollary: Suppose that

pandqare odd primes. Then we have$\displaystyle \left(\frac{p}{q}\right) = \left\{\begin{array}{rl}\left(\frac{q}{p}\right), &\mbox{if either }p \equiv 1 \mod{4}\mbox{ or }q\equiv 1 \mod{4}\\-\left(\frac{q}{p}\right),&\mbox{if both }p \equiv 3 \mod{4} \mbox{ and }q \equiv 3 \mod{4}.\end{array}\right.$.

This follows directly from the Quadratic Reciprocity theorem. To see why that's true, suppose that either $p \equiv 1\ mod{4}$ or $q \equiv 1 \mod{4}$. Then quadratic reciprocity says

(1)Now since every Legendre symbol is either 1 or -1, this means that $\left(\frac{q}{p}\right)^2 = 1$. Multiplying by $\left(\frac{q}{p}\right)$ on both sides of the above equation then gives

(2)A similar argument works when $p \equiv q \equiv 3 \mod{4}$.

#### Example: Is 139 a square mod 467?

Suppose we want to calculate $\left(\frac{278}{467}$. Obviously we don't want to compute all the quadratic residues mod 467, so instead we'll use the rules we know about Legendre symbols. For one, we know that since $278 = 2\cdot 139$ we have

(3)Since $467 \equiv 3 \mod{8}$ we know that the first Legendre symbol is -1. Further, since $139 \equiv 467 \equiv 3 \mod{4}$, quadratic reciprocity tells us that $\left(\frac{139}{467}\right) = -\left(\frac{467}{139}\right)$. Hence we get

(4)To compute this new Legendre symbol, we can reduce $467$ modulo 139. It turns out that $467 \equiv 50 \mod{139}$. Hence we get

(5)The second Legendre symbol is "obviously" 1, since 25 is a perfect square. For the Legendre symbol involving 2, we note that $139 \equiv 3 \mod{8}$ implies that 2 isn't a square mod 139. Hence we get

(6)Hence we see that 278 is not a square mod 467. $\square$

Here's another result that can be handy to carry around.

Corollary: Let

pandqbe odd primes. Then

- if $p \equiv 1 \mod{4}$, then $\displaystyle \left(\frac{p}{q}\right) = \left(\frac{q}{p}\right)$
- if $p \equiv 3 \mod{4}$, then $\displaystyle \left(\frac{p}{q}\right) = (-1)^{\frac{q-1}{2}}\left(\frac{q}{p}\right)$

The first line of this equation is the same as the previous corollary. For the second line, notice that if $p \equiv 3 \mod{4}$ then $(p-1)/2$ is odd. Therefore we have

(7)The same technique we used before then shows that

(8)$\square$

#### Example: When is 7 a square mod *p*?

Suppose we want to characterize all those primes *p* for which 7 is a square. Certainly we have that 7 is a square mod 2, and we also have that 7 is a square mod 7 (since 0 is a square mod 7 — note that I'm saying "square" and not "quadratic residue"!). So suppose that *p* is some odd prime different from 7. We know from quadratic reciprocity that

So we need to know when this quantity is 1 or -1. Notice that the value of the first factor is determined by the congruence of *p* mod 4, whereas the second is determined by its congruence mod *7*. Hence our answer will be determined mod 28. To see which work, we'll just compute the number above for all possible residues mod 28. Notice that we can focus on odd residues since *p* is an odd prime, and we can discard 7 and 21 as possibilities (since *p* isn't 7). It's also helpful to note that the quadratic residue mod 7 are 1,2 and 4.

$p \mod{28}$ | $(-1)^{\frac{p-1}{2}$ | $\left(\frac{p}{7}\right)$ | $\left(\frac{7}{p}\right)$ | $p \mod{28}$ | $(-1)^{\frac{p-1}{2}$ | $\left(\frac{p}{7}\right)$ | $\left(\frac{7}{p}\right)$ |
---|---|---|---|---|---|---|---|

1 | 1 | -1 | -1 | 15 | -1 | 1 | -1 |

3 | -1 | -1 | 1 | 17 | 1 | -1 | -1 |

5 | 1 | -1 | -1 | 19 | -1 | -1 | 1 |

9 | 1 | 1 | 1 | 23 | -1 | 1 | -1 |

11 | -1 | 1 | -1 | 25 | 1 | 1 | 1 |

13 | 1 | -1 | -1 | 27 | -1 | -1 | 1 |

So a prime *p* has 7 as a square if $p=2,7$ or when $p \equiv 3,9,19,25,27$. $\square$

# The Proof of Quadratic Reciprocity

To prove quadratic reciprocity, we need a preliminary lemma.

Lemma (Eisenstein): Suppose that

pis an odd prime and that $p \nmid a$, whereais an odd number. Then for$\displaystyle N = \sum_{i=1}^{\frac{p-1}{2}}\left\lfloor \frac{ia}{p}\right\rfloor$

we have

$\displaystyle \left(\frac{a}{p}\right) = (-1)^N$

#### Example: Using Eisenstein's Lemma

Before we prove Eisenstein's Lemma, let's see an example in action. Suppose want to compute $\left(\frac{7}{11}\right)$. Eisenstein says that with

(10)we have

(11)So let's compute *N*:

Hence we conclude

(13)$\square$

Now that we've seen this lemma used, let's see a proof of how it works. Our strategy will be to show that in fact we have $n \equiv N \mod{2}$, where *n* is the same same number we had in Gauss' Lemma (go back to remind yourself what this number is!). Once we have this, we know from Gauss' lemma that

and since $n \equiv N \mod{2}$, we can conclude that

(15)Proof: The proof of this result will be very similar to the proof of Gauss' Lemma. To start, we notice that for any $1 \leq i \leq \frac{p-1}{2}$ the division algorithm says

(16)where $t_i$ is some remainder between 0 and $p-1$. Now we'll label the remainder for each *ia* as we did in our proof of Gauss' Lemma: if the remainder is greater than $\frac{p}{2}$ we'll denote it as $r_j$, and if the remainder is smaller than $\frac{p}{2}$ we'll label it as $s_j$. In either case, the integer *k* in the equation above is $\lfloor \frac{ia}{p}.$ From all of this, we get that

Now recall from the proof of Gauss' Lemma that the set

(18)is the same as the set

(19)So this means that

(20)Now that we have Equations (17) and (20), we're going to subtract them from each other. On the left hand side, this gives

(21)On the right hand side of the equation, we get

(22)Now let's reduce both sides mod 2. On the left hand side, since *a* is odd by assumption, we get that *a-1* is even, and so the left hand side is 0 mod 2. On the right hand side, since *p* is odd we get that $p \equiv 1 \mod{2}$. The last sum drops out (since it's multiplied by 2), and so we get

Therefore we have *n* and $N = \sum_{i=1}^{\frac{p-1}{2}}\left\lfloor \frac{ia}{p}\right\rfloor$ are the same mod 2, and so