0

Let $x$ and $y$ be integers not congruent to $0$ modulo $p$ where $p$ is a prime. Prove that if $p \equiv 3 \pmod{4}$ then $x^2+y^2 \not \equiv 0 \pmod{p}$.

I thought about proving this algebraically and by contradiction. So we say $x^2+y^2 = pz$ and have to show this is impossible.

user19405892
  • 15,592
  • 1
    You need to specify that $x,y$ are not $0\pmod p$. – lulu Jun 29 '16 at 01:31
  • It's not true. $p^2+p^2\equiv 0\pmod p$ for any prime $p$. You also don't want to reuse the letter $y$ in your second part. You want to show that $x^2+y^2=pz$ is not possible. – Thomas Andrews Jun 29 '16 at 01:31
  • Closely related to http://math.stackexchange.com/questions/1817367/prove-that-forall-k-m2-1-space-m-in-mathbbz-if-k-is-divisible. – lhf Jun 29 '16 at 01:43

2 Answers2

3

Let $p$ be an odd prime such that $x^2+y^2 \equiv 0 \bmod p$ but $x,y \not\equiv 0 \bmod p$.

Let $z$ be the inverse of $y \bmod p$. Then $(xz)^2 \equiv -1 \bmod p$ and so $(xz)^4 \equiv 1 \bmod p$.

This means that $xz$ has order $4$ mod $p$ and so $4$ divides $p-1$, by Lagrange's theorem in group theory.

lhf
  • 216,483
1

Assume to the contrary that $p \equiv 3 \pmod{4}$ and $x^2+y^2 \equiv 0 \pmod{p},$ where $p$ does not divide $x$ or $y$. Then we have $\left(\dfrac{x}{y}\right)^2\equiv -1 \pmod{p}, $ which contradicts the fact that $-1$ can not be a quadratic residue modulo such $p$.

J. W. Tanner
  • 60,406
mathman
  • 117