# Rule about solving congruences - modular arithmetic.

When solving $ax \equiv b \mod c$, is it okay to replace $a$ with any $m$ where $m \equiv a$?

-
Yes, you can replace $a$ by any $a'$ such that $a'\equiv a\pmod{c}$. – André Nicolas Jan 29 '13 at 23:34
Note that "$m\equiv a$" is meaningless --- there must be a modulus. If you meant $m\equiv a\pmod c$, then you're OK. – Gerry Myerson Jan 30 '13 at 0:09
Note that if an answer is helpful, you may select one answer per question to "accept": you can do this by clicking on the "greyed-out" checkmark to the left of the answer you'd like to accept. Soon, after you've reached 30 reputation points, you can upvote as many answers as you'd like to any given question. – amWhy Jan 30 '13 at 3:48

If you think about what $ax \equiv b \pmod c$ means, i.e. there exists a $q \in \Bbb{Z}$ such that $ax = b + qc$ so if we have $a = m + qc$ Then substitution gives $$(m+qc)x = b + qc$$ and $$mx = b + (q-qx)c$$ So $$mx \equiv b \pmod c$$