This is documentation for Mathematica 5, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

Documentation / Mathematica / The Mathematica Book / Advanced Mathematics in Mathematica / Algebraic Manipulation /

3.3.5 Polynomials Modulo Primes

Mathematica can work with polynomials whose coefficients are in the finite field of integers modulo a prime .

Functions for manipulating polynomials over finite fields.

Here is an ordinary polynomial.

In[1]:= Expand[ (1 + x)^6 ]

Out[1]=

This reduces the coefficients modulo 2.

In[2]:= PolynomialMod[%, 2]

Out[2]=

Here are the factors of the resulting polynomial over the integers.

In[3]:= Factor[%]

Out[3]=

If you work modulo 2, further factoring becomes possible.

In[4]:= Factor[%, Modulus->2]

Out[4]=