I am trying to understand the answer to this question.
It was pointed out that this doesn't necessarily hold for non-diagonalizable matrices, so the top answer starts by assuming $A$ and $B$ are diagonalizable, complex matrices. I am comfortable with the first part of this answer:
...we decompose $\mathbb C^n$ as a direct sum of eigenspaces of $A$, say $\mathbb C^n = E_{\lambda_1} \oplus \cdots \oplus E_{\lambda_m}$, where $\lambda_1,\ldots, \lambda_m$ are the eigenvalues of $A$, and $E_{\lambda_i}$ is the eigenspace for $\lambda_i$.
Then, note that each $E_{\lambda_i}$ is invariant under $B$:
If $A v = \lambda_i v, $ then $A (B v) = (AB)v = (BA)v = B(Av) = B(\lambda_i v) = \lambda_i Bv.$
And now, the part that confuses me:
Now we consider $B$ restricted to each $E_{\lambda_i}$ separately, and decompose each $E_{\lambda_i}$ into a sum of eigenspaces for $B$.
How do we know the restriction of $B$ to each $E_{\lambda_i}$ is diagonalizable? I have no guarantee that the eigenbasis of $B$ will be inside $E_{\lambda_i}$, so in general I would expect $B$ to not be diagonalizable. I'm probably missing something here, but this is very non-obvious to me.
Assuming this is true, we can just piece together the resulting eigenspaces to get a common basis of eigenvectors:
Putting all these decompositions together, we get a decomposition of $\mathbb C^n$ into a direct sum of spaces, each of which is a simultaneous eigenspace for $A$ and $B$.
I'm comfortable with this. He then goes on to say
NB: I am cheating here, in that $A$ and $B$ may not be diagonalizable (and then the statement of your question is not literally true), but in this case, if you replace "eigenspace" by "generalized eigenspace", the above argument goes through just as well.
Questions:
Is it true generally that a restriction of a diagonalizable operator to an invariant subspace is also diagonalizable?
His assertion at the end that "if you replace 'eigenspace' by `generalized eigenspace,' the above argument goes through just as well." seems to be outlining a proof to some unknown statement. I'm guessing it is "Matrices commute iff they share a common basis of generalized eigenvectors". Is this correct?
If the answer to 2 is "yes," is the following proof outline correct?
If $A$ and $B$ commute, so do $(A - \lambda I)$ and $B$. Using the the same manipulation as before we see that the generalized eigenspaces of $A$ are invariant under $B$. Then, the restriction of $B$ to each generalized eigenspace has a Jordan decomposition, and we can piece together these generalized eigenspaces to get a common basis of generalized eigenvectors.