Difference between revisions of "Modular arithmetic"
ComplexZeta (talk | contribs) m |
|||
Line 1: | Line 1: | ||
'''Modular arithmetic''' is a special type of arithmetic that involves only [[integers]]. Given integers <math>a</math>, <math>b</math>, and <math>n</math>, with <math>n > 0</math>, we say that <math>a</math> is ''congruent to'' <math>b</math> ''modulo'' <math>n</math>, or <math>a \equiv b</math> (mod <math>n</math>), if the difference <math>{a - b}</math> is divisible by <math>n</math>. | '''Modular arithmetic''' is a special type of arithmetic that involves only [[integers]]. Given integers <math>a</math>, <math>b</math>, and <math>n</math>, with <math>n > 0</math>, we say that <math>a</math> is ''congruent to'' <math>b</math> ''modulo'' <math>n</math>, or <math>a \equiv b</math> (mod <math>n</math>), if the difference <math>{a - b}</math> is divisible by <math>n</math>. | ||
− | For a given positive integer <math>n</math>, the relation <math>a \equiv b</math> (mod <math>n</math>) is an [[equivalence relation]] on the set of integers. This relation gives rise to an algebraic structure called '''the integers modulo <math>n</math>''' (usually known as "the integers mod <math>n</math>," or <math>\mathbb{Z}_n</math> for short). This structure gives us a useful tool for solving a wide range of number-theoretic problems, including finding solutions to [[Diophantine equation]] | + | For a given positive integer <math>n</math>, the relation <math>a \equiv b</math> (mod <math>n</math>) is an [[equivalence relation]] on the set of integers. This relation gives rise to an algebraic structure called '''the integers modulo <math>n</math>''' (usually known as "the integers mod <math>n</math>," or <math>\mathbb{Z}_n</math> for short). This structure gives us a useful tool for solving a wide range of number-theoretic problems, including finding solutions to [[Diophantine equation|Diophantine equations]], testing whether certain large numbers are prime, and even some problems in cryptology. |
Revision as of 20:55, 23 June 2006
Modular arithmetic is a special type of arithmetic that involves only integers. Given integers , , and , with , we say that is congruent to modulo , or (mod ), if the difference is divisible by .
For a given positive integer , the relation (mod ) is an equivalence relation on the set of integers. This relation gives rise to an algebraic structure called the integers modulo (usually known as "the integers mod ," or for short). This structure gives us a useful tool for solving a wide range of number-theoretic problems, including finding solutions to Diophantine equations, testing whether certain large numbers are prime, and even some problems in cryptology.
Contents
Introductory
Useful Facts
Consider four integers and a positive integer such that and . In modular arithmetic, the following identities hold:
- Addition: .
- Substraction: .
- Multiplication: .
- Division: , where is a positive integer that divides and .
- Exponentiation: where is a positive integer.
Examples
Applications
Modular arithmetic is an extremely useful tool in mathematics competitions. It enables us to easily solve Linear Diophantine equations, and it often helps with other Diophantine equations as well.