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]
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.
For positive odd coprime integers , the Jacobi reciprocity law is
Factor . Since is not a square, some is odd. Choose a quadratic nonresidue modulo that , and choose residue one modulo each other . The Chinese remainder theorem provides a positive with these residues and with . Multiplicativity of the Jacobi symbol then gives .
Suppose only finitely many primes satisfy . They are coprime to . Repeat the preceding Chinese remainder theorem construction, additionally imposing at every odd and taking to avoid two. Since , Jacobi reciprocity gives . Factoring this Jacobi symbol over the prime factors of shows that at least one such prime has . But none of the listed primes divides , a contradiction. This proves the infinitely many prime quadratic nonresidues of a nonsquare integer assertion.
Factor . Since it is not a square, one exponent, say , is odd. Choose a nonzero quadratic nonresidue modulo ; one exists because the squaring map on the nonzero residues is two-to-one and hence has only images. The Chinese remainder theorem supplies a positive odd integer satisfying
Then and . The Jacobi reciprocity law proved in part (i), together with , gives . Factoring gives
All are odd and none divides . At least one factor must be negative, yielding an odd prime number . No theorem about primes in arithmetic progressions is needed.