
# 3 Modular Arithmetic

$$\newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}}$$

Modular Arithmetic begins with a modulus "$$n$$", $$n$$ must be a member of  $$\mathbb{Z_+}$$ .

Modulus "$$n$$" divides all the integers into congruent or residue classes. These classes are determined by the remainder after division.

The modulus must always be set in advance; for example n=2, n=5, n=15.

Remainders are always $$0,\cdots, n-1.$$

Thumbnail  picture By Function_color_example_3.gif: Wvbailey.  The original uploader was Wvbailey at English Wikipedia  derivative work: Zerodamage [CC BY-SA 3.0 (https://creativecommons.org/licenses/by-sa/3.0) or GFDL (http://www.gnu.org/copyleft/fdl.html)], via Wikimedia Commons