# Corollary of the Hahn Banach theorem

I want to prove the following corollary of the Hahn-Banach theorem.

Let $$X$$ be a normed space. For every closed linear subspace $$Y\subseteq X$$ and $$x\in X-Y$$, there exists $$x'\in X$$ such that $$x'|Y=0$$ and $$x'(x)\neq 0$$. My plan was as follows. Consider the linear subspace $$M:=\{Y+\lambda x\,\big|\,\lambda\in\mathbb{K}\}$$ and define $$f:M\to\mathbb{K}$$ by $$f(y+\lambda x_0)=\lambda$$. Then, $$f$$ is clearly linear and $$f|Y=0$$. I could then use the normed version of the Hahn-Banach theorem to extend $$f$$ to $$x'\in X'$$ such that $$x'|M=f$$. However, I need boundedness of $$f$$ and that is where I come into problems, I want to calculate

$$|f|_{op}=\sup\{|f(y+\lambda x_0)|\,\big|\,||y+\lambda x_0||\leq 1\}$$ but I don't know how to show this is finite, I guess it has to do with closedness of $$Y$$. Any help would be appreciated.

Another option I had was projecting down to the quotient space, which is a normed space since $$Y$$ is closed, but I get stuck in this way as well.

Here's a minor modification of your first approach. Let $$d:= dist(x,Y)=\inf_{y \in Y}\|x-y\|$$. Since $$Y$$ is closed and $$x \not\in Y$$, we have $$d>0$$. Now define $$M$$ as you did, but let $$f:M \to \Bbb{K}$$ by given by $$f(y + \lambda x)=\lambda d$$. It's clear that $$f$$ is linear. To check that $$f$$ is bounded, suppose first that $$\lambda=0$$. Here $$|f(y)|=0 \leq \|y\|$$ Now, if $$\lambda \neq 0$$, we have $$|f(y+\lambda x)| = |\lambda|d=|\lambda|d \frac{\|y+\lambda x\|}{\|y+\lambda x\|} = \frac{d\|y+\lambda x\|}{\|(y/\lambda)+x\|} \leq \|y+\lambda x\|$$ where the inequality follows from definition of $$d$$. Thus, $$f$$ is indeed bounded, so you can proceed as usual to get $$F: X \to \Bbb{K}$$ so that $$F|_{M}=f$$. This gives of course that $$F(y)=0$$ for any $$y$$ in $$Y$$ and that $$F(x)=d \neq 0$$.