FazBrowse Wikipedia Viewer | Main Page |
Search Wikipedia:
|
Viewing: https://en.wikipedia.org/wiki/Modular_arithmetic

Modular arithmetic

Left: Analog clock reading 9 oTime-keeping on this clock uses arithmetic modulo 12. Adding 4 hours to 9 o'clock gives 1 o'clock, since 13 is congruent to 1 modulo 12.

In mathematics, modular arithmetic is a system of arithmetic operations for integers, differing from the usual ones in that numbers "wrap around" when reaching or exceeding a certain value, called the modulus. The modern approach to number theory using modular arithmetic was developed by Carl Friedrich Gauss in his book Disquisitiones Arithmeticae, published in 1801.

Modular arithmetic modulo m is performed after each operation, only once at the end of the computation, or at the end of the computation and after some intermediate results7 + 8 = 15, but 15 reads as 3 on the clock face. This is because the hour hand makes one rotation every 12 hours and the hour number starts over when the hour hand passes 12. We say that 15 is congruent to 3 modulo 12, and we write 15 ≡ 3 (mod 12), so 7 + 8 ≡ 3 (mod 12).

Similarly, if one waits 8 hours and then 8 more hours (thus 16 hours in total), the clock will show the same time change as if one waited 4 hours. This is reflected by the identity 2 × 8 ≡ 4 (mod 12). After a wait of exactly 12 hours, the hour hand will be right where it started, so 12 acts as 0; one writes 12 ≡ 0 (mod 12).

Congruence

edit

Given an integer b are said to be congruent modulo m; that is, if there is an integer m is a congruence relation, meaning that it is an equivalence relation compatible with addition, subtraction, and multiplication. Congruence modulo (mod m) applies to the entire equation, not just to the right-hand side (here, (b mod m) (without parentheses immediately before "mod"), which refers to the remainder of b mod m denotes the unique integer r ≡ b (mod m). So, the relation amodm=bmodm.

The congruence relation b here need not be the remainder in the division of a ≡ b (mod m) asserts that m. That is,

0 ≤ r < m is the common remainder. We recover the previous relation (m is defined by the divisibility by −m exactly if it is divisible by 38 ≡ 14 (mod 12)

because the difference is 38 and 12.

The definition of congruence also applies to negative values. For example:

a ≡ b (mod m) if and only if b ≡ c (mod m), then a2 ≡ b2 (mod m), or if k (compatibility with translation)
  • k a ≡ k b (mod k m) for any integer a1 − a2 ≡ b1 − b2 (mod m) (compatibility with subtraction)
  • 1</sub> ''a''<sub>2</sub> ≡ ''b''<sub>1</sub> ''b''<sub>2</sub> (mod ''m'')"}},"i":0}}]}'/>a1 a2 ≡ b1 b2 (mod m) (compatibility with multiplication)
  • ''k''</sup> ≡ ''b''<sup>''k''</sup> (mod ''m'')"}},"i":0}}]}'/>a ≡ b (mod m) for any non-negative integer p(x) with integer coefficients (compatibility with polynomial evaluation)
  • If c ≡ d (mod φ(m)), where a is coprime with a ≡ b (mod m) and k is any integer, then k is coprime with k a ≡ k b (mod k m) and b divides a such that −1</sup> ≡ 1 (mod ''m'')"}},"i":0}}]}'/>aa ≡ 1 (mod m) if and only if a is called a modular multiplicative inverse of a ≡ b (mod m) and −1</sup>"}},"i":0}}]}'/>a exists, then −1</sup> ≡ ''b''<sup>−1</sup> (mod ''m'')"}},"i":0}}]}'/>a ≡ b (mod m) (compatibility with multiplicative inverse, and, if ax ≡ b (mod m) and x ≡ ab (mod m).

    The multiplicative inverse −1</sup> (mod ''m'')"}},"i":0}}]}'/>x ≡ a (mod m) may be efficiently computed by solving Bézout's equation y, by using the Extended Euclidean algorithm.

    In particular, if p for every a that is not congruent to zero modulo a, then m are coprime, then p is prime, then −1</sup> ≡ ''a''{{i sup|''p''−2}} (mod ''p'')"}},"i":0}}]}'/>a ≡ a (mod p) is the multiplicative inverse of m are coprime, then x ≡ a (mod m).

  • Another simple consequence is that if ≡ ''k''<sup>''b''</sup> (mod ''m'')"}},"i":0}}]}'/>k ≡ k (mod m) provided a, n, there exists a unique x ≡ b (mod n). In fact, ''n''</sub><sup>−1</sup> ''m'' + ''a n''<sub>''m''</sub><sup>−1</sup> ''n'' (mod ''mn'')"}},"i":0}}]}'/>x ≡ b mn m + a nm n (mod mn) where ''n''</sub><sup>−1</sup>"}},"i":0}}]}'/>mn is the inverse of nm is the inverse of p is not a divisor of 0</sub>"}},"i":0}}]}'/>a0, then the congruence m: A number a coprime to g ≡ a (mod m). A primitive root modulo 2, 4, p or ''k''</sup>"}},"i":0}}]}'/> 2p, where m exists, then there are exactly x such that 2</sup> ≡ ''a'' (mod ''m'')"}},"i":0}}]}'/>x ≡ a (mod m). Euler's criterion asserts that, if p, then a ≡ 1 (mod p).
  • Congruence classes

    edit

    The congruence relation is an equivalence relation. The equivalence class modulo a + k m, where m, and may be denoted [a] when the modulus 0,...,|m|−1. Thus, these r such that a modulo a ≡ b (mod m), and this explains why "m may be represented by any one of its members, although we usually represent each residue class by the smallest nonnegative integer which belongs to that class (since this is the proper remainder which results from division). Any two members of different residue classes modulo m.

    The set of integers m integers, no two of which are congruent modulo m. For example, the least residue system modulo 4 include:

    Some sets that are not complete residue systems modulo 4 are:


    View original on Wikipedia | Back | FazBrowse Home