0

Question: If $P$ is a prime and $a^2 \equiv b^2 (mod \text{ P})$ then prove that $a \equiv b (mod \text{ P})$ or $a \equiv -b (mod \text{ P})$.

My attempt (which seems to be failing beautifully): Let $f(x)$ be a function such that $f(x) = x^2$. Now, because $f(a) \equiv f(b) (mod \text{ n})$ iff $a \equiv b (mod \text{ n})$.

Hence, if given that $a^2 \equiv b^2 (mod \text{ P})$, this means that $f(a) \equiv f(b) (mod \text{ P})$ or $f(a) \equiv f(-b) (mod \text{ P})$

Problem: But I don't get the requirement that $P$ needs to be prime, because the way I am proving can be generalized for any integer $P$. I have tried integer values and I get that my proof is wrong for general $P$, but I can't seem to wrap this idea in the proof

Jyrki Lahtonen
  • 133,153
  • 2
    Write $a^2-b^2=(a+b)(a-b)$ and apply the definition of a prime element. – Marius S.L. Mar 26 '24 at 14:46
  • It doesn't work on every integer $p$. Note that $4^4\equiv 2^4 \pmod{16}$, but $4\not\equiv \pm 2 \pmod{16}$. If $p$ prime and $a,b$ integers such that $p\mid ab$, then $p\mid a$ or $p\mid b$ (look at prime factorisation of $a,b$ if $a,b\neq 1$) – Wildan B. W. Mar 26 '24 at 14:51
  • Take a look at for example this. The same logic has been used many time on our site already, do search! – Jyrki Lahtonen Mar 26 '24 at 14:57
  • I am a new user and a little confused with the GUI especially the 'search' feature. Is there some page where I can get to know all these? @JyrkiLahtonen – Ayush Maurya Mar 26 '24 at 15:01
  • My doubt has been cleared, so am I supposed to edit my question as 'answered' or something? – Ayush Maurya Mar 26 '24 at 15:04
  • Very glad you asked! If you LaTeX approcah0 is one of the better alternatives. The on-site search is also good, but it doesn't grok TeX, so it doesn't work well when a formula is the key buzzword. – Jyrki Lahtonen Mar 26 '24 at 15:04
  • Not necessarily anything you need to do now. If other reviewers agree with my suggestion the question will be marked a duplicate, and no harm was done. They may be able to find an even better match (some may have one bookmarked!) You probably don't want to delete the question. At least not right away. – Jyrki Lahtonen Mar 26 '24 at 15:06
  • Thanks for the clarification, helps new users like me a lot and encourages to keep asking doubts – Ayush Maurya Mar 26 '24 at 15:10

0 Answers0