Multiplicativity of the Legendre symbol Created 2026-09-29 Updated 2026-10-18
For an odd prime and any integers , the Legendre symbol obeys
In particular, if , then , where is a modular multiplicative inverse. Multiplication by a nonzero square also leaves the Legendre symbol unchanged: for .[ref]
The subgroup and coset arguments under quadratic residue and quadratic nonresidue prove the sign rule without computing a large power: square times square is square, square times nonsquare is nonsquare, and nonsquare times nonsquare is square. If either factor is zero modulo , both sides of the identity vanish. On , the Legendre symbol is thus a group homomorphism to whose kernel of a group homomorphism is the quadratic residue subgroup. Viewed on all integers, it is a completely multiplicative function and a Dirichlet character modulo .
Figure 1.
Products modulo seven: the Legendre symbol reduces a six-by-six table to sign multiplication
. Rows and columns put quadratic residues before quadratic nonresidues . Every cell displays the product modulo seven and its Legendre symbol. The four blocks have signs , showing the subgroup and its other coset. Details.
For an original calculation, factor the numerator . Modulo seven, , agreeing with . Modulo eleven, the signs are instead , giving , agreeing with . The same factorization can therefore certify different square behavior at different prime numbers.
Alternatively, Euler's criterion gives modulo . For nonzero factors both sides correspond to signs in . Since is odd, these signs are distinct modulo , so the modular congruence proves the asserted equality of integers, not merely an equality of representatives.
The Legendre symbol is when is a nonzero square modulo the odd prime , when it is not a square, and when . For the coprime case, Euler's criterion states
Write . For , the balanced residues are nonzero and their absolute values lie in . If , then . Cancel . The plus sign forces ; the minus sign would require , impossible because . Thus the absolute residues form a permutation of . If exactly are negative, multiplying gives
Since does not divide , cancellation and Euler's criterion prove Gauss's lemma:
The two signs are distinct modulo the odd prime, so this congruence identifies the integer symbol itself.
For , the balanced representative of is negative precisely when , giving . Checking the four odd residue classes modulo eight gives even for and odd for . Hence
This is the quadratic character of two obtained from the lemma.
Let and . If a prime divides , then is odd and cannot divide . Moreover
so has an explicit nonzero square root modulo . The criterion just proved forces every prime divisor of into the classes or modulo eight. But : if all its prime factors were modulo eight, their product, with multiplicities, would also be . Thus at least one prime divisor is modulo eight. No listed divides , because . This always produces another such prime, proving infinitely many primes are congruent to seven modulo eight, the Euclid proof for infinitely many primes congruent to seven modulo eight.
A nonzero residue class is a quadratic residue if for some nonzero . If it is a square, Fermat's little theorem gives . Conversely, the map on the nonzero classes identifies exactly the pairs , giving distinct squares. They are all roots of over the field ; a polynomial of this degree has at most that many roots. Its roots are therefore precisely the squares. This proves Euler's criterion
Applying it to gives . The exclusion of is the usual nonzero-residue convention needed for this equivalence.
For distinct odd primes , quadratic reciprocity states
Using the multiplicativity of the Legendre symbol, and the supplementary law ,
The first factor is because ; the second is because the reciprocity sign is positive. Thus .
For a nonzero residue modulo an odd prime , the Legendre symbol equals if is a nonzero square modulo and otherwise. The extension to multiples of has value zero. Euler's criterion states
Apply Euler's criterion to . It gives
For , the same criterion gives . Both sides are integers in , which are distinct modulo an odd prime, so congruence implies equality. This proves multiplicativity of the Legendre symbol:
Write . In Gauss's lemma, for the multiplier 2, precisely the integers with give residues . Their number is
It is even, so the Legendre symbol : 2 is a quadratic residue modulo . For completeness, the sign rule follows by replacing those large residues by their negatives; the resulting absolute residues permute . Multiplying them and cancelling their nonzero product gives , equivalent to the residue assertion by Euler's criterion.
Now take the prime . The condition gives , so . Thus divides . For integers , (true at 4 and preserved on increasing ), so this divisor is proper and is composite. At , the divisor is the number itself: . The congruence still holds, but it does not establish compositeness.
Put . The nonzero quadratic residues in the finite field form a subgroup of size : the group homomorphism has kernel . Each square satisfies by Fermat's little theorem. Since a nonzero polynomial of degree has at most roots of a polynomial, these are all the roots of . For any other nonzero , Fermat's theorem gives , so . Thus Euler's criterion follows, and multiplication gives
Both sides are or , which are distinct modulo the odd prime number , so . Taking in Euler's criterion gives , which is for and for .
Suppose is a quadratic nonresidue. On the nonzero residue classes modulo , define the involution
It is an involution because . A fixed point would satisfy , which is excluded by the quadratic nonresidue hypothesis. Thus it partitions the classes into disjoint pairs , each with product . Consequently
Now evaluate the same product by pairing every class with its own modular inverse. The only classes equal to their modular inverses solve and hence are and . All other pairs have product one. The complete product is therefore , so
Together with the preceding part, this is Euler's criterion; the pairing argument establishes the converse without assuming it.
For the odd prime , the Fermat-Euler theorem gives . Therefore the residue class obeys . Since a prime number dividing a product divides one of its factors,
If is a quadratic residue, choose with . Then is nonzero modulo , and Fermat's little theorem gives
This proves the quadratic residue direction of Euler's criterion.
For an odd prime , the Legendre symbol is if , if is a nonzero square modulo , and otherwise. Euler's criterion states
If both sides vanish. Otherwise write for a primitive root . The squares are precisely the even powers of , while has order two and therefore equals . Hence , proving the criterion and the useful special case .
For odd , . Every prime divisor of this number is odd, and , so . Euler's criterion forces , hence or . A product of such primes can be only if a prime occurs to an odd power.
Suppose the primes were . Choose the odd integer (or for an empty list). None of these primes divides , since the latter is modulo each . Yet the preceding argument gives a prime divisor , outside the list. This contradiction proves infinitely many primes congruent to modulo .
For an odd prime number , the Legendre symbol is zero when , one when is a nonzero quadratic residue modulo , and minus one otherwise. The number-theoretic Gauss lemma says that, for , , where counts those least positive residues of exceeding .
For , the residues are simply , so . Examining the four odd residue classes modulo eight gives
Now and is odd. The multiplicative order of divides but not . Since is a power of two, every proper divisor of divides , whence . Lagrange's theorem for finite groups gives . Because , this implies , so the supplementary law just proved gives . By Euler's criterion, , and consequently . Therefore
Gauss lemma states that if and of the least positive residues of
exceed , then .
To prove it, replace each residue exceeding by its negative, obtaining numbers in . No two of them are equal modulo : such an equality would give , hence in the allowed range. They therefore permute , and multiplication gives
Cancel the nonzero factorial and apply Euler's criterion to obtain the lemma.
For , all least positive residues exceed . Hence the first supplementary law for quadratic reciprocity is
Euler's criterion states that for an odd prime number and ,
where the right-hand side is the Legendre symbol.
Let be a primitive root modulo . Its multiplicative order is , so . This power has square , and the only roots of modulo the odd prime are . Therefore
Euler's criterion now gives , so every primitive root is a quadratic nonresidue.
Now let be a Fermat prime, with . The number of primitive roots modulo is
There are also exactly quadratic nonresidues. Since every primitive root is a nonresidue, these equally large sets coincide. Thus every quadratic nonresidue modulo is a primitive root, as summarized by Quadratic nonresidues modulo a Fermat prime.
Finally, and . Quadratic reciprocity therefore gives
Hence is a quadratic nonresidue modulo , and consequently
Euler's criterion is
It applies also when . In particular, for a nonzero residue the power is one or minus one according as the residue is a square or a nonsquare.
Euler's criterion implies multiplicativity of the symbol on nonzero residues and gives . Apply quadratic reciprocity with the odd prime 3:
The only nonzero square modulo three is one. Since ,
Euler's criterion states
For the right side is or . The displayed congruence also holds for , since is odd and the exponent is positive.
Let be prime with . The preceding parts give , so Euler's criterion implies . The multiplicative order of three divides . Every proper divisor of this power of two divides . If were proper, that half-power would be one, a contradiction. Therefore
which means precisely that three is a primitive root modulo .
Euler's criterion gives
If either factor is divisible by , both asserted values are zero. Otherwise the two values lie in , whose elements are distinct modulo an odd prime. The modular congruence is therefore equality:
Finally, means they give the same residue class and thus the same set of square-congruence solutions. Divisibility by is also identical. Hence .
Euler's criterion states that
For this says that the power is for a quadratic residue and for a quadratic nonresidue. When , both sides are zero modulo .
The first supplementary law for quadratic reciprocity is
It also follows immediately from Euler's criterion applied to .