There is a book on algebraic number theory I am reading that shows the following theorem.

Let $Q$ be a nondegenerate quadratic form in $n$ variables with coefficients in $F_p$ ($p \neq 2$). Then$$\text{Card}\{x \in (\textbf{F}_p)^n : Q(x) = 0\} = p^{n-1} + \epsilon(p-1)p^{{n\over{p}} - 1},$$where$$\epsilon = \begin{cases} 0 & \text{ if }n \text{ is odd,} \\ \left({{(-1)^{n\over2} D_Q}\over{p}}\right) & \text{ if }n \text{ is even.}\end{cases}$$

In the proof, there is the assertion that$$pN = \sum_{a = 0}^{p-1} \sum_{x \in \textbf{F}_p^n} \text{exp}\left({{2\pi iaQ(x)}\over{p}}\right),$$where $N$ is the cardinality in the statement of the theorem. I do not see why this equality is true. Could someone help me?

EDIT: Someone had linked me a proof, but again, that proof does not clarify the step I have pointed out as not understanding...

  • 3
    $\begingroup$ possible duplicate of The number of solution of $x_1^2 + \cdots + x_k^2 \equiv \lambda \bmod q$ $\endgroup$
    – Felipe Voloch
    Sep 13, 2015 at 20:36
  • 5
    $\begingroup$ Swap the order of summation, and observe the inner sum is geometric sum and vanishes unless $Q(x)=0$. $\endgroup$
    – user14972
    Sep 13, 2015 at 20:42
  • $\begingroup$ Could you expand on your comment a bit, @Hurkyl? $\endgroup$
    – user268197
    Sep 13, 2015 at 20:45
  • 1
    $\begingroup$ Although it is also an interesting question, in abstract, it is indeed "old news" and even so on this site and others... but, yes, it is also an important, iconic question, so, perhaps, someone (yeah, not me!) should figure out how to make the answer more visible to people who don't know the "true tags" of the good-answer. Isn't that always the problem? :) $\endgroup$ Sep 13, 2015 at 23:12
  • $\begingroup$ Can someone comment on whether this theorem is true over any finite field of odd characteristic? $\endgroup$
    – JeremyKun
    Sep 18, 2015 at 14:26

1 Answer 1


The key point is that for any $y$:

$\sum_{a=0}^{p-1}\exp\left( \frac{ 2\pi i y}{p}\right)=\begin{cases} p & \text{ if }y=0 \\ 0 & \text{ if }y \neq 0\end{cases}$

Simply switch the order of summation and plug that in.

This identity follows summing a geometric series.

  • $\begingroup$ You forgot the $a$ in the exponent $\endgroup$
    – user14972
    Sep 14, 2015 at 21:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .