Modular arithmetic: Difference between revisions

Content deleted Content added
No edit summary
Tag: Reverted
m Reverted 1 edit by 110.174.140.236 (talk) to last revision by JBW
Line 5:
In [[mathematics]], '''modular arithmetic''' is a system of [[arithmetic]] for [[integer]]s, where numbers "wrap around" when reaching a certain value, called the '''modulus'''. The modern approach to modular arithmetic was developed by [[Carl Friedrich Gauss]] in his book ''[[Disquisitiones Arithmeticae]]'', published in 1801.
 
A familiar use of modular arithmetic is in the [[12-hour clock]], in which the day is divided into two 12-hour periods. If the time is 7:00 now, then 8 hours later it will be 3:00. Simple addition would result in {{nowrap|7 + 8 {{=}} 15}}, but 15:00 reads as 3:00 on the clock faface because clocks "wrap around" every 12 hours and the hour number starts again at zero when it reaches 12. We say that 15 is ''congruent'' to 3 modulo 12, written 15 ≡ 3 (mod 12), so that 7 + 8 ≡ 3 (mod 12). Similarly, 8:00 represents a period of 8 hours, and twice this would give 16:00, which reads as 4:00 on the clock face, written as 2 × 8 ≡ 4 (mod 12).
 
== Congruence ==
Given an [[integer]] {{math|''m'' ≥ 1}}, called a '''modulus''', two integers {{mvar|a}} and {{mvar|b}} are said to be '''congruent''' modulo {{mvar|m}}, if {{mvar|m}} is a [[divisor]] of their difference; that is, if there is an integer {{math|''k''}} such that
: {{math|1=''a'' − ''b'' = ''k m''}}.
Congruence modulo {{mvar|m}} is a [[congruence relation]], meaning that it is an [[equivalence relation]] that is compatible with the operations of [[addition]], [[subtraction]], and [[multiplication]]. Congruence modulo {{mvar|m}} is denoted