# Modular arithmetic

(Redirected from Module arithmetic)
Time-keeping on a clock gives an example of modular arithmetic.

Modular arithmetic, sometimes also called clock arithmetic, is a way of doing arithmetic with integers. Much like hours on a clock, which repeat every twelve hours, once the numbers reach a certain value, called the modulus, they go back to zero.

People talked about modular arithmetic in many ancient cultures. For instance, the Chinese remainder theorem is many centuries old. The modern notation and exact definition of modular arithmetic were first described by Carl Friedrich Gauss.[1]

## Congruence

Modular arithmetic can be used to show the idea of congruence. Two integers, a and b, are congruent modulo n if they have the same remainder when both are divided by the positive integer n. Congruence can be written this way:

$a \equiv b \pmod n\,$

The number n is called the modulus. Another definition of congruence, that means the same thing but is sometimes more useful, is that the two integers are congruent modulo n if the difference (a - b) is an integer multiple of n. That is, if n is a factor of (a - b), then a and b are congruent mod n.

For example:

$32 \equiv 11 \pmod 7,\,$

The remainder when 32 is divided by 7 is 4, and the remainder when 11 is divided by 7 is also 4. This tell us they're congruent, mod 7.

We can use this example it with the other definition too. The difference, (a - b), is 32 - 11 = 21. This shows the two numbers are congruent because 21 = 3 * 7, and 7 is a factor of 21.

## Uses

Modular arithmetic is useful in many fields, such as cryptography, computer science, and music. It is often used in calculating checksums and check digits.

## References

1. Richard Taylor (2012). "Modular Arithmetic: Driven by Inherent Beauty and Human Curiosity". Institute for Advanced Study. Retrieved 7 March 2013.
This short article about mathematics can be made longer. You can help Wikipedia by .
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 2, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9278938174247742, "perplexity_flag": "middle"}