← Back

Modulo Multiplicative Inverse

x such that (a*x) % m = 1 when gcd(a,m)=1.

mathmodularinverseUpdated 2025-09-01

Methods

  • Extended Euclid (general)
  • Fermat a^{m-2} % m when m prime

Applications

  • Division under modulo