Let $p$ be a prime number. Let $M$ denote the ring of $2 \times 2$ matrices over the field $F$ of $p$ elements. For $A \in M$, let $C(A)$ denote the set of those matrices $B \in M$ such that $AB = BA$. What are the possible values of the dimension of $C(A)$ over $F$ for $A \in M$?
What I know is this: Given a square $n \times n$ matrix $A$ over a field $F$, it is always true that $A$ commutes with any $B=p(A)$, where $p(x)$ is a polynomial with coefficients in $F$. Now, because of the theorem of Cayley-Hamilton, the matrix $A$ is root of its characteristic polynomial (which has degree $n$), so that means that every power of $A$ larger than $n-1$ can be written as a linear combination of powers up to $n-1$. For, our case, it means that: $C(A)=B=p_0I+p_1A$, where $p_0,p_1 \in F$.
So, that means $ 2\le \dim(B)\le 4$ (cases where $p_0=0$ and $p_1=0$). Is this correct? But what about $p$ prime - what it has to do with anything?