In number theory, Lagrange's theorem is a statement named after Joseph-Louis Lagrange about how frequently a polynomial over the integers may evaluate to a multiple of a fixed prime p. More precisely, it states that for all integer polynomials
stylef\inZ[x]
p\midf(x)
where is the degree of .
This can be stated with congruence classes as follows: for all polynomials
stylef\in(Z/pZ)[x]
f(x)=0
Z/pZ
If p is not prime, then there can potentially be more than solutions. Consider for example p=8 and the polynomial f(x)=x-1, where 1, 3, 5, 7 are all solutions.
Let
stylef\inZ[x]
f(x)\equiv0\pmod{p} \Longleftrightarrow g(x)\equiv0\pmod{p}
Furthermore, by the basic rules of modular arithmetic,
f(x)\equiv0\pmod{p} \Longleftrightarrow f(x\pmod{p})\equiv0\pmod{p} \Longleftrightarrow g(x\pmod{p})\equiv0\pmod{p}
Both versions of the theorem (over Z and over Z/pZ) are thus equivalent. We prove the second version by induction on the degree, in the case where the coefficients of f are not all null.
If then f has no roots and the statement is true.
If without roots then the statement is also trivially true.
Otherwise, and f has a root
k\inZ/pZ
styleg\in(Z/pZ)[x]
styler\inZ/pZ
f(x)=g(x)(x-k)+r.
Evaluating at x=k provides r=0. The other roots of f are then roots of g as well, which by the induction property are at most in number. This proves the result.
. William J. LeVeque . Topics in Number Theory, Volumes I and II . Dover Publications . New York . 2002 . 1956 . 978-0-486-42539-9 . 1009.11001 . 42 .