Ring homomorphism $f: \Bbb{Z}_p[X] \to \Bbb{Z}_p^{n\times n}$. Prove it is never bijective and find the amount of elements in Im$(f)$. Let $f: \mathbb{Z}_p[X] \to \mathbb{Z}_p^{n \times n}$
with $n \geq 2$ be a ring homomorphism with $f(1) = I_n, f(X) = M$.
a) Prove it is never injective and never surjective.
b) Find the minimal polynomial and the amount of elements $ \operatorname{Im}(f)$ with $p=3, n=6$ and with $M$ given:
$f(X)= M  = \left( \begin{matrix} 2 & 0 & 0 & 0 & 0 & 0 \\ 1 & 2 & 0 & 0 & 0 & 0 \\ 0 & 1 & 2 & 0 & 0 & 0 \\ 0 & 0 & 0 & 2 & 0 & 0 \\ 0 & 0 & 0 & 1 & 2 & 0 \\ 0 & 0 & 0 & 0 & 0 & 1 \end{matrix} \right).$

a) I first proved that $f$ is fully determined by $f(X)$.
$f(p(X)) = f(\sum_{i=1}^n a_iX^i) = \sum_{i=1}^n f(a_i)f(X^i) =  \sum_{i=1}^n a_if(X)^i$, so we see that indeed $f$ is determined by the value of $f(X)$. (These operations are allowed since $f$ is a ring homomorphism).
Then I tried proving that it is never injective.
Since $M \in \mathbb{Z}_p^{n \times n}$, I know that there exists a $q \in \mathbb{N}$ such that $M^q = 0$ with $q$ a divisor of $p$.
Consider $p(X) = X^i$, then $f(p(X)) = p(f(X)) = p(0) = 0$, which means that $p(X) \in \text{ker}(f)$ and since the kernel is not equal to $\{0\}$ we know it is not injective.
I am not sure how to prove that it is never surjective.
b) I think that the minimal polynomial is equal to $\phi_M(X) = (X-2)^2(X-1)$ since there are 2 Jordan blocks for eigenvalue 2 and 1 for eigenvalue 1.
I don't really know how to calculate the amount of elements that $ \operatorname{Im}(f)$ has.

A ring homomorphism $\mathbb{Z}_p[X]\to\mathbb{Z}_p^{n\times n}$ can be surjective, precisely when $n=1$. In this case, send a polynomial to its constant term.
For $n>1$ such a homomorphism cannot be surjective, because the domain is commutative and the codomain isn't.
So this generalizes to the case $A[X]\to A^{n\times n}$, where $A$ is any commutative ring.
Proving that such a homomorphism cannot be injective is the same as proving that for every $M\in A^{n\times n}$, there is a nonzero polynomial $a_0+a_1X+\dots+a^kX^k$ such that
$$
a_0I+a_1M+\dots+a_kM^k=0
$$
This is easier when $A$ is a field, because in this case the set $\{I,M,\dots,M^{n^2}\}$ has more elements than the dimension of $A^{n\times n}$ as $A$-vector space; a nontrivial linear combination will provide the required polynomial.

For general commutative rings one can observe that Hamilton-Cayley holds, but this requires proving it. If you know a proof for matrices over a field, then you can consider the field of fractions $F$ of $\mathbb{Z}[X_{ij}:1\le i,j\le n]$ (polynomials over $n^2$ indeterminates). Let $\xi$ be the matrix having $X_{ij}$ as its $(i,j)$ entry. Then the characteristic polynomial $p(X)$ of $\xi$ (where $X$ is another indeterminate) is a polynomial in $\mathbb{Z}[X_{ij},X]$ and we know that $p(\xi)=0$. Given a matrix $M=(m_{ij})\in A^{n\times n}$, consider the homomorphism $\mathbb{Z}[X_{ij}]\to A^{n\times n}$ defined by $X_{ij}\mapsto m_{ij}$ and finish up.
