Polynomial of linear transformation

Let $V$ be a finite-dimensional vector space and let $T : V \to V$ be a linear transformation. Let $U, W\subseteq V$ be $T$-invariant subspaces of $V$, such that $U\oplus W=V$. Let $q\in \mathbb{F}[x]$ be a polynomial. Given that $U$ is a sub-space of $\mbox{im }q(T)$, show that $\ker q(T)$ is a sub-space of $W$.

I tried to show the $U \cap \ker q(T)= \{0\}$. Also, solving directly for the definitions. I also know that every $T$-invariant subspace is also $q(T)$-invariant. Any help would be very helpful.

Since $q(T)|_U$ is surjective and $U$ is finite-dimensional, $q(T)|_U$ is bijective. Therefore, its kernel is $\{0\}$.
So, if $v\in\ker q(T)$, write $v$ as $u+w$, with $u\in U$ and $w\in W$. Now, $$T(u+w)=0\iff q(T)(u)=q(T)(-w).$$But $q(T)(-w)\in W$ (because $W$ is invariant) and $q(T)(-w)\in U$ (because $\operatorname{im}q(T)\subset U$). Therefore, $q(T)(-w)=0$, and so $q(T)(u)=0$. But $q(T)(u)=0\implies u=0$. Therefore, $v=0+w=w\in W$.
• Oops. forgot to mention that $V$ is of finite dimension. Apologies. – user558964 May 4 '18 at 21:04
• I am missing one thing, why is $q(T)$ surjective? – user558964 May 4 '18 at 21:21
• I see why $q(T)(W) \subseteq W$ but why does $q(T)(W) = W$? – user558964 May 4 '18 at 21:23