If eigenvalues of one matrix are functions of eigenvalues of another matrix, do they commute? Suppose I have two Hermitian, non-zero matrices $A$ and $B$. Each satisfies an eigenvalue equation with non-degenerate spectra, $$A\vec{x}=a\vec{x}$$$$B\vec{y}=b\vec{y}$$ where $a$,$b$ are the eigenvalues and $\vec{x}$,$\vec{y}$ the corresponding eigenvectors.
Now suppose that $b=f(a)$ where $f$ is a smooth function. Does it follow that $A$ and $B$ commute (i.e. share the same eigenbasis)?
I think that they do commute, but I can't quite prove it. Suppose $\tilde A$ is the diagonal version of $A$. Then $f(\tilde A)$ has eigenvalues $f(a)=b$. Does this imply that $B = f(A)$? 
 A: No, what you need is that eigenvectors should (more or less) coincide. Suppose $A$ and $B$ commute and that $\lambda$ is an eigenvalue of $B$. Let $Z_B(\lambda)= \ker (B-\lambda)$ be the associated eigenspace. Then for any $y\in Z$:
$$ BA y = AB y =  A (\lambda y) = \lambda Ay $$
so $Ay\in Z_B(\lambda)$. Thus $A$ preserves the subspace $Z_B(\lambda)$ and may therefore be diagonalized within that subspace (but there could be many different eigenvalues of $A$ for the same $\lambda$, eigenvalue of $B$).
In conclusion (modulo a few details) for Hermitian matrices: $A$ and $B$ commute iff you may find an orthonormal basis which simultaneously diagonalizes $A$ and $B$.  There is no a priori relationship between the eigenvalues of $A$ and $B$.
A: Take two square real diagonalizable matrices $A$ and $B$ that don't commute. Let $a_i$ and $b_i$ be their eigenvalues. Assume all $a_i$ are distinct. You can fit/find a smooth function $f$ such that $f(a_i) = b_i$ for all $i$.
Unless I have misunderstood the question, the answer is no.
