Lecture 20: Applications of Quadratic Reciprocity; Eisenstien's Lemma


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.


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 p and q are 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 p and q are 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

\begin{align} \left(\frac{p}{q}\right)\left(\frac{q}{p}\right) = 1. \end{align}

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

\begin{align} \left(\frac{p}{q}\right)\left(\frac{q}{p}\right)\left(\frac{q}{p}\right) = 1\cdot \left(\frac{q}{p}\right) \Longleftrightarrow \left(\frac{p}{q}\right) = \left(\frac{q}{p}\right). \end{align}

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

\begin{align} \left(\frac{278}{467}\right) = \left(\frac{2}{467}\right)\left(\frac{139}{467}\right). \end{align}

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

\begin{align} \left(\frac{2}{467}\right)\left(\frac{139}{467}\right) = (-1)(-\left(\frac{467}{139}\right))= \left(\frac{467}{139}\right). \end{align}

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

\begin{align} \left(\frac{467}{139}\right) = \left(\frac{50}{139}\right) = \left(\frac{2}{139}\right)\left(\frac{25}{139}\right). \end{align}

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

\begin{align} \left(\frac{2}{139}\right)\left(\frac{25}{139}\right) = (-1)(1) = -1. \end{align}

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 p and q be 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

\begin{align} \left(\frac{p}{q}\right)\left(\frac{q}{p}\right) = (-1)^{\frac{p-1}{2}\frac{q-1}{2}} = \left((-1)^{\frac{p-1}{2}}\right)^{\frac{q-1}{2}} = (-1)^{\frac{q-1}{2}}. \end{align}

The same technique we used before then shows that

\begin{align} \left(\frac{p}{q}\right) = (-1)^{\frac{q-1}{2}}\left(\frac{q}{p}\right). \end{align}


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

\begin{align} \left(\frac{7}{p}\right) = (-1)^{\frac{p-1}{2}}\left(\frac{p}{7}\right). \end{align}

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 p is an odd prime and that $p \nmid a$, where a is 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

\begin{align} N = \sum_{i=1}^{\frac{11-1}{2}} \left\lfloor \frac{7i}{11}\right\rfloor \end{align}

we have

\begin{align} \left(\frac{7}{11}\right) = (-1)^N. \end{align}

So let's compute N:

\begin{split} N &= \sum_{i=1}^{\frac{11-1}{2}} \left\lfloor \frac{7i}{11}\right\rfloor = \sum_{i=1}^{\frac{11-1}{2}} \left\lfloor \frac{7i}{11}\right\rfloor \\&= \left\lfloor \frac{7}{11}\right\rfloor+\left\lfloor \frac{14}{11}\right\rfloor+\left\lfloor \frac{21}{11}\right\rfloor+\left\lfloor \frac{28}{11}\right\rfloor+\left\lfloor \frac{35}{11}\right\rfloor = 0+1+1+2+3 = 7. \end{split}

Hence we conclude

\begin{align} \left(\frac{7}{11}\right) = (-1)^{7} = -1. \end{align}


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

\begin{align} \left(\frac{a}{p}\right) = (-1)^n, \end{align}

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

\begin{align} \left(\frac{a}{p}\right) = (-1)^n = (-1)^N. \end{align}

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

\begin{align} ia = p\cdot k_i + t_i, \end{align}

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

\begin{align} \sum_{i=1}^{\frac{p-1}{2}} ia = \sum_{i=1}^{\frac{p-1}{2}} p\left\lfloor \frac{ia}{p}\right\rfloor + t_i = \left(\sum_{i=1}^{\frac{p-1}{2}}p\left\lfloor \frac{ia}{p}\right\rfloor\right) + \left(\sum_{j=1}^n r_j + \sum_{j=1}^m s_j\right). \end{align}

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

\begin{align} p-r_1,p-r_2,\cdots,p-r_n,s_1,\cdots,s_m \end{align}

is the same as the set

\begin{align} 1,2,\cdots,\frac{p-1}{2}. \end{align}

So this means that

\begin{align} \sum_{i=1}^{\frac{p-1}{2}} i = \sum_{j=1}^n (p-r_n) + \sum_{j=1}^m s_j = pn - \sum_{j=1}^nr_n + \sum_{j=1}^m s_j. \end{align}

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

\begin{align} \sum_{i=1}^{\frac{p-1}{2}} ia - \sum_{i=1}^{\frac{p-1}{2}} i = (a-1)\left(\sum_{i=1}^{\frac{p-1}{2}} i \right). \end{align}

On the right hand side of the equation, we get

\begin{split} &\left(\sum_{i=1}^{\frac{p-1}{2}}p\left\lfloor \frac{ia}{p}\right\rfloor\right) + \left(\sum_{j=1}^n r_j + \sum_{j=1}^m s_j\right) - \left(pn - \sum_{j=1}^nr_n + \sum_{j=1}^m s_j\right)\\&= p\left(\sum_{i=1}^{\frac{p-1}{2}}\left\lfloor \frac{ia}{p}\right\rfloor\right) -pn + 2\sum_{j=1}^n r_n. \end{split}

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

\begin{align} 0 \equiv \left(\sum_{i=1}^{\frac{p-1}{2}}\left\lfloor \frac{ia}{p}\right\rfloor\right) -n \mod{2}. \end{align}

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

\begin{align} (-1)^N = (-1)^n = \left(\frac{a}{p}\right). \end{align}
Add a New Comment
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License