Quadratic Reciprocity Theorem

EXPLORE THIS TOPIC IN the MathWorld Classroom

If p and q are distinct odd primes, then the quadratic reciprocity theorem states that the congruences

  x^2=q (mod p) 
 x^2=p (mod q)
(1)

are both solvable or both unsolvable unless both p and q leave the remainder 3 when divided by 4 (in which case one of the congruences is solvable and the other is not). Written symbolically,

 (p/q)(q/p)=(-1)^((p-1)(q-1)/4),
(2)

where

 (p/q)={1   for x^2=p (mod q) solvable for x; -1   for x^2=p (mod q) not solvable for x
(3)

is known as a Legendre symbol.

Gauss called this result the "aureum theorema" (golden theorem).

Euler stated the theorem in 1783 without proof. Legendre was the first to publish a proof, but it was fallacious. In 1796, Gauss became the first to publish a correct proof (Nagell 1951, p. 144). The quadratic reciprocity theorem was Gauss's favorite theorem from number theory, and he devised no fewer than eight different proofs of it over his lifetime.

The genus theorem states that the Diophantine equation

 x^2+y^2=p
(4)

can be solved for p a prime iff p=1 (mod 4) or p=2.

Wolfram Web Resources

Mathematica »

The #1 tool for creating Demonstrations and anything technical.

Wolfram|Alpha »

Explore anything with the first computational knowledge engine.

Wolfram Demonstrations Project »

Explore thousands of free applications across science, mathematics, engineering, technology, business, art, finance, social sciences, and more.

Computerbasedmath.org »

Join the initiative for modernizing math education.

Online Integral Calculator »

Solve integrals with Wolfram|Alpha.

Step-by-step Solutions »

Walk through homework problems step-by-step from beginning to end. Hints help you try the next step on your own.

Wolfram Problem Generator »

Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet.

Wolfram Education Portal »

Collection of teaching and learning tools built by Wolfram education experts: dynamic textbook, lesson plans, widgets, interactive Demonstrations, and more.

Wolfram Language »

Knowledge-based programming for everyone.