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 p is an odd prime then the number of solutions (ordered pairs) of the congruence x 2 y 2 a ( mod p ) is p 1 unless a 0 ( mod p ) , in which case the number of solutions is 2 p 1 .

Answers

The idea is to transform the equation x 2 y 2 a ( mod p ) in the simpler equation XY a ( mod p ) , with the chage of variables X = x + y , Y = x y .

Proof. Write 𝔽 p the field with p elements. Let α = [ a ] p denote the class of a modulo p , and consider the sets

S a = { ( u , v ) 𝔽 p 2 u 2 v 2 = α } , T a = { ( s , t ) 𝔽 p 2 st = α } .

We want to prove that S a and T a have same cardinality. Consider the maps

φ { S a T a ( u , v ) ( u + v , u v ) , ψ { T a S a ( s , t ) ( [ 2 ] p 1 ( s + t ) , [ 2 ] p 1 ( s t ) ) .

These definitions make sense:

  • If ( u , v ) S a , then ( s , t ) = ( u + v , u v ) satisfies st = ( u + v ) ( u v ) = u 2 v 2 = a , so ( u + v , u v ) = ( s , t ) T a .
  • If ( s , t ) T a , then ( u , v ) = ( [ 2 ] p 1 ( s + t ) , [ 2 ] p 1 ( s t ) ) (where [ 2 ] p is invertible, because p is an odd prime) satisfies

    u 2 v 2 = ( u + v ) ( u v ) = ( [ 2 ] p 1 ( s + t ) + [ 2 ] p 1 ( s t ) ) ( [ 2 ] p 1 ( s + t ) [ 2 ] p 1 ( s t ) ) = st = α ,

    so ( [ 2 ] p 1 ( s + t ) , [ 2 ] p 1 ( s t ) ) = ( u , v ) S a .

Moreover

ψ φ = 1 S a , φ ψ = 1 T a .

(because

( s , t ) = ( u + v , u v ) ( u , v ) = ( [ 2 ] p 1 ( s + t ) , [ 2 ] p 1 ( s t ) ) . )

Therefore φ is bijective, and this proves

| S a | = | T a | .

Now the cardinality of T a is more easy to compute.

  • Assume that α 0 , and consider the maps

    χ { 𝔽 p T a s ( s , α s 1 ) , ξ { T a 𝔽 p ( s , t ) s .

    (here s ( α s 1 ) = α , so ( s , α s 1 ) T a .)

    Then, for all s 𝔽 p ,

    ( ξ χ ) ( s ) = ξ ( s , α s 1 ) = s ,

    and for all ( s , t ) 𝔽 a , st = α , thus α s 1 = t , so

    ( χ ξ ) ( s , t ) = χ ( s ) = ( s , α s 1 ) = ( s , t ) .

    This shows ξ χ = 1 𝔽 p , χ ξ = 1 T a , so that ξ is bijective, and

    | S a | = | T a | = | 𝔽 p | = p 1 .

    Therefore the number of solutions of the congruence x 2 y 2 a ( mod p ) is | S a | = p 1 if a 0 ( mod p ) .

  • Assume that α = 0 (i.e. a 0 ( mod p ) ). Since st = 0 s = 0  or  t = 0 in the field 𝔽 p ,

    T 0 = { ( 0 , 0 ) , ( 1 , 0 ) , ( 2 , 0 ) , , ( p 1 , 0 ) , ( 0 , 1 ) , ( 0 , 2 ) , , ( 0 , p 1 ) } .

    Therefore

    | S 0 | = | T 0 | = 2 ( p 1 ) + 1 = 2 p 1 .

To conclude, the number of solutions of the congruence x 2 y 2 a ( mod p ) is p 1 unless a 0 ( mod p ) , in which case the number of solutions is 2 p 1 . □

User profile picture
2024-08-08 10:54
Comments