if $E^2=E$, then $\text{Im}\;E\subset\left(\ker E+(\ker E)^\perp\right)$? Notation:
$V$ is a infinite-dimensional inner product space;
$\langle\cdot,\cdot\rangle$ is the inner product of $V$;
$E:V\rightarrow V$ is a linear map;
$\text{Im}=\{E(v):v\in V\}$;
$\ker E=\{z\in V:E(z)=0\}$;
$(\ker E)^\perp=\{x\in V:\langle x,y\rangle=0 \;\forall y\in\ker E\}$.
Prove or give a couterexample: if $E^2=E$, then $\text{Im}\;E\subset\left(\ker E+(\ker E)^\perp\right)$
Can you help me? Thanks!
 A: Note: if $V$ is complete (=Hilbert), then $V=F\oplus F^\perp$ for every closed subspace $F$. If $V$ is not complete, this is false.

If $E$ is bounded, then $\ker E$ is closed. So if $V=H$ is a Hilbert space, then $H=\ker E\oplus (\ker E)^\perp$ contains anything. In particular $\mbox{im } E$. And the result holds trivially. 
  Here are two counterexamples showing that the property fails if you remove one of the two assumptions: 1) $E$ is bounded 2) $V=H$ is Hilbert.

Counterexample 1: even if $V=H$ is Hilbert, we can find $E$ not bounded for which the property fails.
Let $H$ be a separable infinite-dimensional Hilbert space with orthonormal basis $\{e_n\,;\,n\geq 1\}$.
Consider $K:=\mbox{span}\{e_n\,;\,n\geq 1\}$ the vector subspace spanned by the basis. Then $K$ is dense in $H$, but not closed, i.e. $K\subsetneq \overline{K}=H$. Note that $K^\perp =\overline{K}^\perp=H^\perp=\{0\}$. 
Now take $L$ any algebraic complement of $K$ in $H$, i.e. $K\oplus L=H$.Then define $E$ by the identity on $L$ and $0$ on $K$. So $E$ is a linear idempotent in $L(H)$ with $\ker E=K$ and $\mbox{im} E=L$. 
If we had $\mbox{im} E\subseteq \ker E+\ker E^\perp=K+K^\perp=K=\ker E$, we would have $E=E^2=0$. And since $L=\mbox{im} E\neq \{0\}$ (far from that: it has uncountable dimension...), $E\neq 0$ is a counterexample.
Counterexample 2: we can find $E$ bounded for which the property fails on $V$ non Hilbert. 
Wihtout loss of generality, we can assume that $V=K$ dense in $H$ as above. Now fix $x_0\in H\setminus K$ and consider
$$
K_0=\{y\in K\,;\,(x_0,y)=0\}=x_0^\perp\cap K.
$$
By continuity of $(x_0,\cdot)$, $K_0$ is closed in $K$. And with a bit of work, one can show that it is dense in $x_0^\perp$. It follows that $K_0^\perp=(x_0^\perp)^\perp=\mathbb{C}x_0$ whence $K_0^\perp\cap K=\{0\}$. Now we can define a bounded linear idempotent $E$ on $K$ with $\ker E=K_0$. Just take $y_0$ such that $(x_0,y_0)=1$ and set $Ex=(x,x_0)y_0$. Then clearly $\mbox{im} E=\mathbb{C}y_0$ is not contained in 
$$\ker E+(\ker E)^\perp=K_0\oplus K_0^\perp\cap K=K_0=\ker E.$$  
