Modular Inverse

Context: FIT1058_MOC ยท division in ยท exists iff is coprime to ยท found via the Extended Euclidean Algorithm

Quick Revision

  • ๐ŸŽฏ Objective: with โž” division in = multiply by the inverse.
  • ๐Ÿ“ฆ Core Components: exists iff โž” โž” computed by Extended Euclidean Algorithm.
  • โšก Key Constraint: prime modulus โŸน every nonzero element invertible (a field).

๐Ÿ“ Core

1. The Inverse

  • Definition โž” with โ€” the modular reciprocal.
  • Division โž” dividing means multiplying by the inverse.
  • Examples โž” : ; : only invertible.

2. Existence Theorem

  • Iff coprime โž” invertible in .
  • Forward โž” โŸน Bรฉzout โŸน coprime.
  • Backward โž” coprime โŸน โŸน .

3. Computing It

  • Method โž” run Extended Euclidean Algorithm on ; if , inverse .
  • Sets โž” , .

โš–๏ธ Core Decision Matrix

ElementInvertible in ?Reason
never
always (self)
, yesBรฉzout
sharing a factorno

When It Flips: invertibility is governed entirely by Coprimality with ; (Euler Totient Function). The inverse, when it exists, is unique in .

๐Ÿ“Š Exam Execution Trace

Manual Execution Trace

in :

Step / StateInverse?
0 (Init)โ€”โ€”โ€”
113no
232no
351yes

โš ๏ธ Common Mistakes

  • ๐Ÿ’ก never invertible, prime modulus special โž” if prime, every nonzero element is coprime to โŸน all invertible (, a field); composite leaves some elements non-invertible.

๐Ÿง  Active Recall