How do you prove that the invariant subspaces of a diagonal matrix are direct sums of eigenspaces? 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 &quot;state it&quot; 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 &quot;close the loop&quot; 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?
It is unnecessary to require all of the diagonal entries to be nonzero. Also, with a slight modification to the definition of the subspace $W$, this proof will work for any matrix/operator with $n$ distinct eigenvalues, not just diagonal matrices.
You have a decomposition into $n$ eigenspaces (since all eigenvalues are distinct):
$$V = S_{1} \oplus \cdots \oplus S_{n}$$
where the $S_{i}$ are the eigenspaces (each 1-dimensional). We will write $\lambda_{j}$ for the eigenvalue associated with $S_{j}$, and note that these eigenspaces are orthogonal (when the matrix/operator is diagonal; the only place orthogonality is used is the definition of the subspace $W$ below).
Assume that $U$ is an invariant $d$-dimensional subspace. We can prove our result by induction on $d$: If $d=1$, then $U$ is clearly an eigenspace.
If the result holds for all subspaces of dimension less than $d$ then we can find a $1 \leq j \leq n$ so that $U$ is not contained in the hyperplane $H= \sum_{i \neq j} S_{i}$.
Then $U \cap H$ has dimension $d-1$ and is invariant (since $H$ and $H$ are both invariant), thus $U \cap H$ is a direct sum of eigenspaces by our inductive hypothesis.
Finally, you can argue that $U = S_{j} \oplus (U \cap H)$ using a dimension argument. We only need to show that $U \cap S_{j} \neq \{0\}$.
Put $W = U^{\perp} \cap H$; since $H$ is a sum of eigenspaces, and $U \cap H$ is a sum of eigenspaces, $W$ is also, so it is clear that $W$ is invariant under $A$. Then
$H = (U \cap H) \oplus W$ and
$V = S_{j} \oplus (U \cap H) \oplus W$.
If we have $u \in U \setminus H$ then $u$ can be written uniquely
$u = s + h + w$, where $s \in S_{j}\setminus\{0\}$, $h \in H \cap U$, $w \in W$. If $w = 0$ then $s \in U\cap S_{j} \setminus\{0\}$ and we are done, so assume $w \neq 0$; also, since $h \in U$ we can replace $u$ with $u-h$ if necessary to WLOG put $u = s+w$ with $s,w$ both nonzero.
Now $Au = As + Aw = \lambda_{j}s + w^{\prime} \in U$,
where $w^{\prime} \in W$ and (since eigenvalues are distinct) $w^{\prime} \neq \lambda_{j} w$.
Then
$$\lambda_{j} u - Au = (\lambda_{j}w - w^{\prime}) \in U,$$
but this is impossible since
$(\lambda_{j}w - w^{\prime}) \in W \setminus \{0\}$ which has trivial intersection with $U$.
Therefore $s \in (S_{j} \cap U)\setminus\{0\}$, so $S_{j} \subseteq U$, and $U = S_{j} \oplus (U \cap H)$ is a sum of eigenspaces.
A nearly correct completion of my second approach.
Suppose $U$ is an invariant subspace under $A$ then ...
Let $d$ be the dimension of $U$.
Suppose also that $U$ is not spanned by a set of $d$ eigenvectors then ...
Let $v \in U$ such that $v$ has the maximum number of non-zero coefficients in it's representation relative to the basis $e$.
If the number of non-zero elements of $v$ is not greater than $d$ we get a contradiction, because either:

All vectors in $U$ have a subset of the same non-zero coefficients, and thus $U$ is actually spanned by $d$ eigenvectors.

There exists another vector in $U$ with at least one non-zero coefficient that corresponds to a zero coefficient in $v$, but then there is a linear combination of these vectors with more non-zero elements than $v$.


Therefore $v$ has at least $d + 1$ non-zero elements.
$X = \{ v, Av, A^2v \; ... \; A^dv \}$ is a set of $d + 1$ vectors in $U$ because $U$ is an invariant space.
The vectors of $X$ are linearly dependent because the dimension of $U$ is $d$.
Let $\alpha$ be the coeifficients of $v$ relative to $e$ the simple unit vectors. So that $v = \sum \alpha_i e_i$.
Then $A^nv = \sum \alpha_i (\lambda_i)^n e_i$.
Form a new $d + 1 \times d + 1$ matrix $M$ with the non-zero coefficients of $A^nv$ forming each column. That is $M_{ij} = \alpha_{k_i} (\lambda_{k_i})^j$ where $k$ indexes the non-zero elements of $v$.
$$
M = \begin{bmatrix}
\alpha_{k_1} &amp; \alpha_{k_1} \lambda_{k_1} &amp; ... &amp; \alpha_{k_1} (\lambda_{k_1})^{d + 1} \\
\alpha_{k_2} &amp; \alpha_{k_2} \lambda_{k_2} &amp; ... &amp; \alpha_{k_2} (\lambda_{k_2})^{d + 1} \\
. &amp; . &amp; &amp; . \\
. &amp; . &amp; &amp; . \\
. &amp; . &amp; &amp; . \\
\alpha_{k_{d + 1}} &amp; \alpha_{k_{d + 1}} \lambda_{k_{d + 1}} &amp; ... &amp; \alpha_{k_{d + 1}} (\lambda_{k_{d + 1}})^{d + 1} \\
\end{bmatrix}
$$
We can see that M is the product of a Vandermonde matrix and a diagonal matrix, and therefore it has rank $d + 1$. But then the columns are linearly independent and the vectors of $X$ are linearly independent, contradicting the earlier contrary conclusion.
Therefore the supposition that $U$ is not spanned by a set of $d$ eigenvectors is incorrect.
All together we have that any subspace $U$ invariant under $A$ is spanned by a set of $d$ eigenvectors.