Prove that $\inf\limits_{z \in S^{\perp}} \| x - z \| = \sup \left \{ \lvert \langle x , y \rangle \rvert\ \big |\ y \in S, \|y \| \leq 1 \right \}.$

Let $$H$$ be a Hilbert space and $$S$$ be a subspace of $$H.$$ Let $$x \in H$$ and $$\left \|x \right \| = 1.$$ Prove that $$\inf\limits_{z \in S^{\perp}} \left \|x - z \right \| = \sup \left \{\left \lvert \left \langle x , y \right \rangle \right \rvert\ \big |\ y \in S, \left \|y \right \| \leq 1 \right \}.$$

My attempt $$:$$ Let $$L = \inf\limits_{z \in S^{\perp}} \left \|x - z \right \|$$ and $$M = \sup \left \{\left \lvert \left \langle x , y \right \rangle \right \rvert\ \big |\ y \in S, \left \|y \right \| \leq 1 \right \}.$$ If $$x \in S^{\perp}$$ then clearly $$L = 0$$ and $$M = 0$$ (because if $$x \in S^{\perp}$$ then for any $$y \in S$$ we have $$\left \langle x,y \right \rangle = 0$$). Also if $$x \in S$$ then we have \begin{align*} L & = \inf\limits_{z \in S^{\perp}} \sqrt {\|x\|^2 + \|z\|^2} \\ & = \inf\limits_{z \in S^{\perp}} \sqrt {1 + \|z\|^2} \\ & = \sqrt {1 + \inf\limits_{z \in S^{\perp}} \|z\|^2} \\ & = 1 \end{align*} and for all $$y \in S$$ with $$\|y\| \leq 1$$ we have by Cauchy Schwarz's inequality $$\left \lvert \langle x,y \rangle \right \rvert \leq \|x\| \|y\| \leq 1.$$ This shows that $$M \leq 1.$$ Also since $$x \in S$$ with $$\|x\| = 1$$ we have by taking $$y = x$$ $$\langle x,x \rangle = \|x\|^2 = 1.$$ So $$M = 1.$$ Therefore $$L = M$$ holds if $$x \in S \cup S^{\perp}.$$ Now $$H = S \oplus S^{\perp}.$$ So every element of $$H$$ can be written as $$x = u + v,$$ where $$u \in S$$ and $$v \in S^{\perp}.$$ For this case \begin{align*} \|(u+v) - z \|^2 & = \|u+v\|^2 + \|z\|^2 - \langle v , z \rangle - \langle z , v \rangle \\ & = \|u+v\|^2 + \|z\|^2 - 2 \mathfrak {R} \left ( \langle v,z \rangle \right ) \\ & \geq \|u+v\|^2 + \|z\|^2 - 2 \left \lvert \langle v , z \rangle \right \rvert \\ & \geq \|u+v\|^2 + \|z\|^2 - 2\|v\| \|z\| \\ & = \left (\|u+v\|^2 - \|v\|^2 \right ) + \left (\|z\| - \|v\| \right )^2 \\ & \geq \|u+v\|^2 - \|v\|^2 \end{align*} So by taking $$z = v$$ we have $$L = \sqrt {\|u+v\|^2 - \|v\|^2} = \sqrt {\|u\|^2 + 2 \mathfrak {R} \langle u,v \rangle} = \|u\|\ \ (\text {since}\ u \perp v).$$ Now for any $$y \in S$$ with $$\|y\| \leq 1$$ we have \begin{align*} \left \lvert \langle u + v , y \rangle \right \rvert & = \left \lvert \langle u , y \rangle + \langle v , y \rangle \right \rvert \\ & = \left \lvert \langle u,y \rangle \right \rvert\ \ \ \ \ \ \ \ (\text {Since}\ v \perp y ) \\ & \leq \|u\| \|y\| \\ & \leq \|u\| \end{align*} Now if $$u = 0$$ then $$x = v \in S^{\perp}$$ in which case we have already proved that $$L = M.$$ So WLOG we may assume that $$u \neq 0.$$ Then by taking $$y = \dfrac {u} {\|u\|}$$ we have $$M = \|u\|.$$ So in this case also we have $$L = M,$$ as required.

QED

Does my proof hold good? Please check it.

EDIT $$:$$ I don't think that what I did is correct. Because Hilbert space can't have such decomposition unless $$S$$ was given to be closed.

