Quadratic Residues: Explanation & Modulo Odd Prime Number

  • Context: Undergrad 
  • Thread starter Thread starter moriheru
  • Start date Start date
  • Tags Tags
    Quadratic
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
3 replies · 3K views
moriheru
Messages
273
Reaction score
16
This may be a bit vague but can anyone explain this sentence to me
http://en.wikipedia.org/wiki/Quadratic_residue:"Modulo 2, every integer is a quadratic residue.

Modulo an odd prime number p there are (p + 1)/2 residues (including 0) and (p − 1)/2 nonresidues."

If this is to vague I apologize.
 
Mathematics news on Phys.org
As in the link above, an integer a is a quadratic residue modulo p if it's congruent to a square mod p. In other words, the congruence [itex]x^2 \equiv a \text{ }\left( \text{mod } p \right)[/itex] has a solution. Some like to add that a needs to be invertible, since 0 is trivially a quadratic residue. The first line says that every integer a satisfies the congruence [itex]x^2 \equiv a \text{ }\left( \text{mod } 2 \right)[/itex]. This isn't surprising: if a is 0 or 1 modulo 2, there will always be a solution (just take x to be 0 or 1 respectively).

The second line is saying that the congruence [itex]x^2 \equiv a \text{ }\left( \text{mod } p \right)[/itex] for p ≠ 2 has [itex]\frac{p+1}{2}[/itex] integer values of a for which that congruence holds, and [itex]\frac{p-1}{2}[/itex] integer values of a for which it doesn't.

For example, take p = 7. The squares mod 7 are 0, 1, 2, 4, so the quadratic residues mod 7 are 0, 1, 2 and 4. The quadratic non-residues are 3, 5 and 6, because you can't find an integer that squares to give 3, 5 or 6, modulo 7.
 
  • Like
Likes   Reactions: moriheru
Thanks but how does one get to the p/2-1/2?