Lets suppose we have two integers $a$ and $b$ such that $b\mid a$ and an integer $p$ that is not co-prime with $b$. In that case, $b^{-1}$ does not exist in $\mathbb{Z_p}$, but there is an integer number, let's call it $c$, that satisfy the relation $\frac{a}{b}=c$. The question is that could we consider that $c \mod p$ is the answer to the calculation $\frac{a}{b}\pmod p$?

Let's show a concrete example, $\frac{7!}{5!}\pmod 5$, $5!$ has no inverse, but $\frac{7!}{5!}=42$ and $42 \bmod 5 = 2$, so could we say that $2$ is the answer to the question or an answer does not exist?


  • $\begingroup$ "$b^{-1}$ does not exist"... which ring are you looking at? $\mathbb Z_p$? $\endgroup$
    – 5xum
    Commented Apr 29, 2019 at 9:23
  • $\begingroup$ Yes, sorry for not specifying. I will edit $\endgroup$ Commented Apr 29, 2019 at 9:24
  • $\begingroup$ The quotient is undeterminate, as $0\times5!=1\times5!=2\times5!=3\times5!=4\times5!=7!$ $\endgroup$
    – user65203
    Commented Apr 29, 2019 at 9:30

1 Answer 1


There are two distinct things happening here.

The fraction $\frac{7!}{5!}$ does not exist in the ring $\Bbb Z_5$. However, the integer $\frac{7!}{5!}$ does exist, and through the modulo map is sent to $2$ in $\Bbb Z_5$.

There is really no contradiction here. There is only an abuse of notation as a fraction can both represent direct modular division, or it can represent an integer which is then sent to the modular ring. Which fractions are valid will depend on the interpretation (for instance, $\frac{7!}{5!}$ is invalid in the first interpretation and valid in the second, while something like $\frac32$ is valid in the first and invalid in the second). A saving grace, however, is that when both interpretations agree that the fraction exists then they do agree on its value.

  • $\begingroup$ Thanks you, it makes a lot more sense now $\endgroup$ Commented Apr 29, 2019 at 9:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .