# Quadratic Gauss sum

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.

## Definition

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:

$g(a;p) =\sum_{n=0}^{p-1}e^{2{\pi}ian^2/p}=\sum_{n=0}^{p-1}\zeta_p^{an^2}, \quad \zeta_p=e^{2{\pi}i/p}.$

If a is not divisible by p, an alternative expression for the Gauss sum (with the same value) is

$G(a,\chi)=\sum_{n=1}^{p-1}\left(\frac{n}{p}\right)e^{2{\pi}ian/p}.$

Here $\chi(n)=\left(\frac{n}{p}\right)$ 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(χ).

### Properties

• The evaluation of the Gauss sum can be reduced to the case a = 1:
$g(a;p)=\left(\frac{a}{p}\right)g(1;p).$
• The exact value of the Gauss sum, computed by Gauss, is given by the formula
$g(1;p) =\sum_{n=0}^{p-1}e^{2{\pi}in^2/p}= \begin{cases} \sqrt{p} & p\equiv 1\mod 4 \\ i\sqrt{p} & p\equiv 3\mod 4 \end{cases}.$
The fact that $g(a;p)^2=\left(\frac{-1}{p}\right)p$ was easy to prove and led to one of Gauss's proofs of quadratic reciprocity. However, the determination of the sign of the Gauss sum turned out to be considerably more difficult: Gauss could only establish it after several years' work. Later, Peter Gustav Lejeune Dirichlet, Leopold Kronecker, Issai Schur and other mathematicians found different proofs.

## Generalized quadratic Gauss sums

Let a,b,c be natural numbers. The generalized Gauss sum G(a,b,c) is defined by

$G(a,b,c)=\sum_{n=0}^{c-1} e\left(\frac{a n^2+bn}{c}\right),$

where e(x) is the exponential function exp(2πix). The classical Gauss sum is the sum $G(a,c)=G(a,0,c)$.

### Properties

• The Gauss sum G(a,b,c) depends only on the residue class of a,b modulo c.
• Gauss sums are multiplicative, i.e. given natural numbers a, b, c and d with gcd(c,d) =1 one has

This is a direct consequence of the Chinese remainder theorem.

• One has G(a,b,c)=0 if gcd(a,c)>1 except if gcd(a,c) divides b in which case one has
$G(a,b,c)= \gcd(a,c) \cdot G\left(\frac{a}{\gcd(a,c)},\frac{b}{\gcd(a,c)},\frac{c}{\gcd(a,c)}\right)$

Thus in the evaluation of quadratic Gauss sums one may always assume gcd(a,c)=1.

• Let a,b and c be integers with $ac\neq 0$ and ac+b even. One has the following analogue of the quadratic reciprocity law for (even more general) Gauss sums
$\sum_{n=0}^{|c|-1} e^{\pi i (a n^2+bn)/c} = |c/a|^{1/2} e^{\pi i (|ac|-b^2)/(4ac)} \sum_{n=0}^{|a|-1} e^{-\pi i (c n^2+b n)/a}.$
• Define $\varepsilon_m = \begin{cases} 1 & m\equiv 1\mod 4 \\ i & m\equiv 3\mod 4 \end{cases}$ for every odd integer m.

The values of Gauss sums with b=0 and gcd(a,c)=1 are explicitly given by

$G(a,c) = G(a,0,c) = \begin{cases} 0 & c\equiv 2\mod 4 \\ \varepsilon_c \sqrt{c} \left(\frac{a}{c}\right) & c\ \text{odd} \\ (1+i) \varepsilon_a^{-1} \sqrt{c} \left(\frac{c}{a}\right) & a\ \text{odd}, 4\mid c.\end{cases}$

Here $\left(\frac{a}{c}\right)$ is the Jacobi symbol. This is the famous formula of Carl Friedrich Gauß.

• For b>0 the Gauss sums can easily be computed by completing the square in most cases. This fails however in some cases (for example c even and b odd) which can be computed relatively easy by other means. For example if c is odd and gcd(a,c)=1 one has
$G(a,b,c) = \varepsilon_c \sqrt{c} \cdot \left(\frac{a}{c}\right) e^{-2\pi i \psi(a) b^2/c}$

where $\psi(a)$ is some number with $4\psi(a)a \equiv 1\ \text{mod}\ c$. As another example, if 4 divides c and b is odd and as always gcd(a,c)=1 then G(a,b,c)=0. This can, for example, be proven as follows: Because of the multiplicative property of Gauss sums we only have to show that $G(a,b,2^n)=0$ if n>1 and a,b are odd with gcd(a,c)=1. If b is odd then $a n^2+bn$ is even for all $0\leq n < c-1$. By Hensel's lemma, for every q, the equation $an^2+bn+q=0$ has at most two solutions in $\mathbb{Z}/2^n \mathbb{Z}$. Because of a counting argument $an^2+bn$ runs through all even residue classes modulo c exactly two times. The geometric sum formula then shows that $G(a,b,2^n)=0$.

$G(a,0,c) = \sum_{n=0}^{c-1} \left(\frac{n}{c}\right) e^{2\pi i a n/c}.$

If c is not squarefree then the right side vanishes while the left side does not. Often the right sum is also called a quadratic Gauss sum.

• Another useful formula is
G(n,pk)=pG(n,pk-2)

if k≥2 and p is an odd prime number or if k≥4 and p=2.