| FazBrowse Wikipedia Viewer | Main Page | | |
| Viewing: https://en.wikipedia.org/wiki/Modular_arithmetic |
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).
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,
because the difference is 38 and 12.
The definition of congruence also applies to negative values. For example:
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).
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 |