In modular arithmetic, a quadratic residue for the modulus N is a number which can be expressed as the residue of a2 modulo N for some integer a. A quadratic non-residue of N is a number which is not a quadratic residue of N.
Legendre symbol
When the modulus is a prime p, the Legendre symbol
expresses the quadratic nature of a modulo p. We write
if p divides a;
if a is a quadratic residue of p;
if a is a quadratic non-residue of p.
The Legendre symbol is multiplicative, that is,
![{\displaystyle \left({\frac {ab}{p}}\right)=\left({\frac {a}{p}}\right)\left({\frac {b}{p}}\right).\,}](https://wikimedia.org/api/rest_v1/media/math/render/svg/1a8c4df826fd9f0e0e662eb2bd6dba2fb3d35850)
Jacobi symbol
For an odd positive n, the Jacobi symbol
is defined as a product of Legendre symbols
![{\displaystyle \left({\frac {a}{n}}\right)=\prod _{i=1}^{r}\left({\frac {a}{p_{i}}}\right)^{e_{i}}\,}](https://wikimedia.org/api/rest_v1/media/math/render/svg/ef97df7c669724e1a78d8aad29ff3c0b65b81478)
where the prime factorisation of n is
![{\displaystyle n=\prod _{i=1}^{r}{p_{i}}^{e_{i}}.\,}](https://wikimedia.org/api/rest_v1/media/math/render/svg/04e5dbe5522a393c5616680732e17364a09cabbf)
The Jacobi symbol is bimultiplicative, that is,
![{\displaystyle \left({\frac {ab}{n}}\right)=\left({\frac {a}{n}}\right)\left({\frac {b}{n}}\right)\,}](https://wikimedia.org/api/rest_v1/media/math/render/svg/bb540c57ab6e9255fc3419873d3751febd039e7c)
and
![{\displaystyle \left({\frac {a}{mn}}\right)=\left({\frac {a}{m}}\right)\left({\frac {a}{n}}\right).\,}](https://wikimedia.org/api/rest_v1/media/math/render/svg/f90a5e89102e232947a22061ee7e9ac638ca5ce5)
If a is a quadratic residue of n then the Jacobi symbol
, but the converse does not hold. For example,
![{\displaystyle \left({\frac {3}{35}}\right)=\left({\frac {3}{5}}\right)\left({\frac {3}{7}}\right)=(-1)(-1)=+1,\,}](https://wikimedia.org/api/rest_v1/media/math/render/svg/94fb8a13acd2852b3e5eb52684ff9b52887f9c3c)
but since the Legendre symbol
, it follows that 3 is a quadratic non-residue of 5 and hence of 35.
See also
References
- G. H. Hardy; E. M. Wright (2008). An Introduction to the Theory of Numbers, 6th ed. Oxford University Press. ISBN 0-19-921986-9.