[Math] Multiplicative Inverse

elementary-number-theorymodular arithmetic

The book I'm reading defines the multiplicative inverse of $a\pmod N$ as $x$, such that $ax \equiv 1\pmod N$. It then states not all numbers have a multiplicative inverse, such as $2 \pmod 6$. It states that for a multiplicative inverse to exist, $N$ and $a$ have to be co-prime.

But wouldn't the multiplicative inverse just be the reciprocal? And since every number has a reciprocal, wouldn't every number have a multiplicative inverse?

I.e It states $2 \pmod 6$ does not have a multiplicative inverse. But what about $\frac{1}{2}\pmod 6$? Doesn't this qualify as the multiplicative inverse since $\frac{1}{2}\pmod 6 \times 2\pmod 6 = 1 \pmod 6$?

What am I misunderstanding here?

Best Answer

There are two problems, one each depending on what $\frac{1}{2}$ means.

  1. We can define $\frac{1}{a}$ to be "the [unique] number such that $a\times\frac{1}{a}=1$, if it exists" in whatever system we are working on (that is, "number" here would mean "number modulo $N$"). But then you cannot assume that such a thing as $\frac{1}{2}\pmod{N}$ exists in the first place. You must prove it exists.

    Note that they don't always exist: for example, $2$ has no multiplicative inverse in the integers either.

    In this situation, it is true that $\frac{1}{2}\pmod{6}$ is a multiplicative inverse of $2\pmod{6}$, if it exists. But in fact, no such thing exists. Just like an even prime number greater than $2$ would be congruent to $0$ modulo $2$ if it existed, but no such thing exists.

  2. If by $\frac{1}{2}$ you mean the rational number $\frac{1}{2}$, then $\frac{1}{2}\pmod{6}$ makes no sense in the integers modulo $6$: we only allow integers! That is, when we write things like $a\pmod{N}$, we are implicitly asserting that $a$ is an integer. We cannot do that with $\frac{1}{2}$.

    To see that there cannot exist an integer $x$ such that $2x\equiv 1\pmod{6}$, note that $2x-1$ is always odd, so it is never a multiple of $6$; hence, $2x$ can never be congruent to $1$ modulo $6$, no matter what integer $x$ is.