Lecture 21: A Proof of Quadratic Reciprocity; Order Calculations

# Summary

Today we finished our discussion of quadratic reciprocity by providing a proof of the theorem which is based on Eisenstein's Lemma. Afterwards we began talking about the notion of order for a given integer a modulo m, as well as what it meant for a to be a primitive root modulo m. We calculated the order of a few integers, and we began talking about one of the basic divisibility properties of order.

# A Proof of Quadratic Reciprocity

Recall last time that we proved

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$

We'll use this result as the key to unlock quadratic reciprocity. Recall that quadratic reciprocity says

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.$

Our proof technique will be a little unusual. Basically, we'll use geometry to prove that the quantity

(1)
\begin{align} \frac{p-1}{2}\frac{q-1}{2}= \sum_{y_0=1}^{\frac{q-1}{2}} \left\lfloor \frac{py_0}{q}\right\rfloor + \sum_{x_0=1}^{\frac{p-1}{2}} \left\lfloor \frac{qx_0}{p}\right\rfloor. \end{align}

Why is this important? Well, Eisenstein's Lemma says that

(2)
\begin{split} \left(\frac{p}{q}\right) &= (-1)^{\sum_{y_0=1}^{\frac{q-1}{2}} \left\lfloor \frac{py_0}{q}\right\rfloor}\\ &\mbox{ and }\\ \left(\frac{q}{p}\right) &= (-1)^{\sum_{x_0=1}^{\frac{p-1}{2}} \left\lfloor \frac{qx_0}{p}\right\rfloor}. \end{split}

Hence if we can prove Equation (1), then we'll know

(3)
\begin{split} \left(\frac{p}{q}\right)\left(\frac{q}{p}\right) &= (-1)^{\sum_{y_0=1}^{\frac{q-1}{2}} \left\lfloor \frac{py_0}{q}\right\rfloor}(-1)^{\sum_{x_0=1}^{\frac{p-1}{2}} \left\lfloor \frac{qx_0}{p}\right\rfloor}\\ &= (-1)^{\sum_{y_0=1}^{\frac{q-1}{2}} \left\lfloor \frac{py_0}{q}\right\rfloor+\sum_{x_0=1}^{\frac{p-1}{2}} \left\lfloor \frac{qx_0}{p}\right\rfloor}\\ &=(-1)^{\frac{p-1}{2}\frac{q-1}{2}}, \end{split}

which is exactly what we want to prove.

Lemma: For distinct odd primes p and q, Equation (1) is true.

Proof:

Our technique will be to use geometry to equate these two quantities. We'll start by drawing a grid that is p units long and q units tall, where we assume that $p>q$. Here's a picture of the grid:

Now we'll show both sides of Equation (1) are the same by showing that each side of the equation represents a distinct way of counting the lattice points inside the same region. In both cases, the region that we'll study is the rectangle in the lower-left portion of our graph shown below. We'll count the lattice points (i.e, those points where both the x- and y-coordinates are integers), except that we won't count lattice points that 0 in either the x- or y-coordinate.

Now on the one hand, the number of lattice points in this rectangle is clearly

(4)
\begin{align} \frac{p-1}{2}\frac{q-1}{2}, \end{align}

since these lattice points $(x,y)$ have integer x-coordinates that are between 1 and $\frac{p-1}{2}$ and integer y-coordinates that are between 1 and $\frac{q-1}{2}$. Since the choice of x- and y-coordinate can be made independently, this means that we have $\frac{p-1}{2}\frac{q-1}{2}$ in this rectangle.

Now we'll count these points another way, by splitting the rectangle up into two triangles and counting the number of lattice points in each triangle individually. The triangles are shown below.

#### Points in the red

We'll first count the lattice points in the red triangle. For this, let's choose an integer y-coordinate $y_0$ and find all lattice points that have $y_0$ as their y-coordinate and which sit inside the red triangle. Notice that the diagonal for the rectangle has equation

(5)
\begin{align} y=\frac{q}{p}x \Leftrightarrow x = \frac{p}{q}y. \end{align}

Hence the line $y=y_0$ intersects this diagonal at the point

(6)
\begin{align} (\frac{p}{q}y_0,y_0). \end{align}

Hence we know that the possible x-coordinates for lattice points on the line $y=y_0$ must be integers x that satisfy $1 \leq x \leq \frac{p}{q}y_0$. Indeed, since p and q are distinct primes, we can in fact say that the possible x-coordinates are integers x that satisfy

