Modular Arithmetic


§ Modular Arithmetic

Modular Arithmetic

For an integer pp, we can define x(modp)=z(modp)x \pmod{p} = z \pmod{p} to mean p∣(x−z)p \vert (x - z). Often, for any number xx we represent it with the unique remainder x′x' where 0≤x′<p0 \leq x' \lt p. So,

x(modp)≡x′.x \pmod{p} \equiv x'.

We say that x≡y(modm)x \equiv y \pmod{m} to say that the remainder of xx and yy after division by mm is the same, not that xx equals yy.

I use the notation a≡nba \equiv_n b interchangably with the tradtional a≡b(modn)a \equiv b \pmod{n}.

§ Properties