# §27.9 Quadratic Characters

For an odd prime , the Legendre symbol is defined as follows. If divides , then the value of is 0. If does not divide , then has the value 1 when the quadratic congruence has a solution, and the value −1 when this congruence has no solution. The Legendre symbol , as a function of , is a Dirichlet character (mod ). It is sometimes written as . Special values include:

27.9.1
27.9.2

If are distinct odd primes, then the quadratic reciprocity law states that

27.9.3

If an odd integer has prime factorization , then the Jacobi symbol is defined by , with . The Jacobi symbol is a Dirichlet character (mod ). Both (27.9.1) and (27.9.2) are valid with replaced by ; the reciprocity law (27.9.3) holds if are replaced by any two relatively prime odd integers .