Invariant subspaces of vector space. I'm confused with the next exercise:
Take $\left\{ 1,e^t,e^{-t}\right\}$ a basis for a vector space $V$ (note that $V$ is a space of continuous functions). Take a linear transformation $T:V\to V$ defined by $T(f)=f'$ (derivative). The question is: find all the invariant subspaces of $V$ under $T$. 
After a lot of time thinking, I think that the answers is: every subspace generated by a non-empty subset of the basis, i.e., take $W$ an invariant subspace, then, there exist $\emptyset\neq B\subseteq \left\{ 1,e^t,e^{-t}\right\}$ such that $\text{span}(B)=W$. But, how to prove? I can prove that if $\emptyset\neq B\subseteq \left\{ 1,e^t,e^{-t}\right\}$ then $\text{span}(B)$ is invariant under T but the other direction seems too dificult for me and I can't find how to prove. Any hint? I really appreciate any help you can provide.
 A: Suppose that $W$ is an invariant subspace and let $w=\alpha+\beta e^t+\gamma e^{-t}\in W$. Then $T(w)\in W$ too. But $T(w)=\beta e^t-\gamma e^{-t}$. And $T\bigl(T(w)\bigr)\in W$. But $T\bigl(T(w)\bigr)=\beta e^t+\gamma e^{-t}$. So $\alpha\bigl(=w-T\bigl(T(w)\bigr)\bigr)\in W$. Therefore, either $\alpha=0$ or the constant functions belong to $W$. In either case, $\beta e^t+\gamma e^{-t}\in W$. So$$\beta e^t=\frac12\bigl((\beta e^t+\gamma e^{-t})+(\beta e^t-\gamma e^{-t})\bigr)\in W.$$So, either $\beta=0$ or every multiple of $e^t$ belongs to $W$. Finally, from$$\gamma e^{-t}=\frac12\bigl((\beta e^t+\gamma e^{-t})-(\beta e^t-\gamma e^{-t})\bigr)\in W$$you get that either $\gamma=0$ or every multiple of $e^{-t}$ belongs to $W$.
A: There are several ways to do that. But in this exercise in particular, the basis $B$ is a basis of eigenvectors of $T$ then. In particular, the matrix associated to it in that basis is diagonal 
$$
[T]_B=\left(\begin{array}{ccc}0&0&0\\
0&1&0\\
0&0&-1\end{array}\right)
$$
And the eigenspaces of $T$ are simply $V_0=\mathbb R, V_1=\mathbb Re^t,V_{-1}=\mathbb Re^{-t}$. It is a well known fact (and I encourage you to prove it) that an invariant subspace of a diagonalizable operator is an invariant subspace if and only if it is the direct sum of some of its eigen-spaces.
(A similar result holds for non-diagonalizable operators by taking the generalized eigenspace)
I like this argument because in general if I had been given a different basis in which the tranformation is not diagonal I will immediatly think in diagonalizing the matrix and finding the eigenspaces. 
