Homepage › Solution manuals › Ivan Niven › An Introduction to the Theory of Numbers › Exercise 5.8.4 (Number of solutions of the congruence $x^2 + y^2\equiv 1 \pmod p$)
Exercise 5.8.4 (Number of solutions of the congruence $x^2 + y^2\equiv 1 \pmod p$)
Let be a prime number, , and suppose that and are integers such that . Let be determined by the congruence . Show that , and that , where .
Show, conversely, that if is an integer such that and if are given in terms of as above, then and . Show that the number of that arise in this way is . Deduce that the number of solutions of the congruence is .
Answers
beginproof
- (a)
-
We translate the problem in
. Let
denote the classes of
in
. We write
for the classes
in
.
Suppose that in satisfy and . Then is invertible. Put , then
Assume for the sake of contradiction that . Then , otherwise , thus , and , because .
Since , then , therefore
so , which is impossible because (and ). This shows that , so we may define
Then
Therefore (1) becomes
This gives
and (because ), so
In conclusion, for all , if then there are such that
- (b)
-
Conversely, suppose that there are
such that
Then
and , otherwise . Then , thus , and , therefore , . Then . This gives the waited contradiction, because in where . In conclusion
- (c)
-
Consider the two curves in the plans
:
and let be the map defined by
Then is well defined, because by part (b).
Moreover is surjective (onto) by part (a).
We show that is injective (one-to-one). Suppose that , where and are points on . Put . Then and . Therefore and
Similarly thus , where , thus .
Therefore and . If , the second equation shows that , and if , the first equation shows also . So . This shows that is injective.
Since is bijective,
We compute directly .
-
If , then for all , , thus
thus , and
-
Suppose now that . There are exactly two values of such that . If , there is no such that . If , , so there is exactly one such that :
thus , and
In either case,
-
The number of solutions of the congruence is
Note: For another proof with Gauss sums and Jacobi sums, see Ireland, Rosen p. 93, 94.