This was an exercise problem from H&K Linear Algebra(sec 7.2, exercise 18). Could you check my proof?
The theorem is as follows:
If $V$ is a finite-dimensional vector space and $W$ is an invariant subspace of a diagonalizable linear operator $T$, then $W$ has a $T$-invariant complementary subspace.
Step 1)
I will first prove that if $W_1$,...,$W_k$ are subspaces obtained from the primary decomposition theorem and if $W$ is an invariant subspace of the linear operator, $T$, then $(W_1\cap W)\oplus ...\oplus (Wk\cap W)=W$.
Suppose $p_1^{r_1}...p_k^{r_k}$ is the primary decomposition of the minimal polynomial of $T$ where each $p_i$ is irreducible. We know that the minimal polynomial of $T_W$, restriction of $T$ on $W$, divides the minimal polynomial of $T$. Therefore, the minimal polynomial of $T_W$ is equal to:
$p_1^{d_1}...p_k^{d_k}$ where $d_i \leq r_i$.
Now, applying the primary decomposition theorem to $T_W$, we get subspaces $U_i=\text{Null}(p^i(T)^{d_i})$ such that their direct sum is $W$. Also, $\text{Null}(p^i(T_W)^{r_i})$ is equal to $(W_i\cap W)$ since $\text{Null}(p^i(T)^{r_i})=W_i$ and $T_W$ is restriction of $T$ on $W$. Since $r_i\geq d_i$, $(W_i\cap W)$ must contain $U_i$. However, supposing that $U_i$ is a proper subset of $(W_i\cap W)$ gives us contradiction because each $(W_i\cap W)$ is independent and the direct sum of $U_i$ forms $W$.
Step 2)
Going back to the original theorem, since $T$ is diagonalizable if and only if the minimal polynomial of $T$ is given by $(x-c_1)...(x-c_k)$ where $c_1,...,c_k$ are distinct characteristic values of $T$, subspaces $W_i$ associated to each characteristic value is equivalent to subspaces obtained by the primary decomposition theorem.
Now, we must show that $T$ is $T$-admissible on the invariant subspace $W$. If $f(T)\beta \in W$ then there are distinct vectors $\beta_1,...,\beta_k$ in $W_1,..,W_k$, respectively, such that $f(T)\beta=f(T)\beta_1+...+f(T)\beta_k$. Since each $\beta_i$ was chosen from each $W_i$, each $\beta_i$ is a characteristic vector of $T$, so we get
$f(T)\beta=f(c_1)\beta_1+...+f(c_k)\beta_k$
Then using step 1, we see that
$(W_1\cap W)\oplus ...\oplus (Wk\cap W)=W$
So each $f(c_i)\beta_i \in (W_i\cap W)$ and since $f(c_i)$ is a scalar, $\beta_i \in (W_i\cap W)$. Having $\gamma=\sum \beta_i$, which is clearly in $W$, we get
$f(T)\gamma=f(T)(\beta_1+...+\beta_k)=f(T)\beta$.