## Identification numbers with check digit algorithms

### Still Modular Arithmetic

Usual arithmetic deals with natural numbers $$1$$, $$2$$, $$3$$, $$4$$, $$5$$, ... and integers ..., $$-4, -3, -2, -1, 0, 1, 2, 3, 4,$$... What about Modular Arithmetic? Which numbers are considered in this arithmetic?

Take the example of $20=8\,(\mbox{mod }12).$

In this case number $$20$$ is identified with number $$8$$, that is, numbers $$20$$ and $$8$$ é are equivalent in Modular Arithmetic modulus $$12$$. There is an infinity of other numbers equivalent to $$8$$: $$32$$, $$44$$, $$56$$, ... The set $\{8,20,32,44,56,68,...\}$ is called the equivalence class of $$8$$ modulus $$12$$ and it is represented by its smallest member, that is, $$8$$. Similarly, there are $$11$$ more equivalence classes represented by numbers $$0, 1, 2, 3, 4, 5, 6, 7, 9, 10, 11$$.

These are the numbers in modulus 12 arithmetic: $$0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10$$ and $$11$$.

Generalizing to any number $$n$$, the numbers in modulus $$n$$ arithmetic are $$0, 1, 2, ..., n-2$$ and $$n-1$$.

Since this type of arithmetic deals only with a finite number of "numbers", Modular arithmetic is alsom said to be a finite arithmetic.

Now that we have our numbers, the next step is to study the operations that can be carried out with these numbers, in particular, addition and multiplication.