show invariant subspace is direct sum decomposition Let $f \in End(V)$ ($V$ is a finite dim.) be diagonalized where $a_1, … ,a_k$ are eigenvalues and for $i \neq j$ we have $a_i \neq a_j$. Prove for every subspace $f$ invariant $W \subset V$ holds equality :
$W=(W\cap V_{a_1})\oplus…\oplus(W \cap V_{a_k})$ where ($V_{a_i}$ is eigensubspace for eigenvalue $a_i)$
my try: 
I'm not sure if I can assume we have $\dim V=k$ since $a_i$ are distinct and $f$ is diagonalized if so then $\dim V_{a_i}=1$ for every i and let $v_1, … ,v_k$ be corresponding eigenvectors they creates basis $A$ where $f$ is diagonal so invariant subspaces are created by choosing subspace of vectors from $A$ and from this we have our equation, but I don't know how to formally prove it.
 A: Define $W_i = W \cap W_i$. A subspace $W$ is a direct sum $W = W_1 \oplus \ldots \oplus W_k$ if and only if every $w \in W$ can be written in a unique way as $w = w_1 +\ldots + w_k$ with $w_i \in W_i$. So in order to show that $W$ is a direct sum, we need to show two things:


*

*(Existence) For every $w \in W$, there exist $w_i \in W_i$ such that $w = w_1 + \ldots + w_k$.

*(Uniqueness) If we have $w = w_1 + \ldots + w_k = w_1' + \ldots w_k'$ with $w_i, w_i' \in W_i$ then $w_i = w_i'$ for all $1 \leq i \leq k$.


The fact that $f$ is diagonalizable is equivalent to the fact that
$$ V = V_{a_1} \oplus \ldots \oplus V_{a_k} $$
and in particular $\dim V = \dim V_{a_1} + \ldots + \dim V_{a_k}$. Note that we don't necessarily have $\dim V_{a_i} = 1$ as eigenvalues might have more than one linearly independent eigenvectors corresponding to them. For example, if $\dim V = n$ and $f = \mathrm{id}$, then the only eigenvalue is $a_1 = 1$, $k = 1$ and $\dim V_{a_1} = n$.
Lemma: Let $f \colon V \rightarrow V$ be a linear map with an invariant subspace $W$. Let $w \in W$ and assume that $w = v_1 + \ldots + v_l$ where $v_i$ are eigenvectors of $f$ corresponding to distinct eigenvalues. Then $v_i \in W$ for all $1 \leq i \leq l$.
Proof: Induction on $l$. The case $l = 1$ is trivial. Assume that the lemma is known for $l - 1$. If $w = v_1 + \ldots + v_l$ then $Tw - a_l \cdot w = (a_1 - a_l)v_1 + \ldots + (a_{l-1} - a_l)v_{l-1}$ and $Tw - a_1\cdot w \in W$. By induction hypothesis, we have $(a_i - a_l)v_i \in W$ for all $1 \leq i \leq l - 1$. Since $a_i \neq a_l$, we then have $v_i \in W$ for all $1 \leq i \leq l - 1$. Finally, as $v_l = w - v_1 - \ldots - v_{l-1}$ we also see that $v_l \in W$.
Back to the proof. Let $w \in W$. We will show existence and uniqueness.


*

*(Existence) Since $f$ is diagonalizable, we know that we can write $w = v_1 + \ldots + v_k$ with $v_i \in V_{a_i}$. By the lemma above, each $v_i$ is in fact in $W$ and so $v_i \in V_{a_i} \cap W = W_i$.

*(Uniqueness) Follows immediately from the fact that $V = V_{a_1} \oplus \ldots \oplus V_{a_k}$.

