mod n (n is prime number)
x * y ≡ 1 mod n (y is an MI of mod n)
Note:
x and n have to be coprime i.e. GCD(x, n) = 1
(2 is MI of 3 or 2 is MI of 3 mod 5)
x≡0 mod n (n is prime number)
x * y ≡ 1 mod n (y is an MI of mod n)
y≡x−1modn
Note:
x and n have to be coprime i.e. GCD(x, n) = 1
3≡0mod5
3∗2≡1mod5
2≡3−1mod5 (2 is MI of 3 or 2 is MI of 3 mod 5)