# Homework Help: Show -1 and +1 are only solutions to x^2 = 1 (mod p^2) for odd prime p.

1. Oct 19, 2011

### Vespero

1. The problem statement, all variables and given/known data

Let p be an odd prime and n be an integer. Show that -1 and +1 and the only solutions to $x^2 \equiv 1\ mod\ p^n.$ Hint: What does $a \equiv b\ mod\ m$ mean, then think a bit.

2. Relevant equations

$x^2 \equiv 1\ mod\ p^n \rightarrow x^2 = 1 + p^nk$ for k an integer.

3. The attempt at a solution

I've tried using the fact that $x^2 \equiv 1\ mod\ p^n$ implies that x is its own inverse and thus that $x \equiv x\ mod\ p^n$ and that $x^2 \equiv 1\ mod\ p^n$ implies $x^2 \equiv 1\ mod\ p^{n-1}$, attempting to find a way to combine the equations to force x to be either 1 or -1, but neither of these got me anywhere. The hint the teacher left makes me think the answer is something fairly simple (perhaps perfect squares cannot have the form $x^2 = p^nk + 1$ for $p > 2$), but I just can't seem to see it. I have a feeling that just the tiniest push in the right direction would lead me to the answer.

2. Oct 19, 2011

### micromass

If $x^2=1$ (mod $p^n$), then $p^n$ divides $x^2-1$.

Rewrite $x^2-1$.

3. Oct 19, 2011

### Vespero

So, $x^2 \equiv 1\ mod\ p^n$ implies $p^n|x^2 - 1$.
Factoring $x^2 - 1$, we have that $p^n|(x+1)(x-1)$.
Since $(x + 1) - (x - 1) = 2$, $p^n|(x+1)$ and $p^n|(x-1)$ only if $p|2$, which would imply that p=2. However, since we are dealing with odd primes, Euclid's Lemma requires that either $p^n|(x+1)$ or $p^n|(x-1)$. For $x\ mod\ p^n$, the only solution to the first relation is $x\ =\ p^n - 1 \equiv -1\ (mod p^n)$, and the only solution to the second relation is $x\ =\ 1 \equiv 1\ (mod p^n)$. Thus, $x \equiv \pm 1\ (mod\ p^n)$ are the only solutions to $x^2 \equiv 1\ (mod\ p^n)$ for p < 2.

Is this correct?

Last edited: Oct 19, 2011
4. Oct 19, 2011

### micromass

Seems ok!! Congratulations!!