TITLE: Invariant subspaces
QUESTION [5 upvotes]: Good morning,
Let T be a linear transformation, which acts on a vector space V, over a field F.
Let W be a sub-space  which  invariants of T, and f,g polynomials from the same field F.
I need to prove that W is invariant of g(T) and f(T)(W) invariant of g(T).
obviously, g(T) is also a linear mapping and therefore is also invariants of W as T does, I just don't know how to prove it correctly.
Have a good day.

REPLY [5 votes]: Because $W$ is a subspace of $V$, it is invariant under all the maps $m_c:V\rightarrow V$, where for each $c\in F$ the map $m_c$ is defined by $m_c(v)=cv$. By assumption, $W$ is invariant under the map $T:V\rightarrow V$. 
Hint: Show that if $W$ is invariant under two maps $C,D:V\rightarrow V$, then $W$ is invariant under $C\circ D$ and $C+D$. Then you will have that $W$ is invariant under all 
$$f(T)=a_nT^n+\cdots+a_1T+a_0=(m_{a_n}\circ T\circ\cdots\circ T)+\cdots +(m_{a_1}\circ T)+m_{a_0}.$$