# Question on modular arithmetic?

Would this ever be possible:

$$a b^2 ≡ a \pmod p$$

where $p$ is a prime number and $1<a<p$ and $1<b$

Please back your answer with some kind of proof other than Fermat's Little Theorem. This isn't homework.

-
Put $a=0$ then true for all $b$. – john w. Apr 21 '12 at 22:03
Sorry, forgot to include $p$ and $b$ have to be greater than 1! – user26649 Apr 21 '12 at 22:06
Any $b \equiv \pm 1 \pmod p.$ – Will Jagy Apr 21 '12 at 22:07

Hint $\$ prime $\rm\: p\ |\ ab^2-a = a\:(b-1)(b+1)\ \Rightarrow\ p\ |\ a\ \ or\ \ p\ |\ b-1\ \ or\ \ p\ |\ b+1$

-
@Downvoter: Why? If something is not clear then please feel free to ask questions and I am happy to elaborate. – Bill Dubuque Apr 21 '12 at 23:45
I don't see why the answer was downvoted... Anyways, your answer was perfect, thank you! – user26649 Apr 22 '12 at 0:50

If $a\equiv0\bmod p$, the given relation is true for all $b$.

If $a\not\equiv0\bmod p$ then $a$ can be cancelled from both sides of the congruence which reduces to $b^2\equiv1\bmod p$, hence $b\equiv\pm1\bmod p$.

-
would the downvoter care to explain? – Andrea Mori Apr 21 '12 at 22:47
It seems someone is unhappy with both of our answers. I cannot imagine why. But then voting is often irrational here. – Bill Dubuque Apr 21 '12 at 23:48

Since $p$ is prime, we can cancel $a$ from both sides unless $a\equiv 0 \pmod p$ (this doesn't always work if $p$ is a composite number). We get $b^2 \equiv 1 \pmod p$. Again, since $p$ is prime, a number can have only two mod-$p$ square roots (it can have more than two in some cases if $p$ is composite). The two square roots of $1$ are $\pm 1$ and $-1$ is of course the same as $p-1$.

So $ab^2\equiv a\pmod p$ holds if either $a\equiv 0$ or $b\equiv\pm1$, but not otherwise.

So which parts of this do you want proofs of? The proof that nonzero numbers are invertible in mod $p$ (thereby justifying the cancelation from both sides)? I once posted an answer that shows how to find the inverse. The proof that there can't be more than two square roots if $p$ is prime? (That latter fact is a sort of corollary.)

-