The practical reward of quadratic reciprocity is a smaller modulus: swap a pair of distinct odd primes, record the required sign, then reduce the numerator by modular arithmetic. Use multiplicativity of the Legendre symbol and the second supplementary law for quadratic reciprocity to handle a factor of two. For example,Here are both modulo , so the first swap changes sign; gives ; the swap involving five has no sign change. An independent square check is . The method determines existence of a square root without itself finding that root.
A composite numerator is allowed in a Legendre symbol; a composite denominator instead calls for a Jacobi symbol. Its Jacobi reciprocity law supports repeated swaps and remainder reductions, in the spirit of the Euclidean algorithm.[ref]
Quadratic Reciprocity by Ben Lynn. Ben Lynn, Quadratic Reciprocity, “The Jacobi Symbol”: product definition and reciprocity for computing symbols without factoring
A final Jacobi symbol of one is not a square-existence certificate for a composite number modulus. For example,yet is impossible: reducing it modulo three would require a square congruent to two, and squares modulo three are only zero or one. The product has hidden two local failures. By contrast, for a prime denominator, a Legendre symbol of one does certify a quadratic residue.
A short proof outline connects Gauss's lemma to counting points with integer coordinates. For distinct odd primes , define the two floor function sumsThe parity form of Gauss's lemma gives and . In the open rectangle , , the line separates points below it from points above it. None lies on the line, because and coprimality would force . The total is therefore . Combining that count with the parity identities gives quadratic reciprocity.[ref]
Quadratic Reciprocity by Ben Lynn. Ben Lynn, Quadratic Reciprocity, first theorem and proof of the Law of Quadratic Reciprocity: floor-sum parity and the separating-line count
