Property of orthogonal projection onto a closed convex set in euclidean $\mathbb{R}^{n}$

Let us consider a Hilbert space $$\mathbb{R}^{n}$$ equipped with a dot product $$x\cdot y = \sum_{i=1}^{n}x_{i}y_{i}$$. Next, let $$S$$ be a convex closed subset of $$\mathbb{R}^{n}$$ and let $$s$$ be a projection of $$x$$ onto $$S$$.

First, from the property of orthogonal projection, it follows that $$\sum_{i=1}^{n}x_{i}s_{i} = \sum_{i=1}^{n}s_{i}s_{i}$$

Next, let $$y$$ be some vector from $$S$$. What is the relation between $$\sum_{i=1}^{n}x_{i}y_{i}$$ and $$\sum_{i=1}^{n}s_{i}y_{i}$$?

Is it always $$\sum_{i=1}^{n}x_{i}y_{i} \leq \sum_{i=1}^{n}s_{i}y_{i}$$ ?

The difference in the two terms you are trying to compare is $$(x - s) \cdot y = \sum_{i=1}^n (x_i - s_i) y_i$$ If $$x = s$$ (that is, if $$x \in S$$), then it is always zero and the two terms are always equal. If they are different, this can have any value by varying $$y$$. It can be positive by setting $$y = x - s$$ or it can be negative by setting $$y = -(x - s)$$.

• wait... would $y=x-s$ belong to S?
– LrM
Mar 29, 2021 at 17:46
• Missed the fact that $y \in S$ but the point still stands. If $S$ is a ball centered at the origin, then some multiple of $x-s$ and $-(x-s)$ will be in $S$.
– MBW
Mar 30, 2021 at 14:37
• @LrM I also just realized that there is something you can say about $(x - s) \cdot (y - s)$ which is that $(x - s) \cdot (y - s) \leq 0$
– MBW
Mar 30, 2021 at 15:57
• well, the inequality in the last message is a property of projection onto any convex closed set. This is not what is in the question.
– LrM
Mar 31, 2021 at 0:24