Problem
NT-B1-M07-P018 Inverse Through a Power
#18
★★★☆☆ Level 3 of 5
Let \(p\) be prime and \(p\nmid a\). Prove that \(a^{p-2}\) is the inverse of \(a\) modulo \(p\).
Multiply \(a^{p-2}\) by \(a\).
By Fermat, \(a^{p-1}\equiv1\pmod p\). But \(a\cdot a^{p-2}=a^{p-1}\). Therefore \(a\cdot a^{p-2}\equiv1\pmod p\), so \(a^{p-2}\) is the inverse.
This is important for later linear congruences.