In this section,
will be a field, unless stated otherwise.
Modular arithmetic with polynomials is very similar to modular arithmetic with integers.
If
then we say
is congruent to
modulo
,
written
,
if
divides the polynomial
.
proof: All of these are left as an exercise, except for the last one.
Assume
and
. Then
.
By the unique factorization theorem,
.
In general, when computing a polynomial modulo
, we may always replace
,
,
, ...
by
and
,
,
, ...
by
. For example,
.
For each fixed non-zero
,
the congruence relation
defines an equivalence
relation (in the sense of §1.7.2).
Let
As in the integral case treated in chapter 1, the following result, is a consequence of the Euclidean algorithm.
The polynomial
in the above lemma is called
the inverse of
modulo
,
written
.
proof:
(only if) Assume
.
There are
such that
, by the Euclidean algorithm
(more precisely, by Corollary 2.2.16).
Thus
.
(if) Assume
.
There is a polynomial
such that
.
By Corollary 2.2.16 again,
we must have
.