# Let's assume that $XA = AX$. Show that there is such a matrix $M$ that $p_A(X) = M(A-X), MA=AM$ and $MX=XM$.

Let $$A, X \in M_{nxn}(K)$$. Let $$p_A(t)$$ be a characteristic polynomial of matrix A. Let's assume that $$XA = AX$$. Show that there is such a matrix $$M$$ that $$p_A(X) = M(A-X), MA=AM$$ and $$MX=XM$$.

I believe I need to use Jordan form in order to proceed. I could consider two scenarios: when X and A are invertible and thus similar and when these two are not invertible. Is this the right approach?

Any hints?

Write $$p_A(t)=\sum_{k=0}^n a_k t^k$$, the characteristic polynomial of $$A$$. By Cayley-Hamilton theorem, $$p_A(A)=0$$.
Then we have \begin{align} p_A(X)&=p_A(X)-p_A(A)\\ &=\sum_{k=0}^n a_k (X^k-A^k). \end{align} Since $$XA=AX$$, we have for $$k\geq 1$$, $$X^k-A^k=(X-A)\sum_{i=0}^{k-1} X^iA^{k-1-i}.$$
Hence, by noting that $$A^0=X^0=I$$ for convenience, \begin{align} p_A(X)&=(X-A)\sum_{k=1}^n a_k\sum_{i=0}^{k-1}X^iA^{k-1-i} \end{align}
Then take $$M=-\sum_{k=1}^n a_k\sum_{i=0}^{k-1}X^iA^{k-1-i}.$$