Given an endomorphism $T$ of $V$ a vector space over a field $k$, we may define the minimal polynomial of $T$ to be a generator of the annihilator of $T$ in $k[x]$. We are guaranteed such a unique generator up to multiplication by units because $k[x]$ is a PID. Consider the more general case in which $T$ is instead an endomorphism of $M$ a module (finitely-generated if it helps) over the commutative ring $A$. Since $A[x]$ is no longer guaranteed to be a PID, it is not obvious to me that the annihilator of $T$ should be principally generated. Is this the case in general and if not what conditions make this true?
As one example, for $A=\mathbb{Z}$ it seems that the answer is affirmative since we may think of $\mathbb{Z}\subset \mathbb{Q}$, find a the minimal polynomial of $T$ in $\mathbb{Q}[x]$ and then clear denominators to get a polynomial which I believe generates the annihilator in $\mathbb{Z}[x]$. This polynomial is not necessarily monic, though I would be interested in a proof that it is.
In the case $A = \Bbb Z$, consider the module $M = \Bbb Z / 2\Bbb Z$, and the endomorphism $T = 0$. Then the annihilator of $T$ in $\Bbb Z[x]$ is the ideal $(2, x)$ which is not principal.