# 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$$
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}