Commuting linear maps Why is it that if $f,g\,\,$ are endomorphisms and they commute then one of them is a polynomial with the "argument" being the other? It is easy to see that if that were true, $f,g\,\,$ would commute. What I fail to see is the converse. Thanks.
 A: I will write it this way: given a square matrix $M,$ then all matrices that commute with $M$ can be written as a polynomial in $M$ when: 
All eigenvalues of $M$ are distinct, or, at least, whenever an eigenvalue has multiplicity larger than one, it has just a single Jordan block, call it multiplicity $k,$ Jordan block $k$ by $k,$ with $k-1$ occurrences of $1$ on the superdiagonal. 
This is true if and only if  the characteristic polynomial and the minimum polynomial are equal.
Those are all. That is, the following two conditions for a square matrix $M$ with real or complex entries are equivalent:
(I)  All matrices that commute with $M$ can be written as a polynomial in $M.$
(II) The characteristic polynomial and the minimal polynomial of $M$ are the same.
See Corollary 1 to Theorem 2 on page 222 of The Theory of Matrices, Volume 1 by Feliks Ruvimovich Gantmakher.
See also
https://mathoverflow.net/questions/65796/when-animals-attack 
and a reference provided in a comment by Richard Stanley there, 

The general theory of which matrices A commute with a given matrix M
  is covered in Section 1.10.1 of http://math.mit.edu/~rstan/ec/ec1.pdf.
  This treatment focuses on counting the number of such matrices A over
  a finite field and assumes that A is invertible, but the
  classification carries over readily to any field, with or without the
  invertibility assumption. See page 108 for some references. 

Also see Interpreting the commuting of 2 matrices 
