projection of a vector onto a vector space

431 Views Asked by At

supppose that we have a vector space $$A=\left(\left[ \begin{array}{} x\\ y\\ w\\ z\\ \end{array} \right] : x-y+w=0 \right)$$ and we wanted to find the closest point to a vector $$x= \left[\begin{array}{} a\\ b\\ c\\ d\\ \end{array}\right] $$ I solved the problem by finding the basis of the vector space A and orthonormalizing it, then taking the projection of x onto the orthonormal basis of A which returned a vector. However I would like a second method to verify that this is in fact the closest point. Is there a way to verify whether or not my solution is correct?

1

There are 1 best solutions below

3
On

Yes: if $p\in A$, then $p$ is the point of $A$ closest to $x$ if and only if $x-p$ is orthogonal to every element of $A$.

For instance, the solution of your problem is$$p=\begin{bmatrix}\frac13(2a+b-c)\\\frac13(a+2b+c)\\\frac13(-a+b+2c)\\d\end{bmatrix}$$and$$x-p=\begin{bmatrix}\frac13(a-b+c)\\\frac13(-a+b-c)\\\frac13(a-b+c)\\0\end{bmatrix}.$$And, indeed, if $x$, $y$, $w$, and $z$ are such that $x-y+w=0$, then$$\begin{bmatrix}x\\y\\w\\z\end{bmatrix}.(x-p)=0.$$