Orthogonality Relations Exercise, Brezis' Book Functional Analysis I studying Brezis' book and I have somes partial solutions of the exercise $1.17.$
Let be $E$ a normed space and $f\in E^*$ be a linear functional nonzero. Consider
the set  $M=[f=0]$ given by
$$M=\{x\in E \ : \ \langle f,x\rangle = 0 \}.$$
Here, $\langle f,x\rangle$ denote $f(x)$ and note that $M$ is just $\ker f$.

Dertemine $M^\perp.$

By definition 
$$M^\perp=\{g\in E^* \ : \ \langle g,x\rangle=0, \forall x\in M \}.$$
So, the first doubt is: $M^\perp$ is just
$$M^\perp=\{g\in E^* \ : \ \ker f \subset \ker g  \} ?$$

Show that $\forall x\in E$, we have $d(x,M)=\inf_{y\in M}{\|x-y\|}=\frac{|\langle f,x\rangle|}{\|f\|}.$

Since $y\in M$, $|\langle f,x\rangle|=|\langle f,x-y\rangle|\le \|f\|\|x-y\|$. Then
$$\frac{|\langle f,x\rangle|}{\|f\|}\le d(x,M).$$
How can I show the equality? I know that since $\{x\}$ is a compact set and $M$ is a closed subspace of $E$, there is $y_0\in M$, such that $d(x,M)=\inf_{y\in M}{\|x-y\|}=\|x-y_0\|,$ but I don't know if that it is a help.
I tried to show that $\forall \varepsilon >0$, there is $z\in M$ such that
$$\|x-z\|<\frac{|\langle f,x\rangle|}{\|f\|}+\varepsilon,$$
but I could not. The last doubt is:

Let be $E=\{u\in C([0,1],\Bbb{R}) \ : \ u(0)=0\}$ and $f\in E^*$ given for each $u\in E$ by
  $$\langle f,u\rangle = \int_0^1 u(t)dt.$$ Show that if $u\in E-M$ then $d(u,M)$ is never achieved.

For that, I tried something by absurd method but I found nothing. Can someone give a little help? Thanks.
 A: You have $M=\mathcal{N}(f)$. Then $g\in M^{\perp}$ iff $\mathcal{N}(f)\subseteq\mathcal{N}(g)$. Suppose $f(u)\ne 0$ for some $u\in X$.Then $f\left(y-\frac{f(y)}{f(u)}u\right)=0$ holds for all $y\in X$, which gives
$$
              0= g\left(y-\frac{f(y)}{f(u)}u\right)=g(y)-\frac{f(y)}{f(u)}g(u),\;\;\;y\in X \\
                  \implies g = \frac{g(u)}{f(u)}f.
$$
Therefore $M^{\perp}$ is the linear subspace of $E^{\star}$ spanned by $f$. And,
\begin{align}
       \mbox{dist}(x,M) & =\sup_{g\in M^{\perp},\|g\|=1}|g(x)| \\
   & = \sup_{g\in M^{\perp},g\ne 0}\frac{|g(x)|}{\|g\|}
     = \frac{|f(x)|}{\|f\|}.
\end{align}
For the last part, please explain your use of $x$ and $u$; I think there must be a typo.
Addressing your question in the comments: If $M^c$ is the closure of $M$, then
\begin{align}
    \mbox{dist}(x,M) & =\mbox{dist}(x,M^c) \\
       & = \|x+M^c\|_{X/M^c} \\
       & = \sup_{y^{\star}\in (X/M^c)^{\star},\|y^{\star}\|=1}|y^{\star}(x+M^c)| \\
    & = \sup_{g\in X^{\star}\cap M^{\perp},\|g\|=1}|g(x)| \\
    & = \sup_{g\in X^{\star}\cap M^{\perp},g\ne 0}\frac{|g(x)|}{\|g\|}
\end{align}
If $\mbox{dist}(x,M)\ne 0$, then $x\notin M$, which means $f(x)\ne 0$. Therefore, $g \in M^{\perp}$ is $g=\frac{g(x)}{f(x)}f$ as explained above, where it was shown that an equality holds for all $u$ for which $f(u)\ne 0$.
A: We can show the inequality $d(x,M)\leqslant\frac{f(x)}{\|f\|}$ by an alternative way. For any fixed $u\in E\setminus M$, we have that $$y_x:=x-\frac{f(x)}{f(u)}u\in M,$$ hence $$d(x,M)=\inf_{y\in M}\|x-y\|\stackrel{(y_x\in M)}\leqslant\|x-y_x\|=\left\|x-x-\frac{f(x)}{f(u)}u\right\|=\frac{|f(x)|}{|f(u)|}\|u\|,$$ which implies $$\frac{|f(u)|}{\|u\|}\leqslant\frac{|f(x)|}{d(x,M)},\quad\forall u\in E\setminus\{0\}.$$
Remark. Of course, the above inequality is obtained by taking $u\in E\setminus M$, however it still holds if $u\in M$.
It follows from the above inequality that $$\|f\|=\sup_{u\in E\setminus\{0\}}\frac{|f(u)|}{\|u\|}\leqslant\frac{|f(x)|}{d(x,M)}\quad\Longrightarrow\quad d(x,M)\leqslant\frac{|f(x)|}{\|f\|}.$$
