Artificial intelligent assistant

If a vector fulfils one condition in this theorem, does it automatically fulfil both? I have this theorem: > If $W$ is a subspace of $\mathbb{R}^n$, for any $x\in \mathbb{R}^n$ there will exist some unique $y\in W$ such that > > * $(x-y)\perp u \ \ : \ \ \forall u \in W$ > * $||(x-y)|| \le ||(x-u)|| \ \ : \ \ \forall u \in W$ > The second condition says that $y$ is the closest vector in $W$ to $x$. And clearly there is one and only one vector that fulfils such a thing. If I find a vector $y\in W$ that fulfils the second condition, does it **definitely** fulfil the first condition? If yes, does a vector that fulfil the first condition necessarily fulfil the second one? * * * Side note: since $y$ is supposed to be an unique vector, doesn't it have a name?

Yes, the first condition is implied by the second one, to see that, let $u \in W$. Then for any $t \in \mathbb R$: $\def\
orm#1{\left\|#1\right\|}\def\<#1>{\left(#1\right)}$ $$ \
orm{x-y-tu}^2 = \
orm{x-y}^2 + 2t\ \+ t^2\
orm{u}^2 =: f(t) $$ Note that $f$ has a local minimum in $t=0$ by the second condition, giving $$ 0= f'(0) = 2\ $$ Hence $x-y \mathrel\bot W$.

Now suppose the first condition holds, then we have for any $u \in W$: \begin{align*} \
orm{x-u}^2 &= \
orm{x-y+y-u}^2\\\ &= \
orm{x-y}^2 + 2\underbrace{\}_{{}=0} + \
orm{y-u}^2\\\ &\ge \
orm{x-y}^2 \end{align*} So both conditions are equivalent.

* * *

Yes, $y$ has a name, it is called the image of the orthogonal projection of $x$ onto $W$, the map $P_W \colon \mathbb R^n \to \mathbb R^n$, $P_W x = y$ is called the orthogonal projection onto $W$.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 93868d6d26b15ae13ebe730282d69912