Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I'm trying to wrap my head around this:

$a \equiv b^{-1}\pmod{y}$

$x \equiv c^{-1} \pmod{y}$

I know all values but $x$ and $y$. Is it possible to solve this problem for $x$? Can anyone point out a good resource on this kind of problems?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

If $b,c$ have an inverse in $\pmod y$ then is valid :$$ ab\equiv 1 \pmod y $$ and $$ xc\equiv 1 \pmod y $$ From this you get: $$ ab-1 = k_{1}y $$ $$ xc-1 = k_{2}y $$

(For some $k_{1}$ and $k_{2}$ integers )

So you can find $x$ and $y$ from this ecuations system.


For example,

If $y=5$, the elements with inverse are: $2,3$, also $b=2$ and $b^{-1}=3$.

Know that (with $a=8$ ):

$ 8 \equiv 3 \pmod 5 $, is say , $ a \equiv b^{-1} \pmod y $,

Note that also:

$ 16 =8 \cdot 2\equiv 1 \pmod 5 $, is say , $ ab \equiv 1 \pmod y $

share|improve this answer
what are $k_1$ and $k_2$? –  Chris Nov 28 '10 at 18:49
Yocks: Just a LaTeX tip: for the congruence relation, it's better to use \pmod{x}, which takes an argument and automatically produces (mod x). –  Arturo Magidin Nov 28 '10 at 19:11
@Chris Remember that: $$a\equiv b \mod y \Leftrightarrow y\setminus(a-b) $$ –  Bryan Yocks Nov 28 '10 at 19:14
@Arturo : Thanks, I will use this –  Bryan Yocks Nov 28 '10 at 19:18

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.