Difference between revisions of "Modular arithmetic"

m (Topics: Euler's Totient Theorem)
m (altered useful facts section)
Line 3: Line 3:
  
 
== Introductory ==
 
== Introductory ==
=== Operations ===
+
=== Useful Facts ===
  
Consider four integers <math>{a},{b},{c},{d}</math> and a positive integer <math>{m}</math> such that <math>a\equiv b\pmod {m}</math> and <math>c\equiv d\pmod {m}</math>. In modular arithmetic, the following operations are allowed:
+
Consider four integers <math>{a},{b},{c},{d}</math> and a positive integer <math>{m}</math> such that <math>a\equiv b\pmod {m}</math> and <math>c\equiv d\pmod {m}</math>. In modular arithmetic, the following [[identity | identities]] hold:
  
 
* Addition: <math>a+c\equiv b+d\pmod {m}</math>.
 
* Addition: <math>a+c\equiv b+d\pmod {m}</math>.

Revision as of 15:51, 20 June 2006

Modular arithmetic a special type of arithmetic that involves only integers. If two integers ${a},{b}$ leave the same remainder when they are divided by some positive integer ${m}$, we say that ${a}$ and $b$ are congruent modulo ${m}$ or $a\equiv b \pmod {m}$.


Introductory

Useful Facts

Consider four integers ${a},{b},{c},{d}$ and a positive integer ${m}$ such that $a\equiv b\pmod {m}$ and $c\equiv d\pmod {m}$. In modular arithmetic, the following identities hold:

  • Addition: $a+c\equiv b+d\pmod {m}$.
  • Substraction: $a-c\equiv b-d\pmod {m}$.
  • Multiplication: $ac\equiv bd\pmod {m}$.
  • Division: $\frac{a}{e}\equiv \frac{b}{e}\pmod {\frac{m}{\gcd(m,e)}}$, where $e$ is a positive integer that divides ${a}$ and $b$.
  • Exponentiation: $a^e\equiv b^e\pmod {m}$ where $e$ is a positive integer.

Examples

  • ${7}\equiv {1} \pmod {2}$
  • $49^2\equiv 7^4\equiv (1)^4\equiv 1 \pmod {6}$
  • $7a\equiv 14\pmod {49}\implies a\equiv 2\pmod {7}$

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.


Intermediate

Topics

See also