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

When I typed in

6^-1 mod 49 in Wolfram|Alpha, it gave me an answer of 41. Link here

If I type the same thing as (1/6) mod 49 , I don't see 41 any more. Why is this happening ?Link here

A Related question :

How is the answer to 6^-1 mod 49 , 41 in the first place ?

A small change in the above question :

If the question is find , 9^-2 mod 49, what are the steps to find the answer ?

share|cite|improve this question
$6\times41=246=245+1=(5)(49)+1\equiv1\pmod{49}$ – Gerry Myerson Jul 20 '12 at 9:23
You can use the extended Euclidean algorithm to find the modular inverse of $81$, $\bmod 49$. See this. – J. M. Jul 20 '12 at 9:35

The $41$ is because $6\times 41=246=1\bmod 49$.

I assume that what's happening is that if you type $(1/6)$ instead, it assumes that you're happy to work with rational numbers rather than just integers and gives you back $1/6$.

share|cite|improve this answer
In short: Mod[1/6, 49] and PowerMod[6, -1, 49] are two different things. – J. M. Jul 20 '12 at 9:25

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.