Does $ST=TS$ with $S,T$ diagonalizable matrices imply that they share eigenspaces?

The result which's known for two (or more) diagonalizable matrices that commute is that are simultaneous diagonalizable, that's they are diagonalizable in the same basis. Let's prove it by induction on the dimension $\dim E$ (the result is trivial if $\dim E=1$):

If $S$ or $T$ is an homothetie then the result is obvious. Now assume that neither $S$ nor $T$ is an homothetie and since $S$ is diagonalizable then $$E=\bigoplus_{\lambda\in\mathrm{sp}(S)}E_\lambda(S)$$ where $E_\lambda(S)$ is the eigenspace of $S$ associated to the eigenvalue $\lambda$. Since $S$ isn't an homothetie then $$\forall\lambda\in \mathrm{sp}(S)\;\;\dim E_\lambda(S)\le\dim E-1$$ and since $ST=TS$ then $ E_\lambda(S)$ is invariant by $T$. Let $T'=T_{| E_\lambda(S)}$ the restriction of $T$ to $ E_\lambda(S)$ so by hypothesis $S$ and $T'$ are simultaneous diagonalizable on $ E_\lambda(S)$ that's there's a basis $B_\lambda$ of $ E_\lambda(S)$ in which $T'$ is diagonal. In the basis $B=\cup B_\lambda$ the two matrices $S$ and $T$ are diagonal.


If $S$ and $T$ commute and both are diagonalizable then there is a common transform that will simultaneously diagonalize both.

First find a transform $M$ so that $M^{-1}SM$ is diagonal. Suppose that the eigenvalues of $S$ are sorted so repeated eigenvalues of $S$ are grouped together.

Let us suppose that $\lambda_1$ has multiplicity $m$. Since the eigenspace of $S$ is invariant under $T$ we should have $$\begin{align} M^{-1} S M &= \begin{pmatrix}\lambda I_m & 0 \\ 0 & \hat{S}_{22}\end{pmatrix} \\ M^{-1} T M &= \begin{pmatrix}\hat{T}_{11} & 0 \\ 0 & \hat{T}_{22}\end{pmatrix} \end{align}$$ where $I_m$ is $m \times m$ identity matrix. Let $P$ diagonalize $\hat{T}_{11}$ i.e. $$ P^{-1} \hat{T}_{11} P = D $$ where $D$ is diagonal.

Now let $$ R= M \begin{pmatrix} P & 0 \\0 & I\end{pmatrix} $$ Then $$ R^{-1} S R = \begin{pmatrix} P^{-1} & 0 \\0 & I\end{pmatrix} \begin{pmatrix}\lambda I_m & 0 \\ 0 & \hat{S}_{22}\end{pmatrix} \begin{pmatrix} P & 0 \\0 & I\end{pmatrix} = \begin{pmatrix}\lambda I_m & 0 \\ 0 & \hat{S}_{22}\end{pmatrix} $$ $$ R^{-1} T R = \begin{pmatrix} P^{-1} & 0 \\0 & I\end{pmatrix} \begin{pmatrix}\hat{T}_{11} & 0 \\ 0 & \hat{T}_{22}\end{pmatrix} \begin{pmatrix} P & 0 \\0 & I\end{pmatrix} = \begin{pmatrix}D & 0 \\ 0 & \hat{T}_{22}\end{pmatrix} $$ Thus the $m\times m$ block is now simultaneously diagonalized.

Proceed as before for other eigenvalues of $S$.