# Is modular arithmetic defined for all rational numbers (with denominators coprime to modulus)?

In the expression $\frac{1}{b}\pmod m$, where $(b,m)=1$, is $\frac{1}{b}$:

a) a rational number (and so rational numbers are defined in modulo arithmetic using multiplicative inverses)?

b) just created notation for $($the inverse of $b)\pmod m$ that looks like division just to confuse us (and is used because of similarities between division and division $\pmod m$)? (same for $b^{−1}$)

Is it a) or b)?

Here it says it is a).

Bill Dubuque from M.SE seemingly claims it is b). So does a comment here, also this blog.

Edit: now that I thought about it, either

1) the notation $\frac{a}{b}$

2) or the definition $a\equiv b\pmod {m}\iff m\mid a-b$

is misleading. 1) seems a lot more likely, since I’m not sure how the $\bmod$ function could be defined otherwise.

I’m not sure if there is a general consensus, but I would like to add another interpretation different from the ones already mentioned.

I tend to say it is

• not a number, since we want it to be ‘an inverse of $b$ modulo $m$‘, without specifying which inverse. I mean, why should an inverse of $b$ modulo $m$ be defined as $\frac1b$ and not $\frac{1+m}b$ or $\frac1{b+m}$?
• not a congruence class modulo $m$. This is because in high school the relation ‘$\equiv\pmod m$‘ is usually introduced without even mentioning ring theory, we simply define it as some equivalence relation on integers: $a\equiv b\pmod m$ and not $(a+m\mathbb{Z})\equiv(b+m\mathbb{Z})\pmod m$.

If not a number nor a congruence class, then what should it be?

I’d say it isn’t a thing, it’s just a notation used in congruences representing an unspecified inverse of $b$ modulo $m$. I.e, $\frac ab\equiv c\pmod m$ is a notation meaning as much as $a\equiv bc\pmod m$ (provided $\gcd(b,m)=1$), but $\frac ab$ has no meaning to me when pulled out the congruence.
Note that this point of view still conserves the expected properties suggested by the rational numbers, such as $b\cdot\frac ab\equiv a\pmod m$ and $\frac ab+\frac cd\equiv\frac{ad+bc}{bd}\pmod m$ (provided the inverses exist).