• Note that $\sup \left \{\left \lvert \left \langle x , y \right \rangle \right \rvert\ \big |\ y \in S, \left \|y \right \| \leq 1 \right \}=\sup \left \{\left \lvert \left \langle x , y \right \rangle \right \rvert\ \big |\ y \in \overline S, \left \|y \right \| \leq 1 \right \}$, where $\overline S$ denotes the closure of $S$ in $H$.
– User
Sep 10 '20 at 18:29
• To prove this note that $\sup \left \{\left \lvert \left \langle x , y \right \rangle \right \rvert\ \big |\ y \in S, \left \|y \right \| \leq 1 \right \}\leq \sup \left \{\left \lvert \left \langle x , y \right \rangle \right \rvert\ \big |\ y \in \overline S, \left \|y \right \| \leq 1 \right \}$ as supremum of larger set is larger.
– User
Sep 10 '20 at 18:29
• For other direction, choose $\varepsilon>0$, and then find $z\in\overline S$ with $\sup \left \{\left \lvert \left \langle x , y \right \rangle \right \rvert\ \big |\ y \in \overline S, \left \|y \right \| \leq 1 \right \}-\varepsilon<\left \lvert \left \langle x , z \right \rangle \right \rvert=\lim\left \lvert \left \langle x , z_n \right \rangle \right \rvert\leq \sup \left \{\left \lvert \left \langle x , y \right \rangle \right \rvert\ \big |\ y \in S, \left \|y \right \| \leq 1 \right \}$, where $S\ni z_n\to z\in\overline S$. Since, $\varepsilon>0$ is arbitrary, we are done.
– User
Sep 10 '20 at 18:29
• So, without loss of generality, you may assume $S$ to be closed as $\big(S^\perp\big)^\perp=\overline S$ for a subspace $S$. math.stackexchange.com/questions/1761685/…
– User
Sep 10 '20 at 18:33
• While writing down a proof for this in the entrance do I have to write down the proof of $\left (S^{\perp} \right )^{\perp} = \overline {S}$ or it is fine to just mention the result and proceed? I'm asking this question because of time bounds @Sumanta. Sep 10 '20 at 19:36

It's not clear why you first take the case $$x\in S$$, as it is fairly particular.
When $$x\in S^\perp$$, one gets directly that $$L=M=0$$. So we may assume $$x\not\in S^\perp$$. Also, neither $$L$$ nor $$M$$ change if we replace $$S$$ with its closure, so we may assume that $$S$$ is closed.
What you have is, since $$H=S\oplus S^\perp$$, that $$x=x_S+x_{S^\perp}$$. As $$S^\perp$$ is a subspace, for $$z\in S^\perp$$ we have $$x-z=x_S-(z-x_{S^\perp})$$. Then $$L=\inf\{\|x_s-z\|:\ z\in S^\perp\}=\|x_S\|,$$ since $$\|x_s-z\|^2=\|x_s\|^2+\|z\|$$ for any $$z\in S^\perp$$. Now, for any $$y\in S$$ with $$\|y\|=1$$, we have $$|\langle x,y\rangle|=|\langle x_S,y\rangle|\leq\|x_S\|\,\|y\|=L,$$ so $$M\leq L$$. And $$M\geq\Bigg|\bigg\langle x,\frac{x_S}{|x_S\|}\bigg\rangle\Bigg|=\|x_S\|=L.$$
• I have started with the the easier subcases just to warm up. No other intention was there. BTW $H$ can't have a decomposition as $S \oplus S^{\perp}$ unless $S$ was a closed subspace of $H$ which I clearly mentioned in my edit section. One needs to show that there will be no harm in considering $S$ to be closed subspace of $H$ as Sumanta has rightly pointed out in his comment above. Sep 11 '20 at 4:46
• Another remark I want to make which is $:$ You can't divide any vector by $\|x_S\|$ to make it a unit vector unless you know well in advance that $\|x_S\| \neq 0.$ For $x_S = 0$ you need to go back to one of the fairly particular cases I have considered namely the case when $x \in S^{\perp}.$ (See the last paragraph of my proof) Please feel free to correct me if I'm wrong. Sep 11 '20 at 4:58
• You are right, but all one needs is to mention, as you did, that $L=M=0$ in that case. As for $S$ closed or not I missed that, but neither $L$ nor $M$ change when you replace $S$ with its closure. Sep 11 '20 at 5:46
• Yeah one needs to show that WLOG we may assume that $S$ is closed. Thank you so much for your prompt response. Accepted your answer. Sep 11 '20 at 6:04