# Question about Lagrange's theorem

Based on the textbook Lagrange's theorem states: The congruence $$f(x) \equiv 0(mod\text{ } p)$$

in which $$f(x)=a_0x^n+....+a_n,\text{ } a_0\not\equiv0(mod\text{ } p)$$

has at most n roots. p is a prime number I think.

Two polynomials are algebraically congruent mod m if the coefficients of each power x are congruent mod m. Lagrange's theorem contradicts the definition of two polynomials being algebraically congruent hence one of the coefficients is not congruent 0 (mod p, so I need a better explanation about Lagrange's theorem.

• A polynomial of degree $n$ with coefficients in a field (here $\Bbb Z/p$) has at most $n$ roots (counting multiplicities). – Ted Shifrin Jul 4 '16 at 0:28

For instance, Fermat's theorem say that the polynomial functions $x^p-x$ has $p$ zeros mod $p$ and so is the zero function in $\mathbb Z/p$, but $x^p-x$ is certainly not the zero polynomial.