TITLE: Simultaneous diagonalization
QUESTION [12 upvotes]: I'm pretty sure that the following (if true) is a standard result in linear algebra but unfortunately I could not find it anywhere and even worse I'm too dumb to prove it: Let $k$ be a field, let $V$ be a finite-dimensional $k$-vector space and let $S \subseteq \mathrm{End}_k(V)$ be a subset of pairwise commuting (i.e. $\lbrack S, S \rbrack = 0$) endomorphisms. Then the following holds:

If all $f \in S$ are diagonalizable, then there exist maps $\chi_i:S \rightarrow k$, $i=1,\ldots,r$, such that $V = \bigoplus_{i=1}^r E_{\chi_i}(S)$, where $E_\chi(S) := \lbrace v \in V \mid fv = \chi(f)v \ \forall \ f \in S \rbrace$. 
The maps $\chi_i$ in 1 are unique.
1 is equivalent to the existence of a basis $\mathcal{B}$ of $V$ such that for each $f \in S$ the matrix $M_{\mathcal{B}}(f)$ of $f$ with respect to $\mathcal{B}$ is diagonal. (I believe that this might not be true)
If all $f \in S$ are trigonalizable, then there exists a basis $\mathcal{B}$ of $V$ such that for each $f \in S$ the matrix $M_{\mathcal{B}}(f)$ of $f$ with respect to $\mathcal{B}$ is upper triangular and for each diagonalizable $f \in S$ the matrix $M_{\mathcal{B}}(f)$ is diagonal.

I know that a set of commuting diagonalizable endomorphisms can be simultaneously diagonalized in the sense of 3 but I don't know how to prove 1 (my problem is the "glueing" of the $\chi$-maps when I try to prove this by induction on $\mathrm{dim}V$). Also, I know that the first part of 4, the simultaneous trigonalization, holds but I don't know how to show that there exists a basis which then also diagonalizes all diagonalizable endomorphisms. This should follow from 1, I think.
Perhaps, because all this is probably standard stuff, I should mention that this is not a homework problem :)
One additional question: Suppose that $k$ is algebraically closed and that $G$ is an affine commutative algebraic group over $k$ which coincides with its semisimple part, embedded as a closed subgroup in some $GL(V)$. Are the maps $\chi_i:G \rightarrow \mathbb{G}_{m}$ morphisms of algebraic groups?

REPLY [6 votes]: And the answer to the additional question (which Ben skipped) is also positive.
Indeed, there are two parts here:

$\chi_i$ is a group morphism (this is obvious for any subgroup $G\subset GL(V)$
$\chi_i$ is algebraic (this is obvious because matrix elements of matrices in $GL(V)$
in any basis are algebraic functions for tautological reasons).