Homepage › Solution manuals › Ivan Niven › An Introduction to the Theory of Numbers › Exercise 2.2.10 (Number of solutions of $x^2 - y^2 \equiv a \pmod p$)
Exercise 2.2.10 (Number of solutions of $x^2 - y^2 \equiv a \pmod p$)
Show that if is an odd prime then the number of solutions (ordered pairs) of the congruence is unless , in which case the number of solutions is .
Answers
The idea is to transform the equation in the simpler equation , with the chage of variables .
Proof. Write the field with elements. Let denote the class of modulo , and consider the sets
We want to prove that and have same cardinality. Consider the maps
These definitions make sense:
- If , then satisfies , so .
-
If , then (where is invertible, because is an odd prime) satisfies
so .
Moreover
(because
Therefore is bijective, and this proves
Now the cardinality of is more easy to compute.
-
Assume that , and consider the maps
(here , so .)
Then, for all ,
and for all , , thus , so
This shows , so that is bijective, and
Therefore the number of solutions of the congruence is if .
-
Assume that (i.e. ). Since in the field ,
Therefore
To conclude, the number of solutions of the congruence is unless , in which case the number of solutions is . □