Exercise 850Number theory › CongruencesL1Added 3 Nov 2026
Inverse via Fermat
#Fermat#inverse#modular arithmetic
Statement
Let be prime and . Show that .
Hint
Multiply by .
Show solutionHide solution
Solution
Fermat. , so .
Inverse. By uniqueness of the inverse mod , .
Conclusion. Inverses mod prime can be computed via fast exponentiation.
Example. In : (since ).