(7)
\begin{align} 1 \leq x < \frac{p}{q}y_0. \end{align}

There are $\left\lfloor \frac{py_0}{q}\right\rfloor$ such integers x, and hence this many lattice points along the line $y=y_0$ inside the red triangle.

The total number of lattice points in the red triangle, then, is the number of lattice points across each such line, where the lines range over integers $y_0$ between 1 and $\frac{q-1}{2}$. Hence the number of lattice points for the red triangle is

(8)
\begin{align} \sum_{y_0=1}^{\frac{q-1}{2}} \left\lfloor \frac{py_0}{q}\right\rfloor. \end{align}

#### Points in the blue

How many lattice points are in the blue triangle? The same style of argument as above will work. For each integer x-coordinate $x_0$, we'll find all the lattice points that have $x_0$ as their x-coordinate and which sit inside the blue triangle. Then we'll add up all the lattice points from these various vertical lines.

Since the diagonal for the rectangle has equation

(9)
\begin{align} y=\frac{q}{p}x, \end{align}

the line $x=x_0$ intersects this diagonal at the point

(10)
\begin{align} (x_0,\frac{q}{p}x_0). \end{align}

Hence we know that the possible y-coordinates for lattice points on the line $x=x_0$ must be integers y that satisfy $1 \leq y \leq \frac{q}{p}x_0$. Indeed, since p and q are distinct primes, we can in fact say that the possible y-coordinates are integers y that satisfy

(11)
\begin{align} 1 \leq y < \frac{q}{}px_0. \end{align}

There are $\left\lfloor \frac{qx_0}{p}\right\rfloor$ such integers y, and hence this many lattice points along the line $x=x_0$ inside the blue triangle.

The total number of lattice points in the blue triangle, then, is the number of lattice points across each such vertical line, where the lines range over integers $x_0$ between 1 and $\frac{p-1}{2}$. Hence the number of lattice points for the blue triangle is

(12)
\begin{align} \sum_{x_0=1}^{\frac{p-1}{2}} \left\lfloor \frac{qx_0}{p}\right\rfloor. \end{align}

#### One last thing to check

It would seem that we have verified Equation (1), though if you carefully compare the images of the rectangle and the triangles you'll see that the blue triangle has a little extra "nub" which might capture additional lattice points — thus preventing the equality we're after. It's not too hard to see that this "nub" doesn't contain any lattice points.

To do this, we'll show that the "nub" doesn't contain any points with y-coordinate as large as $\frac{q+1}{2}$, which will show that any lattice points in the blue triangle must be lattice points within the rectangle we have already considered. To see that the "nub" doesn't have y-coordinates that are too large, notice that the tallest point in the number is

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

But the y-coordinate of this point is precisely $\frac{q}{2}-\frac{1}{2}\frac{q}{p}$. But it's easy to see that

(14)
\begin{align} \frac{q}{2}-\frac{1}{2}\frac{q}{p} < \frac{q}{2} < \frac{q+1}{2}. \end{align}

$\square$

This proof requires some careful thinking to fully understand, and it's not the kind of thing I'd be expecting you to repeat on a test or come up with by yourself. However, you should spend some time trying to digest how this proof works. You should also spend time reviewing the power of the theorem that it proves; quadratic reciprocity is one of the most beautiful theorems we'll get a chance to talk about in this class, and it can be used to solve a whole host of problems which would otherwise be impossible to approach.

# Order Calculations

We're going to shift topics now, moving out of Chapter 4 and into Chapter 5. Recall from Chapter 2 that for any integer m and integer a satisfying $(a,m) = 1$, we have

(15)
\begin{align} a^{\phi(m)} \equiv 1 \mod{m}. \end{align}

The question we ask now is whether there exists some exponent smaller than $\phi(m)$ which does this same job.

Definition: For an integer m and a number a with $(a,m) = 1$, we define the order of a mod m as

$\displaystyle \mbox{ord}_m(a) = \min_{n>0}\{a^n \equiv 1 \mod{m}\}$.

#### Example: The order of 4 mod 9

Let's compute $\mbox{ord}_9(4)$. Since $\phi(9) = 6$ we know that $\mbox{ord}_9(4) \leq 6$, but is this actually the order? The only way to know is to try out smaller exponents and see if we ever hit 1:

