Given $A$ an $n \times n$ diagonal matrix with distinct non-zero values on the diagonal ($A_{ii} = A_{jj} \rightarrow i = j$)
Let $S$ be the set of eigenspaces of $A$.
How do I show that for any subspace $U$ invariant under $A$ there exist some $T \subset S$ such that
$$ U = \sum_{V \in T} V $$
(Where by sum I mean the direct sum, not sure which notation makes the most sense here really.)
I think I understand a few ways I could conceptualize the problem, but when I try to write it down I have a hard time keeping it from getting out of control, and it seems like maybe I am overcomplicating it.
One idea I have tried is that for a subspace $U$ with dimension $d$ I can take a basis $f$ for that space. I am not sure how to "state it" but it seems to me that the subspace $U$ is invariant if and only if the basis $f$ can be represented with no more than $d$ of the eigenvectors. I thought I would take a vector $x \in U$ rewrite it with $f$ and again with the $\textbf 1$ unit eigenvectors. Then show that $Ax \in U$ if it can be represented by $f$... I am not quite sure how to "close the loop" on this idea though.
My second idea was to show that for an invariant subspace $U$ with dimension $d$ and any point $x \in U$ then for any positive integer $k$ we have $A^kx \in U$. Then I thought I could show that if there are more than $d$ of the unit eigenvectors in the representation of $x$ then the points $Ax$, $A^2x$ ... $A^{d + 1}x$ would form $d + 1$ linearly independent points in $U$ contradicting the original definition of $d$ as the dimension of $U$. Yet I ended up getting totally lost trying to show that the points are linearly independent.
Is there a simpler approach that I am missing? Is there any easy way to complete one of these that I missed?