Does a = b mod m imply an = bn mod m?
This wiki is incomplete.
This is part of a series on common misconceptions.
If \( a \equiv b \pmod{m}\), is it also true that \( na \equiv nb \pmod{m} \)?
Why some people say it's true: We can simply multiply by \(n\) on the LHS and RHS to get that \( na \equiv nb \pmod{m}. \)
Why some people say it's false: It can't be that simple. Modular arithmetic is so confusing.
The statement is \( \color{green}{\textbf{True}}\).
Proof:
Consider the modular relationship \(\displaystyle a \equiv b \pmod{m}. \)
It is equivalent to saying that \( m | ( a - b) \) or \( \displaystyle a - b = mk \) for some integer k.Multiplying both sides of the equation by \(n,\) we obtain \( \displaystyle n(a - b) = m(nk) \) and thus \(na - nb = m(nk) \).
Since \(n\) and \(k\) are both integers, their product is also an integer. Therefore, \(na - nb\) is a multiple of \(m.\) In other words, \( m | (na - nb) \).
Hence it is also true that \( na \equiv nb \pmod{m}. \) \(_\square\)
Rebuttal: Shouldn't it be \( na \equiv nb \pmod{nm} \)?
Reply: Yes, that is also true.
See Also
For better understanding, visit modular arithmetic.