TITLE: Kernel of $T$ is closed iff $T$ is continuous
QUESTION [10 upvotes]: I know that for a Banach space $X$ and a linear functional $T:X\rightarrow\mathbb{R}$ in its dual $X'$ the following holds:
\begin{align}T \text{ is continuous } \iff \text{Ker }T \text{ is closed}\end{align}
which probably holds for general operators $T:X\rightarrow Y$ with finite-dimensional Banach space $Y$. I think the argument doesn't work for infinite-dimensional Banach spaces $Y$. Is the statement still correct? I.e. continuity of course still implies the closedness of the kernel for general Banach spaces $X,Y$ but is the converse still true?

REPLY [4 votes]: No, this is not true. Here is a counterexample for every infinite-dimensional Banach space $Y$.
Take a discontinuous functional $\phi\in Y^*$ (this is always possible if $Y$ is infinite-dimensional, by the axiom of choice). Let $A:=\ker \phi$, and $B$ any algebraic supplement. Note that $A$ is non-closed, and $B$ is closed in view of $\dim B=\text{codim} A=1$.
Consider the projection $p:Y\to Y$ onto $A$, w.r.t. the algebraic direct sum decomposition $Y=A\oplus B$. Now $\ker p=B$ is closed, but $\ker(1-p)=A$ is not, so $p$ is discontinuous.