-1

We begin by listing all the positive integers from $1$ to $p − 1$: $$1, 2, 3, . . . , p − 1. $$

$p$ is a prime. The numbers on the list that are their own inverse are exactly $1$ and $p − 1$.

For $x, 1\leq x \leq p − 1, x$ is its own inverse if and only if $x^2 ≡ 1 \pmod p$. Because $p$ is prime, this can happen only if $p$ divides either $x − 1$ or $x + 1$.

Then the author writes -

Thus, the numbers on the list that are their own inverse are exactly $1$ and $p − 1$.

I just couldn't see through the last line, how from $p$ divides either $x − 1$ or $x + 1$ we deduce the numbers which are their own inverse are exactly $1$ and $p − 1$?

Bill Dubuque
  • 282,220
  • 2
    Can you see that $p|x-1\iff x\equiv1\pmod p$ and $p|x+1\iff x\equiv p-1\pmod p$? – J. W. Tanner Nov 02 '20 at 15:41
  • Take the two cases separately. Suppose $p$ divides $x-1$. Because $1\leq x \leq p − 1$, you know that $0\leq x-1\leq p-1$. If $p$ divides a number between $0$ and $p-1$, what is the number? Then what is $x$? Now repeat this assuming $p$ divides $x+1$, the other possibility. – Steve Kass Nov 02 '20 at 15:44
  • @J.W.Tanner Ah, missed that. Will delete my unhelpful comment. – lulu Nov 02 '20 at 15:45
  • 1
    @SteveKass $p$ does not divide any number between $0$ and $p-1$, that is the root of confuseion. – Consider Non-Trivial Cases Nov 02 '20 at 15:46
  • 1
    Every number divides $0\color{grey}{=1-1}$. Also $p$ divides $p\color{grey}{=(p-1)+1}$. Recall your definitions. $x\mid y$ iff there exists some integer $k$ such that $xk=y$. Now... $p\mid 0$ since there does exist an integer $k$ such that $pk=0$, namely $k=0$. Similarly, $p\mid p$ since there does exist an integer $k$ such that $pk=p$, namely $k=p$. – JMoravitz Nov 02 '20 at 15:47
  • 1
    typo: for the second part I meant to say "namely $k=1$" – JMoravitz Nov 02 '20 at 15:55
  • 1
    As JMoravitz pointed out, $p$ does divide one of the numbers between $0$ and $p-1$. It divides $0$. – Steve Kass Nov 02 '20 at 16:05
  • Also note: Then *definition of $a\equiv b \pmod p$ is that $p|a-b$. So if $p|x+1$ then $x+1 \equiv 0 \pmod p$ so $x \equiv -1 \equiv p-1\pmod p$. And if $p|x-1$ then $x-1 \equiv 0\pmod p$ so $x \equiv 1 \pmod p$. – fleablood Nov 02 '20 at 16:36
  • And a thirteenth way of looking at it. The only numbers between $0$ and $p$ that $p$ divides are $0$ and $p$. $x\pm 1 = 0,p$ so $x =-1,1,p-1,p+1$. The only ones of those between $0$ and $p-1$ are $1,p-1$. – fleablood Nov 02 '20 at 16:41

4 Answers4

2

If $x$ is its own inverse then

$x^2 \equiv 1 \pmod p$

$x^2 -1 \equiv 0 \pmod p$

So $p|x^2 - 1$ and as $x^2 -1= (x+1)(x-1)$ the $p|(x+1)(x-1)$.

As $p$ is prime either $p|x+1$ or $p|x-1$.

Case 1: $p|x+1$. That means that $x+1 = pk$ for some integer $k$. So $x+1 \equiv 0 \pmod p$ and $x \equiv -1 \equiv p -1 \pmod p$.

Case 2: $p|x-1$. That means $x -1 =pk$ for some integer $k$. So $x-1\equiv 0 \pmod p$ and $x \equiv 1 \pmod p$.

And that's it. Because $p$ is prime there are not other cases.

....

Note if $p$ isn't prime that need not be true.

For example: If $n = 24$ then if $x$ is it's only inverse then $x^2\equiv 1 \pmod n$ and so $24|x^2 -1 = (x+1)(x-1)$.

We could have $24|x+1$ and so $x+1\equiv 0\pmod {24}$ or $x\equiv 23 \pmod {24}$. Or we could have $24|x-1$ so $x-1\equiv 0$ and $x\equiv 1\pmod{24}$.

But we could also have $m|x+1$ and $\frac {24}m|x-1$. For say $m=6$ as so $6|x+1$ and $4|x-1$ and $x=5$ or $x=17$ (and $5^2 \equiv 1 \pmod {24}$). Or $m=4$ so $4|x+1$ and $6|x-1$ and $x =7$ or $x=19$ (and $7^2\equiv 1 \pmod{24}$). Or $m=3$ so $3|x+1$ and $8|x-1$ and $x\equiv 17$. Or $m=8$ so $8|x+1$ and $3|x-1$ so $x=7$. Or $m=2$ and $2|x+1$ and $12|x-1$ so $x=13$ or $1$. Or $m=12$ and $12|x+1$ and $2|x-1$ and $x =11$ or $x=23$.

fleablood
  • 130,341
1

Well, take $x=1+t$, then: $$(1+t)^2=1+2t+t^2\equiv1\pmod p \iff t^2+2t=t(t+2)\equiv 0\pmod p$$ i.e. $p|t\implies x=kp+1$ or $p|(t+2)\implies x=kp-1$ for $k\in\Bbb Z$

In the range $1\leq x\leq p-1$, only $1, p-1$ are of this form

Rhys Hughes
  • 13,103
1

Conceptually this is an immediate consequence of the uniqueness of the remainder, i.e.

$$ x \equiv r\!\!\!\pmod{\! n} \ \ {\rm and} \ \ 0\le x,r < n\,\Longrightarrow\, x = r$$

Your special case is $\,r = 1\,$ and $\,r = n\!-\!1\ [\:\!\equiv -1\pmod{\!n}\:\!]$

Remark $ $ Any complete system of residues comprises a set of normal forms ("remainders") for $\,\Bbb Z/n = \Bbb Z\bmod n = $ integers $\!\bmod n,\,$ i.e. every integer is congruent to exactly one of them.

The above displayed inference implies congruence is equivalent to equality on normal forms, i.e.

$$ r'\equiv r\!\!\!\pmod{n}\iff r'\bmod n\,=\, r\bmod n$$

where here $\,k\bmod n\,$ denotes the normal form from the chosen complete set of representatives. This is the key property of normal forms.

It is important to understand this conceptual viewpoint since else it will prove very cumbersome to rediscover or reprove these results every time they are (frequently) used in number theory and algebra. While here the proof is not too difficult, it may be much more complex in other cases (e.g. proving that two fractions are equivalent iff they have the same reduced form).

Bill Dubuque
  • 282,220
0

If $p|x-1$, then because $0 \leq x-1 \leq p-2$, the only possibility is $x-1=0$ i.e. $x=1$.

If $p|x+1$, then because $2 \leq x+1 \leq p$, the only possibility is $x+1=p$ i.e. $x=p-1$.

TheSilverDoe
  • 30,038