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.

For a): Your proof of injectivity is not correct. For example if $M$ is the identity matrix, then $M^k=I\ne0$ for all $k$. One way would be to argue via cardinalities: $\Bbb Z_p[X]$ is infinite while $\Bbb Z_p^{n\times n}$ is finite, so ....
A bit cleaner/more general argument would be to look at the dimension. $\Bbb Z_p^{n\times n}$ has dimension $n^2$, hence the set $\{I,M,\dots,M^{n^2}\}$ is linearly dependent, so there are coefficients $a_0,\dots,a_{n^2}$, not all equal to $0$, such that $$a_0I+\dots+a_{n^2}M^{n^2}=0$$ Now see how you can make a non-zero polynomial $p$ out of this such that $p(M)=0$.
Hint for the surjective part: $\Bbb Z_p[X]$ is commutative while $\Bbb Z_p^{n\times n}$ is not.
For b): For the minimal polynomial you need to look at the size of the largest Jordan block for each eigenvalue and not the number of Jordan blocks.
Assume that we found the minimal polynomial $\phi$ and say it is of degree $d$. We know that $\ker f=\langle\phi\rangle$, hence $$\operatorname{im} f\cong \Bbb Z_p[X]/\langle\phi\rangle$$
In general for a field $K$ and a polynomial $p$ over $K$ of degree $n$ we have that $K[X]/\langle p\rangle$ is a $K$-vector space of dimension $n$ (if you don't know this try to prove this, e.g. by explicitely writing down a basis). So in this case we know that $\operatorname{im} f$ is a $\Bbb Z_p$-vector space of dimension $d$. What does this tell us about the cardinality?
