This is inspired by the question Is Every Invariant Subspace the Kernel of an polynomial applied in the operator?, where "invariant subspace" and "polynomial in" are relative to a given linear operator$~T$ on a finite dimensional vectors space. The answer to that question is a simple "no", because of simple examples like scalar operators, which are rich in invariant subspaces but poor in polynomials. However, these are precisely the same kind of operators that are counterexamples to the in general false statement that any operator commuting with $T$ must be a polynomial in$~T$. Now it happens that for the kernel of another operator $U$ to be automatically $T$-stable, the natural sufficient condition is that $T$ and $U$ commute. So a refinement of the initial question, one that might be true, is obtained by allowing any operator that commutes with$~T$ instead of just polynomials in$~T$. Whence my actual question:
Given a linear operator $T$ on a finite dimensional $K$-vector space $V$, and a $T$-stable subspace $W$ of$~V$, does there always exist a linear operator$~U$ commuting with$~T$ such that $W=\ker U$?
This is certainly true in easy cases like when $T$ is diagonalisable with distinct eigenvalues (where all $T$-stable subspaces are sums of eigenspaces, and taking for$~U$ a product of operators $T-\lambda_i I$ will do) or at the opposite extreme scalar operators (since everything commutes with them, we can just have $U$ project parallel to$~W$ to a complementary subspace). What about the general case?
And an additional question (although I know I shouldn't be asking two questions at once): does the answer change if we allow $V$ to be infinite dimensional?