# For sub-space $U$, find $u \in U$ such that $\|v-u\|<\|v-w\|$ for every $w\in U$, and $w\neq u$

Let $U$= $Span$ {$(0,0,1,0),(1,1,1,-1),(1,3,1,1)$} a sub-space in $\mathbb R^4$. let $v=(1,0,1,0)\in \mathbb R^4$. I need to find vector $u \in U$ such that $\|v-u\| < \|v-w\|$ for every $w\in U$, and $w\neq u$.

What should I do in this kind of question?

From what I know I can find the distance by calculating $\left\|\frac{\langle w,v\rangle w}{\lVert w\rVert^2}\right\|$ where $\mathrm{span}(w)=U^\perp$.

Thanks again

-
Hint: Look at the projection of $v$ on $U$ and argue. – user17762 Aug 18 '11 at 10:48
Just a very simple minded comment: Do you see that $u$ is the point in $U$ closest to $v$? Do you see why $v-u$ must be orthogonal to $U$? Can you use this to determine $u$? – t.b. Aug 18 '11 at 10:48
Yeah I can see why $v-u$ is orthogonal to you, simply by the orthonoraml basis. Is the answer is :$\left\lVert\frac{\langle w,v\rangle w}{\lVert w\rVert^2}\right\rVert$ where $\mathrm{span}(w)=U^\perp$ without the calculating the norm? – user6163 Aug 18 '11 at 10:53
@Nir: $w$ is a linear combination of the three vectors that span $U$ i.e. $w = a_1 u_1 + a_2 u_2 + a_3 u_3$. Now you want to minimize $\left\| w- v\right\|$. Can you do it from here? – user17762 Aug 18 '11 at 10:54
No, I don't think I fully get it. – user6163 Aug 18 '11 at 10:57

let me try to solve this problem in a practical way. define $U = span\{u_{1},u_{2},u_{3}\}$, corresponding to the values given in your question. then there exist $u = a u_{1} + b u_{2} + c u_{3}$ such that $v-u \bot U$ ($\mathbb{R}^{4}$ is an inner product space, and orthogonality between x and y is difined by $< x,y> = 0$).

so in the basis form of vector (i assume the basis used in your question statement is orthogonal already)

$$<\begin{bmatrix} 1\\ 0\\ 1\\ 0\end{bmatrix} -a \begin{bmatrix} 0\\ 0\\ 1\\ 0\end{bmatrix} -b\begin{bmatrix} 1\\ 1\\ 1\\ -1\end{bmatrix} -c\begin{bmatrix} 1\\ 3\\ 1\\ 1\end{bmatrix} ,n> = 0$$

for any $n$ in span U. substitute $u_{1},u_{2},u_{3}$ into above equation. you will find a system of 3 equations with 3 unknowns. it should be solvable.

For example, $<\begin{bmatrix} 1-b-c\\ 3-b-3c\\ 1-a-b-c\\ 1+b-c\\ \end{bmatrix}, \begin{bmatrix} 0\\ 0\\ 1\\ 0\end{bmatrix} > =1-a-b-c=0$

Eventually, $$\begin{matrix} 1-a-b-c =0\\ 2-a-4b-4c = 0\\ 2-a-4b-12c = 0 \end{matrix}$$

-
eerrrrrr....this answer basically is a duplication of @TheoBuehler 's comment...I haven't seen it until I posted the answer. – newbie Aug 18 '11 at 12:44
no problem, you explained it well, certainly better than me :) – t.b. Aug 18 '11 at 12:47
I should replace $n$ in $u_1,u_2$ or $u_3$? the equations are not solvable.. – user6163 Aug 18 '11 at 13:57
@Nir Yes, replace $n$ by $u_{i},i = 1,2,3$. I have the answer for $(a,b,c)$ is $(\frac{2}{3},\frac{1}{3},0)$. You may check if it is correct. Do you know how the inner product is defined in Euclidean space? – newbie Aug 18 '11 at 14:06
@newbie: Yeah, Thanks! – user6163 Aug 18 '11 at 14:24

Hint:

Let $v_1, \ldots v_n$ be vectors in an $n$-dimensional vector space with positive definite scalar product. Suppose these vectors are mutually perpendicular and such that $||v_i|| \neq 0$ for all $i$. Let $v$ be an element of $V$, and let $c_i$ be the component of $v$ along $v_i$. Let $a_1 \ldots a_n$ be numbers. Then

$||v - \sum c_kv_k|| \leq ||v - \sum a_kv_k||$

where $k$ runs from $1$ to $n$. Recall that the component $v$ along $v_i$ is the quantity

$\frac{\langle v_i,v \rangle}{ \langle v,v \rangle}$.

What is the condition for equality? Intuitively this theorem tells you that the closest linear approximation of a vector $v$ is given by the linear combination $v_1 \ldots v_n$ with coefficients defined as above.

To prove this theorem: Add and subtract the term $\sum a_kv_k$ inside $||v - \sum c_kv_k||$. Note that $v - \sum c_kv_k$ is orthogonal to every $v_k$. Finally apply the Pythagorean theorem. Finally use the fact that the scalar product is positive definite.

-