-1

I am a little confused about how to start a proof like this. Any pointers are appreciated. Thank you.

Let $p$ be a prime. Prove that $x^2\equiv 1\mbox{ mod }p$ if and only if $x\equiv 1\mbox{ mod }p$ or $x\equiv p-1\mbox{ mod }p$. Useful note aside: $p-1\equiv -1\mbox{ mod }p. Why?$

  • Any if and only if problem has two parts, the forward and reverse direction. The reverse direction seems easier. Let $x$ be of the form $pk + 1$ and $pk - 1$ and then square and see what you get – Dhanvi Sreenivasan May 14 '20 at 05:59
  • "Any if and only if problem has two parts, the forward and reverse direction. " Wellllll, yessss.... but if every step of the proof is reversible going in one direction implies the other direction will work and you don't have to do it. But EVERY step must go in both directions. – fleablood May 14 '20 at 06:25

2 Answers2

1

$x^2\equiv1\bmod p$ means $p|x^2-1=(x-1)(x+1)$, which means $p|x-1$ or $p|x+1$,

which means $x\equiv1\bmod p$ or $x\equiv-1\bmod p$.

$-1\equiv p-1\bmod p$, because the difference of $p-1$ and $-1$ is $p$, which is divisible by $p$.

J. W. Tanner
  • 63,683
  • 4
  • 43
  • 88
1

This will fall into your lap like magic.

The definition of $x^2 \equiv 1 \pmod p$ means that $p|x^2 -1$. And as $x^2-1 = (x+1)(x-1)$ then $p|(x+1)(x-1)$.

But $p$ is prime and we've got this thing called Euclids lemma so either $p|x+1$ or $p|x-1$.

But the definition of $x \equiv 1 \pmod p$ is $p|x-1$ and the definition of $x \equiv-1\pmod p$ is $p|x-1$.

So either $x\equiv 1\pmod p$ or $x \equiv -1\pmod p$.

Oh... okay... one more thing,not hard. $x\equiv -1 \pmod p \iff p|x+1 \iff p|x+1 -p\iff p|x-(p-1)\iff x\equiv p-1 \pmod p$.

If you blink, you'll miss it.

fleablood
  • 130,341
  • Thank you so much. I don't think we touched on Euclid's theorem in class so I didn't know where to go after writing out the definition of modulo. – James Anderson May 14 '20 at 06:50
  • "I don't think we touched on Euclid's theorem in class" Oh, you must have. It's practically impossible to do any number theory without it. If $p$ is a prime and $p|ab$ then either $p|a$ or $p|b$.... This isn't true if $p$ isn't prime. Example $p=35$ then the $5*7=35$ so $(6-1)(6+1)=35$ so $6^2-1 =35$ so $35|6^2-1$ so $6^2\equiv 1\pmod{35}$. But $6\not\equiv \pm 1\pmod {35}$ and $35$ doesn't divide either $5$ nor $7$. Instead $35$ can "split" between $5$ and $7$. A prime can not split. – fleablood May 14 '20 at 16:20