# Invention of modular inverse

A question arose in my mind about modular inverse. We know that there is no division operator in modular arithmetic, so we figure out the modular inverse of the denominator. For example, if we want to find out the value of $\frac ab \pmod{M}$, at first we determine the modular inverse of $b$ and then multiply it by$a \pmod{M}$ .

My question is that who first invented the above the techniques, and what inspired him/her?

• Is the question specifically about the history of fractional modular arithmetic (i.e. explicit use of fractions) or, more generally, about the history of modular inverses? – Gone Feb 20 '15 at 1:53

The Euclidean algorithm is in effect the division operator in modular arithmetic, giving the value of $\frac{a}{b} \pmod{M}$ when $b$ is relatively prime to $M$, and every other case reduces to that one. It suffices to find each $\frac{1}{b} \pmod{M}$. Then, as Euclid shows, you can find a sum $cb+dM=1$. And that amounts to $c=\frac{1}{b} \pmod{M}$ though of course Euclid did not think of this as modular arithmetic. He just thought of it as the arithmetic of greatest common divisors.