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

Alright, I can go through and solve equations that do not have the "$+ c$" involved, i.e.: $ax \equiv b \mod{n}$. However, I do not know what to do when a "$+ c$" is incorporated. How does that $c$ affect the final answer / the process?

My best guess would be when pulling back to integers, without "$+ c$" you would get: $ax + ny = b$.

So do I simply need to subtract the c and move it to the right hand side? $ax + ny = b - c$.

Thanks in advance!


share|cite|improve this question
up vote 3 down vote accepted

Just subtract it to begin with: $$ax\equiv d\pmod n$$ where $d=b-c$, reducing it to a problem already solved.

share|cite|improve this answer

Yes, just as for integer equations, one may subtract an integer from both sides of a congruence, i.e.

$\begin{array}{rrl} &\rm a+b &\equiv&\rm c\qquad\quad\ \rm(mod\ n) \\ \qquad\qquad\qquad\iff &\rm\ \ a+b &=&\rm c\quad\ \ \ +\ \ \ \quad k\ n &\rm for\quad k\in\mathbb Z \\ \iff &\rm\ \ a &=&\rm c\!-\!b\ \ \ +\ \ \ k\ n &\rm for\quad k\in\mathbb Z \\ \iff &\rm\ \ a &\equiv&\rm c\!-\!b\:\ \ \ \rm (mod\ n) \end{array}$

share|cite|improve this answer

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.