Prove that if a prime $p$ divides $a^2 + b^2$ then it must divide both a and b.

3.7k Views Asked by At

I proved this by taking cases for different remainders and using modular arithmetic, when the prime is $3$.However this method won't give a general proof for all primes.I was eager to get a proof for all primes $p$, but i couldn't get one.I have seen in Pythagorean triples that if both $a$ and $b$ are not divisible by $p$, $c=a^2 + b^2$ is also not, but how do i prove it?

Proving by contradiction may help...maybe induction. Also we can try proving for all numbers. of the form $6n+1$ and $6n-1$ so that it becomes evident for all primes.

The question changed and now is about proving that for all primes equivalent to $3 \bmod 4.$

2

There are 2 best solutions below

2
On

Suppose $$p\equiv 3\mod 4$$ is a prime and $$a^2+b^2\equiv 0\mod p$$ holds.

$b\equiv 0\mod p$ implies $a\equiv 0\mod p$

If $b\ne 0\mod p$, then multiplying with $(b^{-1})^2$ turns the equation into $$u^2+1\equiv 0\mod p$$ so $$u^2\equiv -1\mod p$$

Hence $-1$ is a quadratic residue mod $p$, which is impossible for a prime $p$ with $p\equiv 3\mod 4$.

1
On

Well it's only true if the prime you are taking about is $\equiv 3 \mod 4$ or $2$ and proof for that is here...

You can consider proving contrapositive i.e. if $p$ does not divide $a$ and $p$ does not divide $b$ then $p$ is not of the form $4m+3$ for integral $m$. Since $p$ is a prime and does not divide $a,b$ so we may assume that $(p,a)=(p,b)=1$.

Thus there exist $a'$ such that $aa' \equiv 1 (\mod p)$ as given $a^2\equiv -b^2 (\mod p)$ on multiplying both side of congruence by $a'a'$ we see that $1\equiv (aa')^2= -b^2(a')^2 (\mod p)$ so if $y =ba' $ then $y^2 \equiv -1(\mod p)$ which implies $p=2 $ or $p\equiv 1 (\mod 4)$.