Jump to content

Modular arithmetic

From Simple English Wikipedia, the free encyclopedia
Revision as of 00:29, 31 October 2011 by PiRSquared17 (talk | changes) (Undid revision 3135511 by PiRSquared17 (talk) merged page has iws.. ok)
Time-keeping on a clock gives an example of modular arithmetic.

Modular arithmetic (sometimes also called Modulo arithmetic) is a way of arithmetic calculation with integers. Numbers wrap around once they reach a certain value (called modulus). The first person to talk about modular arithmetic was Carl Friedrich Gauß

A well-known example is the clock. Analog clocks go from 0 to 11, then they wrap, and again go from 0 to 11. This is an arithmetic modulo 12.

Modulo is sometimes referred to as the remainder of the integer division of two integers. For example, 19 modulo 12 is the remainder when 19 is subtracted by 12. The answer to that question is 7, because 12+7=19.

Examples

1 modulo 12 = 1

10 modulo 12 = 10

12 modulo 12 = 0

15 modulo 12 = 3

22 modulo 12 = 10

34 modulo 12 = 10

Congruence

Modular arithmetic can be extended to have the notion of congruence. Mathematically, if two numbers a and b are congruent modulo n, if they have the same remainder, when they are divided by n. As an example, the numbers 22 and 34 are congruent (modulo 12), because if they are divided by 12, they both have a remainder of 10.

Uses

The notion of modular arithmetic is useful in many fields of science, notably cryptography, computer science, chemistry, music.