LOGBOOK

HELP

Quiz Entry - updated: 2026.07.14

How does division (fraction computation) work in modular arithmetic?

Division mod N is multiplication by the inverse: $\frac{x}{y} \mod N \equiv (x \cdot y^{-1}) \mod N$. You NEVER actually divide — you find the inverse and multiply.

Formula: $z \equiv \frac{x}{y} \mod N \equiv (x \cdot y^{-1}) \mod N$

Verification: $x \equiv (z \cdot y) \mod N$

Example: $\frac{5}{7} \mod 9$

Method 1 — Find inverse first:

  • Find $7^{-1} \mod 9$: try $t$ where $t \cdot 7 \equiv 1 \mod 9$ → $t = 4$ (since $4 \cdot 7 = 28 \equiv 1 \mod 9$)
  • Compute $5 \cdot 4 = 20 \equiv 2 \mod 9$

Method 2 — Direct search:

  • Find $z$ where $z \cdot 7 \equiv 5 \mod 9$ → $z = 2$ (since $2 \cdot 7 = 14 \equiv 5 \mod 9$)

Important warnings:

  • Never cancel/simplify fractions in modular arithmetic — cancellation rules from regular math don't apply!
  • Standard calculators (TI-89 etc.) compute $\frac{5}{7} \mod 9$ incorrectly — they don't understand modular fractions
  • Use tools like Wolfram Alpha or Maple for reliable results

Go deeper:

From Quiz: KRYPTOG / Mathematics for Asymmetric Cryptography | Updated: Jul 14, 2026