Integers, primes, divisibility, modular arithmetic, congruences, Diophantine equations, and cryptography

Number theory

Number theory studies integers and the patterns behind divisibility, primes, remainders, equations, and arithmetic structure.

Main objects
Number theory focuses on integers, especially divisibility, prime numbers, congruences, and equations with whole-number solutions.
Prime role
Prime numbers act as building blocks because every positive integer greater than 1 factors uniquely into primes.
Modern reach
Number theory supports cryptography, coding theory, computer algorithms, algebra, and deep questions about infinity and randomness.
The Ulam spiral reveals visual patterns in the distribution of prime numbers across the integers.View image on Wikimedia Commons

What number theory studies

Number theory is the study of whole numbers and their arithmetic structure. It asks why some numbers divide others, how primes are distributed, which equations have integer solutions, and how remainders behave. The subject often starts with simple-looking questions that lead to surprisingly deep mathematics.

Divisibility and factors

Divisibility asks whether one integer fits evenly into another. From that idea come factors, multiples, greatest common divisors, and least common multiples. The Euclidean algorithm, one of the oldest efficient algorithms, uses repeated remainders to find the greatest common divisor of two integers.

Prime numbers

A prime number has exactly two positive divisors: 1 and itself. Primes are central because composite numbers can be broken into prime factors in one and only one way, apart from order. This unique factorization theorem makes primes a kind of arithmetic alphabet for the positive integers.

Modular arithmetic

Modular arithmetic studies remainders after division. On a clock, for example, adding 8 hours to 7 o'clock gives 3 o'clock when hours are counted modulo 12. This simple idea becomes a precise language for congruences, repeating cycles, divisibility tests, calendars, error-checking codes, and cryptographic protocols.

Equations in integers

Diophantine equations ask for integer or rational solutions rather than arbitrary real-number answers. Some have easy patterns, while others are famously difficult. Fermat's Last Theorem, Pell equations, and questions about sums of squares all show how ordinary algebra changes when answers must remain whole numbers.

Patterns and distribution

Number theorists study patterns that are partly orderly and partly elusive. Prime numbers thin out as numbers grow larger, but they do not appear at regular intervals. Results such as the prime number theorem describe broad trends, while open problems ask about finer patterns, gaps, and special families of primes.

From pure math to cryptography

For much of its history, number theory was prized for its elegance rather than immediate use. Modern computing changed that reputation. Public-key cryptography, digital signatures, hashing ideas, primality testing, and error-correcting codes all use number-theoretic structure to make information systems more reliable or secure.

Why it matters

Number theory matters because it turns counting numbers into a laboratory for mathematical structure. It connects ancient arithmetic to modern security, reveals how simple rules create hard problems, and supplies tools that appear across algebra, computation, logic, and data protection.