Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Modular arithmetic
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Applications == In pure mathematics, modular arithmetic is one of the foundations of [[number theory]], touching on almost every aspect of its study, and it is also used extensively in [[group theory]], [[ring theory]], [[knot theory]], and [[abstract algebra]]. In applied mathematics, it is used in [[computer algebra]], [[cryptography]], [[computer science]], [[chemistry]] and the [[visual arts|visual]] and [[music]]al arts. A very practical application is to calculate checksums within serial number identifiers. For example, [[International Standard Book Number]] (ISBN) uses modulo 11 (for 10-digit ISBN) or modulo 10 (for 13-digit ISBN) arithmetic for error detection. Likewise, [[International Bank Account Number]]s (IBANs) use modulo 97 arithmetic to spot user input errors in bank account numbers. In chemistry, the last digit of the [[CAS registry number]] (a unique identifying number for each chemical compound) is a [[check digit]], which is calculated by taking the last digit of the first two parts of the CAS registry number times 1, the previous digit times 2, the previous digit times 3 etc., adding all these up and computing the sum modulo 10. In cryptography, modular arithmetic directly underpins [[Public-key cryptography|public key]] systems such as [[RSA (algorithm)|RSA]] and [[Diffie–Hellman key exchange|Diffie–Hellman]], and provides [[finite field]]s which underlie [[elliptic curve]]s, and is used in a variety of [[symmetric key algorithm]]s including [[Advanced Encryption Standard]] (AES), [[International Data Encryption Algorithm]] (IDEA), and [[RC4]]. RSA and Diffie–Hellman use [[modular exponentiation]]. In computer algebra, modular arithmetic is commonly used to limit the size of integer coefficients in intermediate calculations and data. It is used in [[polynomial factorization]], a problem for which all known efficient algorithms use modular arithmetic. It is used by the most efficient implementations of [[polynomial greatest common divisor]], exact [[linear algebra]] and [[Gröbner basis]] algorithms over the integers and the rational numbers. As posted on [[Fidonet]] in the 1980s and archived at [[Rosetta Code]], modular arithmetic was used to disprove [[Euler's sum of powers conjecture]] on a [[Sinclair QL]] [[microcomputer]] using just one-fourth of the integer precision used by a [[CDC 6600]] [[supercomputer]] to disprove it two decades earlier via a [[brute force search]].<ref>{{Cite web|title=Euler's sum of powers conjecture|url=https://rosettacode.org/wiki/Euler%27s_sum_of_powers_conjecture#QL_SuperBASIC|access-date=2020-11-11|website=rosettacode.org|language=en|archive-date=2023-03-26|archive-url=https://web.archive.org/web/20230326025754/https://rosettacode.org/wiki/Euler%27s_sum_of_powers_conjecture#QL_SuperBASIC|url-status=live}}</ref> In computer science, modular arithmetic is often applied in [[bitwise operation]]s and other operations involving fixed-width, cyclic [[data structure]]s. The modulo operation, as implemented in many [[programming language]]s and [[calculator]]s, is an application of modular arithmetic that is often used in this context. The logical operator [[XOR]] sums 2 bits, modulo 2. The use of [[long division]] to turn a fraction into a [[repeating decimal]] in any base b is equivalent to modular multiplication of b modulo the denominator. For example, for decimal, b = 10. In music, arithmetic modulo 12 is used in the consideration of the system of [[twelve-tone equal temperament]], where [[octave]] and [[enharmonic]] equivalency occurs (that is, pitches in a 1:2 or 2:1 ratio are equivalent, and C-[[Sharp (music)|sharp]] is considered the same as D-[[Flat (music)|flat]]). The method of [[casting out nines]] offers a quick check of decimal arithmetic computations performed by hand. It is based on modular arithmetic modulo 9, and specifically on the crucial property that 10 ≡ 1 (mod 9). Arithmetic modulo 7 is used in algorithms that determine the day of the week for a given date. In particular, [[Zeller's congruence]] and the [[Doomsday algorithm]] make heavy use of modulo-7 arithmetic. More generally, modular arithmetic also has application in disciplines such as [[law]] (e.g., [[Apportionment (politics)|apportionment]]), [[economics]] (e.g., [[game theory]]) and other areas of the [[social science]]s, where [[Proportional (fair division)|proportional]] division and allocation of resources plays a central part of the analysis.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)