Study Atlas › Mathematics › Number theory

Modular arithmetic and Fermat's little theorem

Arithmetic of remainders; for prime p and a not divisible by p, a^(p–1) ≡ 1 (mod p).

Edited by Alex C, EduAlx · Sources cited below

Explanation

Gauss formalised congruences in Disquisitiones Arithmeticae (1801). Euler generalised Fermat's theorem: a^φ(n) ≡ 1 (mod n). The Chinese remainder theorem solves systems of congruences. These ideas drive cryptography, hashing and check digits such as ISBN.

Example

2^10 = 1024 ≡ 1 (mod 11).

How it works, step by step

  1. Reduce numbers modulo n
  2. Add and multiply, reducing each time
  3. Use Euler's theorem for large powers
  4. Solve linear congruences with inverses

Open the interactive page with diagrams →

Modular arithmetic and Fermat's little theorem in exams

Modular arithmetic and Fermat's little theorem is part of Mathematics, which is tested in JEE Main, JEE Advanced, CUET-UG, CAT, SAT, ACT, GRE, GMAT. Practise it in the exam format:

People behind it

References

  1. C. F. Gauss, Disquisitiones Arithmeticae, Leipzig, 1801.

Textbooks

Related topics

Fermat's Last TheoremPrime numbers and the fundamental theorem of arithmeticRamanujan's contributions (partitions, infinite series)Cryptography mathematics: elliptic curvesNumber theory: Diophantine equations and Pell's equationRiemann hypothesisStatistical hypothesis testingGroup theoryNormal distribution and the central limit theoremSet theory and Cantor's infinities