  Given a square matrix $A$ with entries in a commutative ring $S$, the ideal
of $S[X]$ consisting of polynomials $f$ with $f(A) =0$ is called the null ideal
of $A$. Very little is known about null ideals of matrices over general
commutative rings. We compute a generating set of the null ideal of a matrix in
case $S = D/dD$ is the residue class ring of a principal ideal domain $D$
modulo $d\in D$. We discuss two applications. At first, we compute a
decomposition of the $S$-module $S[A]$ into cyclic $S$-modules and explain the
strong relationship between this decomposition and the determined generating
set of the null ideal of $A$. And finally, we give a rather explicit
description of the ring \IntA of all integer-valued polynomials on $A$.
