# modular arith.

• March 8th 2009, 08:30 AM
mandy123
modular arith.
if we are doing modular arith. why will (a)mod p always have an inverse if p is prime???

• March 8th 2009, 11:48 AM
Moo
Hello,

A number a has an inverse modulo p if a is coprime with p.

so if $a \neq p^n$, where p is prime, then a has an inverse modulo p !
especially if $a, then it has an inverse.
• March 9th 2009, 04:57 AM
JaneBennet
Quote:

Originally Posted by Moo
Hello,

A number a has an inverse modulo p if a is coprime with p.

so if $a \neq \color{red}np$, where p is prime, then a has an inverse modulo p !
especially if $a, then it has an inverse.

Just a minor correction. (Happy)