Are these hyperplanes close to each other? Let $X$ be a real Banach space and $f:X\to\mathbb{R}$ be continuous and linear. Suppose that $(r_n)$ is a sequence of real numbers converging to some $r>0$. Let $$H=\{x\in X:f(x)=r\},$$ $$H_n=\{x\in X:f(x)=r_n\}.$$
In essence, I would like it if these hyperplanes were close to each other to prove something else. So, my question is:

Let $z\in H$. Is it true that $d(z,H_n)\to 0$?

To me, this is something that "should" happen as in $\mathbb{R}^n$ it is quite obvious that these planes are getting close to each other but I'm unable to prove it yet.
If $x\in H_n$, how can I find out how small $\left\|{x-z}\right\|$ is? Do we maybe need some stronger hypothesis?
Thank you.
 A: Simply consider $x_n:=\frac{r_n}r z$, these satisfy $x_n\in H_n$ and clearly $\|z-x_n\|\to 0$, so
$$0\le\ d(z,H_n)=\inf_{x\in H_n}d(z,x) \le d(z,x_n)\to 0\,.$$
A: A neat formula that helps a lot in many similar problems is given as follows:
Lemma.  If $f$ is a nonzero continuous linear functional on a Banach space $X$, and
$
  H=\{x\in X: f(x)=r\},
  $
where $r$ is any given scalar, then
$$
  \text{dist}(y,H) = {|f(y)-r| \over \Vert f\Vert },
  \ \ \text{for every }y\in X.$$
Proof.  Given any $x$ in $H$ we have
$$
  |f(y)-r| =
  |f(y)-f(x)| =
  |f(y-x)| \leq 
  \Vert f\Vert \Vert y-x\Vert ,
  $$
from where it follows that
$$
  {|f(y)-r| \over \Vert f\Vert } \leq \Vert y-x\Vert .
  $$
Taking the infimum as $x$ range in $H$ we then deduce that
$$
  {|f(y)-r| \over \Vert f\Vert } \leq   \text{dist}(y,H).
  $$
In order to prove the reverse inequality, take any $\varepsilon >0$ and choose $u$ in $H$ with $\Vert u\Vert <1+\varepsilon $, and $\Vert f(u)\Vert =\Vert f\Vert $.
Setting
$$
  x=  y-{f(y)-r \over \Vert f\Vert }u,
  $$
we see that $f(x)=r$, so $x\in H$, and
$$
  \text{dist}(y,H) \leq  \Vert y-x\Vert  =   {|f(y)-r| \over \Vert f\Vert } \Vert u\Vert  <  {|f(y)-r| \over \Vert f\Vert } (1-\varepsilon ),
  $$
so the desired inequality follows since $\varepsilon $ is arbitrary.
