Chinese remainder theorem Created 2026-09-24 Updated 2026-10-13
The Chinese remainder theorem says that remainders modulo pairwise coprime positive integers can be specified independently. For pairwise coprime and , every prescribed list determines one congruence class modulo satisfying for all . It determines a class, rather than one unrestricted integer: adding a multiple of preserves every remainder.
For example, combine and . Write from the first condition. The second becomes . Since three has modular inverse two modulo five, , giving . The integers , and all work. The fifteen possibilities modulo fifteen correspond to the fifteen pairs in a three-by-five grid.
The theorem also preserves arithmetic: reducing an addition or a multiplication modulo each gives the same tuple as performing that operation on the corresponding congruence classes. In the language of quotient rings, reduction is a ring isomorphismOne large residue is thus an exact encoding of several smaller residues. This is useful for splitting arithmetic into smaller calculations and then reconstructing the result; MIT's modular arithmetic notes develop both the reconstruction and the product representation. [ref]
https://ocw.mit.edu/courses/18-200-principles-of-discrete-applied-mathematics-spring-2024/mit18_200_s24_lec15.pdf. Moitra, MIT 18.200, Lecture 15, section 4, Chinese remainder theorem
For a concrete multiplication, corresponds to and to modulo . Their componentwise product is , which reconstructs to , agreeing with .A constructive formula explains the independence. For , put and choose with , using a modular multiplicative inverse. Then is one modulo and zero modulo every other . Thereforehas the desired remainders. A modulus equal to one imposes no restriction and can be omitted. Uniqueness follows because a difference divisible by every is divisible by their product when they are pairwise coprime. This short construction gives a reusable algorithm as well as an existence statement.
The coprime hypothesis explains why every cell in the left grid is attainable. With integer moduli six and eight, a pair must agree modulo their greatest common divisor, two. There are twenty-four compatible pairs, rather than forty-eight arbitrary pairs; each corresponds to a class modulo the least common multiple, twenty-four. The Chinese remainder theorem for noncoprime moduli states the resulting compatibility rule.
Least common multiple Created 2026-09-24 Updated 2026-10-14
For positive integers , their least common multiple is the smallest positive integer that is an integer multiple of both. Write it as . A positive common integer multiple always exists, since is one, but it can be larger than necessary.
For example, the positive integer multiples of begin , while those of begin . Their first positive coincidence is , so . Both also divide zero, but the word positive excludes zero from this minimum.
Suppose two events happen every twelve and eighteen days, and both happen at day . Their next meeting is at day , after three twelve-day intervals and two eighteen-day intervals. Through day , their common event times are .
The prime factorization explains why this coincidence occurs. For the integers and ,A common integer multiple must contain at least the prime valuations required by each input. Taking the larger prime valuation at each prime number meets both requirements with no extra factors. The greatest common divisor uses the smaller prime valuations instead. This is the same coordinate comparison developed under prime factorization, applied in opposite directions.
For 12 and 18, smaller prime valuations give greatest common divisor 6 and larger ones give least common multiple 36
. Bars show the exponents of the prime numbers two and three in , , and . The table makes the minimum and maximum in each column explicit. Details.For any positive integers , the prime valuations giveThe proof outline is one observation at each prime number: . Hence the two sides have identical prime factorizations. Numerically, . This also gives a calculation using the Euclidean algorithm for the greatest common divisor, without first finding the prime factors of both inputs.
Every positive common integer multiple is an integer multiple of the least common multiple, because its prime valuations must be at least the larger input prime valuations. Including negatives and zero, the common integer multiples of and are exactly for integers . For more than two positive integers, the same definition and rule of taking the largest prime valuations apply; one may also combine inputs successively. For example, .
For nonzero signed integers, take absolute values: . We extend the definition to zero by the convention , since zero is then the only common integer multiple; this is an extension, not a positive minimum. In particular must be handled separately from the displayed quotient, which would involve division by zero.
The least common multiple is useful for combining fractions with the smallest positive shared denominator. For example,Its scheduling interpretation requires care about starting times. If the events start at integer days and , a common time must satisfy the integer congruences and . The Chinese remainder theorem for noncoprime moduli says a solution exists exactly when . If it exists, solutions form one congruence class modulo , but the first meeting need not be day . With starts , the first meeting is day and subsequent meetings are ; with , they never meet. The beauty of the least common multiple is the exact shared spacing, while the integer congruences determine whether and where the spacing begins.
Book VII, Proposition 34 of Euclid's Elements constructs the least common multiple of two numbers, and Proposition 36 extends the construction to three by first combining two of them. In modern notation this is . These are specific ancient treatments of the construction, rather than a claim about its first discovery. [ref]
https://geometor.github.io/euclid/heath/VII/34/index.html. Euclid, Elements VII.34, T. L. Heath translation: two numbers
[ref]https://geometor.github.io/euclid/heath/VII/36/index.html. Euclid, Elements VII.36, T. L. Heath translation: three numbers


