Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Let n is divisible by m, and we have to find $V=\frac{n}{m}(mod)p$...

In case if we know the value of $n(mod)p$,$m(mod)p$ not n,m how can we find $V$ ?????

I know we can find answer by evaluating this $(n(mod)p * m^{p-2}(mod)p)(mod)p$.but in this we should have value of m.

I also want to know how inverse modulo works.

for example in case $\frac{63}{9}(mod)5$

3=63(mod)5 , 4=9(mod)5

answer will be $(3(mod)5*4^{5-2}(mod)5)(mod)5$ = 12(mod) 5 = 2

share|cite|improve this question
Are you asking how to evaluate $\ m^{p-2}\pmod p,\ $ or are you asking for other ways to calculate modular inverses? – Math Gems Mar 28 '13 at 18:56
I want to know how $\frac{63}{9}(mod)5$ is equal to $(3(mod)5 * 4^{5-2} (mod) 5))(mod)5$ – user69910 Mar 29 '13 at 3:52

$$63=3\pmod5\;,\;\;9=4=-1\pmod 5\Longrightarrow \frac{63}{9}=$$

$$3\cdot 4^{-1}\pmod 5=3\cdot4=2\pmod 5$$

Or directly:

$$\frac{63}{9}=7\Longrightarrow \frac{63}{9}=7=2\pmod 5$$

Note, btw, that $\,4^{5-2}=4^3=(-1)^3=-1=4\pmod 4\,$ ...

share|cite|improve this answer
Nicely Done, Don. – Babak S. Mar 30 '13 at 10:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.