ConceptComplete

Quadratic Residues and Reciprocity - Examples and Constructions

The law of quadratic reciprocity provides a systematic method for computing Legendre symbols without resorting to Euler's criterion or exhaustive search. This remarkable theorem connects the solvability of two seemingly unrelated quadratic congruences.

DefinitionGauss's Lemma

Let pp be an odd prime and gcd(a,p)=1\gcd(a, p) = 1. Consider the least positive residues of: a,2a,3a,,p12a(modp)a, 2a, 3a, \ldots, \frac{p-1}{2}a \pmod{p}

Let nn be the number of these residues that exceed p/2p/2. Then: (ap)=(1)n\left(\frac{a}{p}\right) = (-1)^n

Gauss's Lemma provides an alternative computational method for the Legendre symbol and is instrumental in proving quadratic reciprocity.

ExampleGauss's Lemma Application

Compute (311)\left(\frac{3}{11}\right) using Gauss's Lemma.

Consider 31,32,33,34,353 \cdot 1, 3 \cdot 2, 3 \cdot 3, 3 \cdot 4, 3 \cdot 5 modulo 1111: 3,6,9,12,153,6,9,1,4(mod11)3, 6, 9, 12, 15 \equiv 3, 6, 9, 1, 4 \pmod{11}

The least positive residues are {1,3,4,6,9}\{1, 3, 4, 6, 9\}. Those exceeding 11/2=5.511/2 = 5.5 are {6,9}\{6, 9\}, so n=2n = 2.

Therefore: (311)=(1)2=1\left(\frac{3}{11}\right) = (-1)^2 = 1.

We can verify: 52=253(mod11)5^2 = 25 \equiv 3 \pmod{11}.

DefinitionJacobi Symbol

Let n=p1e1pkekn = p_1^{e_1} \cdots p_k^{e_k} be an odd positive integer with prime factorization. For any integer aa, the Jacobi symbol (an)\left(\frac{a}{n}\right) is defined as: (an)=(ap1)e1(apk)ek\left(\frac{a}{n}\right) = \left(\frac{a}{p_1}\right)^{e_1} \cdots \left(\frac{a}{p_k}\right)^{e_k}

For n=1n = 1, we define (a1)=1\left(\frac{a}{1}\right) = 1.

The Jacobi symbol generalizes the Legendre symbol to composite odd moduli. Unlike the Legendre symbol, (an)=1\left(\frac{a}{n}\right) = 1 does not necessarily mean aa is a quadratic residue modulo nn.

ExampleJacobi Symbol

Compute (215)\left(\frac{2}{15}\right).

Since 15=3515 = 3 \cdot 5: (215)=(23)(25)\left(\frac{2}{15}\right) = \left(\frac{2}{3}\right)\left(\frac{2}{5}\right)

Using the second supplement:

  • 33(mod8)3 \equiv 3 \pmod{8}, so (23)=1\left(\frac{2}{3}\right) = -1
  • 55(mod8)5 \equiv 5 \pmod{8}, so (25)=1\left(\frac{2}{5}\right) = -1

Therefore: (215)=(1)(1)=1\left(\frac{2}{15}\right) = (-1)(-1) = 1.

However, 22 is not a quadratic residue modulo 1515. The equation x22(mod15)x^2 \equiv 2 \pmod{15} has no solution because x22(mod3)x^2 \equiv 2 \pmod{3} has no solution.

Remark

The Jacobi symbol inherits the multiplicativity and reciprocity properties of the Legendre symbol: (am)(an)=(amn)\left(\frac{a}{m}\right)\left(\frac{a}{n}\right) = \left(\frac{a}{mn}\right)

And the law of quadratic reciprocity extends: (mn)(nm)=(1)(m1)(n1)/4\left(\frac{m}{n}\right)\left(\frac{n}{m}\right) = (-1)^{(m-1)(n-1)/4} for odd positive integers m,nm, n.

ExampleUsing Quadratic Reciprocity

Determine whether x261(mod97)x^2 \equiv 61 \pmod{97} has a solution.

We need (6197)\left(\frac{61}{97}\right). By quadratic reciprocity: (6197)(9761)=(1)(611)(971)/4=(1)3048/4=1\left(\frac{61}{97}\right)\left(\frac{97}{61}\right) = (-1)^{(61-1)(97-1)/4} = (-1)^{30 \cdot 48/4} = 1

So (6197)=(9761)=(3661)=(6261)=1\left(\frac{61}{97}\right) = \left(\frac{97}{61}\right) = \left(\frac{36}{61}\right) = \left(\frac{6^2}{61}\right) = 1.

Therefore, 6161 is a quadratic residue modulo 9797.

The Jacobi symbol, combined with quadratic reciprocity, provides an efficient algorithm for determining quadratic residuosity with complexity comparable to the Euclidean algorithm.