Show that if $T\in B(X)$ and $X$ is not separable, then $T$ has a nontrivial invariant subspace.
I know that $\ker (T)$ and $\operatorname{ran}(T)$ are invariant $T$-subspace. So if $\ker T\neq \{0\}$, then $T$ has a nontrivial invariant subspace. Also $1\in B(X)$ has nontrivial invariant subspaces $M_i=\operatorname{span}\{e_i\}$ where $\{e_i: I\in I\}$ is a basis for $X$. But for an operator $T$ when $\ker T= \{0\}$, I can not show it has nontrivial invariant subspace. Also I have not used non-separability of $X$ yet. Please give me a hint. Thanks so much.
Let $x$ be a non-zero element of $X$. Consider the closed linear $Y$ span of $\{T^n(x)\colon n\in \mathbb{N}\}$. Then $Y$ is a proper subspace of $X$ which is left invariant by $T$.