(16)
\begin{split} 4^1 &\equiv 4 \not\equiv 1 \mod{9}\\ 4^2 &\equiv 16 \equiv 7 \not\equiv 1 \mod{9}\\ 4^3 &\equiv 4\cdot 7 \equiv 28 \equiv 1 \mod{9}. \end{split}

Hence we see that $\mbox{ord}_9(4) = 3$. $\square$

#### Example: The order of 2 mod 9

Let's try to compute $\mbox{ord}_9(2)$. Again, we know that this order is at most 6 (since $a^{\phi(9)} \equiv 1 \mod{9}$ for any $(a,9) = 1$), but perhaps it's smaller. Let's try out smaller exponents and see if we hit 1 early.

(17)
\begin{split} 2^1 &\equiv 2 \not\equiv 1 \mod{9}\\ 2^2 &\equiv 4 \not\equiv 1 \mod{9}\\ 2^3 &\equiv 8 \not\equiv 1 \mod{9}\\ 2^4 &\equiv 16 \equiv 7 \not\equiv 1 \mod{9}\\ 2^5 &\equiv 2\cdot 2^4 \equiv 2\cdot 7 \equiv 14 \equiv 5 \not\equiv 1\mod{9}\\ 2^6 &\equiv 2\cdot 2^5 \equiv 2\cdot 5 \equiv 10 \equiv 1\mod{9}. \end{split}

Hence we see that $\mbox{ord}_9(2) = 6$. $\square$

The two examples above lead us to distinguish those elements which have the "maximal order" of $\phi(m)$ from the other elements whose order is smaller than $\phi(m)$.

Definition: For an integer m and $(a,m) = 1$, we say that a is a primitive root modulo m if the order of a modulo m is $\phi(m)$.

Having stated this definition, there are some natural questions that we might ask:

• for which moduli m does a primitive root a exist?
• which numbers a are primitive roots for infinitely many m?

We'll eventually answer the first question; the second is still open.

# Some Properties of Order

We finish our discussion today by pointing out one special property of the order of an integer. We'll see more properties related to this next class period.

Lemma: For integers m and a with $(a,m) = 1$, an integer n satisfies $a^n \equiv 1\ mod{m}$ if and only if $\mbox{ord}_m(a) \mid n$.

Notice that we have already seen this lemma in our calculation of $\mbox{ord}_9(4)$. In that case we knew that $4^6 \equiv 1 \mod{9}$ since $\phi(9) = 6$, but we saw that $\mbox{ord}_9(4) = 3$.

Proof: First suppose that $\mbox{ord}_m(a) \mid n$; we'll show that $a^n \equiv 1 \mod{m}$. In this case we know there exists an integer k so that $k\cdot\mbox{ord}_m(a) = n$. Now we'll just compute $a^n$ directly:

(18)
\begin{split} a^n &\equiv a^{k\cdot \mbox{ord}_m(a)} = \left(a^{\mbox{ord}_m(a)}\right)^{k}. \end{split}

Now we know that $a^{\mbox{ord}_m(a)} \equiv 1 \mod{m}$ by definition, and so the right hand side of the equation becomes

(19)
\begin{align} \left(a^{\mbox{ord}_m(a)}\right)^{k} \equiv 1^k \equiv 1. \end{align}

Hence we have shown $\mbox{ord}_m(a) \mid n$ implies $a^n \equiv 1 \mod{m}$

Now suppose that $a^n \equiv 1 \mod{m}$. Write $n = k\cdot \mbox{ord}_m(a) + r$, where r is a remainder term in the range $0 \leq r < \mbox{ord}_m(a)$. Then we have

(20)
\begin{align} 1 \equiv a^n \equiv a^{k\cdot \mbox{ord}_m(a) + r} \equiv a^{k\cdot \mbox{ord}_m(a)} a^r \equiv \left(a^{\mbox{ord}_m(a)}\right)^ka^r \equiv 1^ka^r \equiv a^r. \end{align}

But then r is an exponent which is less than $\mbox{ord}_m(a)$ so that $a^r \equiv 1 \mod{m}$. By the minimality of order, this means that r cannot be positive, and so we must have $r=0$. This in turn tells us that $n = k\cdot \mbox{ord}_m(a)$, so that $\mbox{ord}_m(a) \mid n$.
$\square$

Add a New Comment
page revision: 28, last edited: 20 Oct 2008 20:13
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License