I got two questions that I'm wondering, one main question and one "bonus" question I guess
- what is the general method to solve congruence equations like $ax \equiv b \pmod m$?
Take for example $3x\equiv 2 \pmod 5$ how would I go about solving this?
I was able to solve it using trial and error and found the answer to be $4$, but I'm looking for a better and faster way to solve problems like these for larger $m$'s..
Also I'm wondering sometimes you can solve these with just the inverse of $a$, but when does that apply? only when $b=1$ and $a$ and $m$ are coprime? example $9x\equiv 1 \pmod 14$ for instance?
- can someone please show me how I can find the modular inverse of $9$ mod $14$? I'm familiar with the method used and I'm able to find the inverse in other examples, but I'm not sure why this one is causing me so much trouble, answer should be $11$ I think.