# closed subspace $Y$ implies existence of non-zero linear functional $g$ such that $Y \subset \ker(g)$

I am working on an exercise and I am not sure if I am on the right track, so if anyone could give some hints I would be grateful. The exercise is

If $Y$ is a proper closed subspace of $X$, prove that there is a non-zero linear functional $g \in X'$ such that $Y \subset \ker(g)$.

What I have done so far:

I am trying to use the following theorem to prove this statement:

Assume that there is an $x \in X$ such that \begin{align*} \delta = \inf_{w \in W} \|x - w\| >0, \end{align*} then there exists $f \in X'$ such that $\| f \| = 1$, $f(x) = \delta$ and $f(w) = 0$ for all $w \in W$.

It is clear to me that since $Y$ is a proper subspace and is closed, all $x \in X \setminus Y$ have $\| x - y \| >0$, but I cannot find a specific $x \in X$ that demonstrably has this property...

Any assistance would be very welcome. Cheers!

-

Pick any $x \in X \setminus Y$. Suppose $$0 = \inf_{y \in Y} \| x - y\|.$$ From here, you get a contradiction to the closedness of $Y$.