MathLabs
TheoremProved

Law of quadratic reciprocity

Statement

For distinct odd primes pp and qq: (pq)(qp)=(−1)p−12⋅q−12\left(\dfrac{p}{q}\right)\left(\dfrac{q}{p}\right) = (-1)^{\frac{p-1}{2}\cdot\frac{q-1}{2}}.

Why is it true?

It says whether pp is a square mod qq and whether qq is a square mod pp are the same question, up to a sign that depends only on the residues of p,qp,q mod 44 — turning a hard-looking two-variable problem into a one-line rule.

Proof sketch

We use Gauss's lemma as a stepping stone: for an odd prime pp and gcd⁡(a,p)=1\gcd(a,p)=1, look at the least positive residues of a,2a,…,p−12aa, 2a, \dots, \frac{p-1}{2}a modulo pp, and let μ\mu be how many of them exceed p/2p/2. Gauss's lemma states (ap)=(−1)μ\left(\dfrac{a}{p}\right)=(-1)^{\mu}; it follows from pairing each such "large" residue rr with p−r≤p/2p-r\le p/2 and tracking signs when multiplying the p−12\frac{p-1}{2} numbers together in two different ways.

Eisenstein's refinement expresses μ\mu as a lattice-point count: one shows μ≡∑k=1(p−1)/2⌊kqp⌋(mod2)\mu \equiv \sum_{k=1}^{(p-1)/2} \left\lfloor \frac{kq}{p} \right\rfloor \pmod 2 when a=qa=q is odd, by comparing ⌊kq/p⌋\lfloor kq/p\rfloor (the number of multiples of pp below kqkq) to how far kq mod pkq \bmod p sits from p/2p/2. Applying the same counting argument symmetrically gives (qp)=(−1)S(q,p)\left(\frac{q}{p}\right)=(-1)^{S(q,p)} and (pq)=(−1)S(p,q)\left(\frac{p}{q}\right)=(-1)^{S(p,q)}, where S(q,p)=∑k=1(p−1)/2⌊kqp⌋S(q,p)=\sum_{k=1}^{(p-1)/2}\left\lfloor \frac{kq}{p}\right\rfloor and S(p,q)=∑k=1(q−1)/2⌊kpq⌋S(p,q)=\sum_{k=1}^{(q-1)/2}\left\lfloor \frac{kp}{q}\right\rfloor.

Geometrically, S(q,p)+S(p,q)S(q,p)+S(p,q) counts the lattice points (x,y)(x,y) with 1≤x≤p−121\le x\le \frac{p-1}{2}, 1≤y≤q−121\le y\le \frac{q-1}{2} lying strictly below the line qx=pyqx=py (that count is S(q,p)S(q,p)) plus those strictly above it (that count is S(p,q)S(p,q), by the symmetric roles of p,qp,q). No lattice point lies exactly on the line since gcd⁡(p,q)=1\gcd(p,q)=1 and x<px<p, so together these two counts exhaust the full rectangle of p−12⋅q−12\frac{p-1}{2}\cdot\frac{q-1}{2} lattice points.

Therefore S(q,p)+S(p,q)=p−12⋅q−12S(q,p)+S(p,q) = \frac{p-1}{2}\cdot\frac{q-1}{2}, and multiplying the two Legendre-symbol formulas gives (pq)(qp)=(−1)S(p,q)+S(q,p)=(−1)p−12⋅q−12\left(\frac{p}{q}\right)\left(\frac{q}{p}\right)=(-1)^{S(p,q)+S(q,p)}=(-1)^{\frac{p-1}{2}\cdot\frac{q-1}{2}}, which is exactly (pq)(qp)=(−1)p−12⋅q−12\left(\dfrac{p}{q}\right)\left(\dfrac{q}{p}\right) = (-1)^{\frac{p-1}{2}\cdot\frac{q-1}{2}}.

Topics that use this theorem

Step-by-step proofs

No step-by-step proof yet for this theorem.

References

  1. Wikipedia contributors (2024). Quadratic reciprocity
  2. Kenneth Ireland, Michael Rosen (1990). A Classical Introduction to Modern Number Theory