Does $ST=TS$ with $S,T$ diagonalizable matrices imply that they share eigenspaces? I know it's been answered before (at least to the case with $n$ different eigenvalues) but I didn't find a proof for the general case, and I would like some help with this question.
We are given linear transforms $S,T: V\to V$ where $V$ is some vector space.
We are given that $S$ and $T$ commute, $ST=TS$, and that they are diagonalizable:
$T=PD_1P^{-1}$ and $S=KD_2K^{-1}$, where $D_1, D_2$ are diagonal and $K,P$ are invertible.
We are asked to show that $S$ and $T$ have a common eigenspace.
My solution
Maybe I understood the question wrong, but what I tried to do is show that if $v$ is an eigenvector of $S$ then it is also an eigenvector of $T$.
let $Sv=\lambda v$.
$STv=TSv=T\lambda v=\lambda Tv$ which implies that $Tv$ is an eigenvector of $S$ with eigenvalue $\lambda$.
Why does that mean that $v$ is an eigenvalue of $T$?
Another possible way to solve this question is write:
$PD_1P^{-1}KD_2K^{-1} = KD_2K^{-1}PD_1P^{-1}$ and get that $P=K$ but I don't know how to do that either.
 A: 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.
A: 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$.
A: You are almost there...
You have shown that the eigenspace of $S$ corresponding to $\lambda$ is invariant under $T$.
If $\lambda$ is an eigenvalue of multiplicity 1, then $Tv$ is a multiple of $v$ and hence is an eigenvalue of $T$.
If this is not the case, all you can say is the invariance of the eigenspaces. Take for example $S=I$ the identity matrix. Every vector is an eigenvector of $S$ but this is not true for a general $T$.
The result is not true in general
A: The result is not true. The linear transformations of a space of dimension$~3$ with, with respect to a fixed basis, have diagonal matrices with diagonal entries $(0,0,1)$ respectively $(0,1,1)$ satisfy all hypotheses, but they do not have an eigenspace in common.
