In number theory, quadratic Gauss sums are certain finite sums of roots of unity. A quadratic Gauss sum can be interpreted as a linear combination of the values of the complex exponential function with coefficients given by a quadratic character; for a general character, one obtains a more general Gauss sum. These objects are named after Carl Friedrich Gauss, who studied them extensively and applied them to quadratic, cubic, and biquadratic reciprocity laws.
Let p be an odd prime number and a an integer. Then the Gauss sum mod p, g(a;p), is the following sum of the pth roots of unity:
If a is not divisible by p, an alternative expression for the Gauss sum (with the same value and can be done by evaluating in two different ways) is
Here is the Legendre symbol, which is a quadratic character mod p. An analogous formula with a general character χ in place of the Legendre symbol defines the Gauss sum G(χ).