# Thread: Modular Inverses

1. ## Modular Inverses

Hi is there a general formula to find the inverse modulo of "a modulo n"...
i know its denoted as $a^{-1}$ and
$a.a^{-1} = 1 mod n$

for example if a=29 and n = 78 then the inverse is 35 since: 29.35 = 1 mod 78...

(a)
but HOW DO U CALCULATE THE INVERSE? is there a formula?? please help me out here?

(b)
and how can this be used to solve 43 modulo 125, hence solve 43x = 3 mod 125

thanks

2. Originally Posted by smoothman
Hi is there a general formula to find the inverse modulo of "a modulo n"...
i know its denoted as $a^{-1}$ and
$a.a^{-1} = 1 mod n$

for example if a=29 and n = 78 then the inverse is 35 since: 29.35 = 1 mod 78...

(a)
but [COLOR=Red]HOW DO U CALCULATE THE INVERSE? [COLOR=Black]is there a formula?? please help me out here?

(b)
and how can this be used to solve 43 modulo 125, hence solve 43x = 3 mod 125
]
You can apply Euclid's algorithm, that is what I do when it is big numbers.