Understanding Square Residue: Solving the Mystery of -1 = x^2 mod p

  • Context: Graduate 
  • Thread starter Thread starter MathematicalPhysicist
  • Start date Start date
  • Tags Tags
    Residue Square
Click For Summary

Discussion Overview

The discussion revolves around the mathematical concept of square residues, specifically addressing the equation (-1) = x^2 mod p for a prime p where p = 1 mod 4. Participants explore the implications of Wilson's theorem and the factorial representation of residues.

Discussion Character

  • Technical explanation
  • Conceptual clarification
  • Debate/contested

Main Points Raised

  • One participant questions the validity of the statement that (-1) = x^2 mod p for primes p = 1 mod 4, seeking clarification on the proof involving factorials.
  • Another participant points out that x^2 mod p is not universally -1 for all x, providing specific counterexamples such as p=13 and p=101.
  • A different participant explains that (p-1)! = -1 mod p for all prime p, referencing Wilson's theorem and discussing the pairing of residues and their inverses.
  • Some participants express realization and understanding of the reasoning behind the factorial product equating to -1, while also reflecting on the clarity of the original source material.
  • There is a sentiment expressed about the perceived inadequacy of mathematical texts in providing complete explanations, highlighting a frustration with the communication of complex ideas.

Areas of Agreement / Disagreement

Participants exhibit a mix of understanding and confusion regarding the implications of the statements made. While some agree on the validity of Wilson's theorem, others raise concerns about the generalization of the square residue condition.

Contextual Notes

There are unresolved assumptions regarding the conditions under which (-1) = x^2 mod p holds true, and the discussion does not clarify the implications of the counterexamples provided.

MathematicalPhysicist
Science Advisor
Gold Member
Messages
4,662
Reaction score
372
I forgot why the next statement is true and it's bugging me endlessly...

If p is prime such that p =1 mod 4 then (-1) = x^2 mod p.

Now in Ashe's Algebriac Number theory notes (book?), he says that
[tex]((\frac{p-1}{2})!)^2= -1 mod p[/tex]

I am quite stumped as how to show this, he argues we just need to look at:
1*2*...((p-1)/2)*(-1)*(-2)...*(-(p-1)/2)

which on the one hand because p =1 mod 4 it equals [tex]((\frac{p-1}{2})!)^2[/tex]
on the other hand it also equals (p-1)!, but why does this equal -1?

Thanks.
 
Physics news on Phys.org
x2modp is not -1 for all x. Examples of exceptions include p=13, x=4; p=13 x=2; p=101, x=5...
 
cubzar, what he meant was that there is a solution to x^2 = -1 mod p.

It's because (p-1)! = -1 mod p for all prime p. I believe this is called wilsons theorem. The reasons why this is true is that 1,2,3,...,p-1 are all residue classes mod p, so for each number in the product, its inverse is also a factor for all numbers which are not their own inverse. These are 1 and -1 = p-1, so we can ignore them and pair up the others. Thus 2*3*...*(p-2) = 1, and so (p-1)! = -1.
 
Ok, thanks, now I do get it.
in 2*3*...*(p-2) we have a number and its inverse multiplied together, this is why it equals 1.

I don't understand how I didn't notice this triviality, I guess the age does it trick... :-(
 
MathematicalPhysicist said:
Ok, thanks, now I do get it.
in 2*3*...*(p-2) we have a number and its inverse multiplied together, this is why it equals 1.

I don't understand how I didn't notice this triviality, I guess the age does it trick... :-(

I don't think it is your fault, the author should have explained it instead of showing off. This is the problem with mathematicians, they write books as incomplete instruction manuals and expect the reader to fill in the gaps.
:smile:
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 5 ·
Replies
5
Views
6K
Replies
12
Views
4K
  • · Replies 12 ·
Replies
12
Views
10K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 5 ·
Replies
5
Views
9K
  • · Replies 5 ·
Replies
5
Views
6K