1

Let $W=span\lbrace\frac{1}{√2}(1,-1,0,0),\frac{1}{√2}(0,0,1,1)\rbrace$ be a subspace of the Euclidean space $\mathbb R^4$. What must be the distance from the point $(1,1,1,1)$ to the subspace $W$?

Clearly, the subspace $W$ has dimension $2$ and the basis vectors are orthogonal too but I still dn't know how to proceed to find $W$ and then the distance?

Any hints appreciated.

Nitin Uniyal
  • 7,946
  • Hint: Think about what the Gram-Schmidt process does at each step. – amd Oct 28 '16 at 18:47
  • @amd...it is used to obtain orthogonal basis, but still I am stuck. – Nitin Uniyal Oct 29 '16 at 01:02
  • @mathlover You have orthogonal basis for $W$ at the start (two orthogonal unit vectors), G-S is not needed here. It would be needed if vectors $v_1,v_2$ were not orthogonal. – Widawensen Oct 29 '16 at 03:12
  • @Widawensen Both of you are missing the point. I’m not suggesting that you use G-S per se (though you in fact performed one iteration of that process in your answer). Instead, think about the relationship of the vector that G-S spits out at each step to the space spanned by the basis vectors generated up to that point, and how that might relate to finding the distance between them. – amd Oct 29 '16 at 06:09
  • @amd o.k G-S can be educational as it is based in reality on orthogonal projections as in my solution .. Is my proposal of solution correct from your point of view? – Widawensen Oct 29 '16 at 06:13
  • @Widawensen In a somewhat roundabout way. Constructing a projection matrix is a bit of a digression since the goal is to find the orthogonal rejection of a single vector. – amd Oct 29 '16 at 06:16
  • @amd In this case projection matrix is a rather simple so it is not a very great effort to calculate it with the general formula.. – Widawensen Oct 29 '16 at 06:23
  • @Widawensen I don’t see a compelling reason to introduce it at all. – amd Oct 29 '16 at 06:25
  • @amd For me it is the most concise way of general solution.. just two lines of calculations... – Widawensen Oct 29 '16 at 06:31
  • @Widawensen Concise in notation, perhaps, but over twice as many arithmetic operations than doing it directly. Just setting up the matrix itself is more work. Besides that, it appears to me from the OP’s comments that he didn’t really understand the answer. – amd Oct 29 '16 at 17:40
  • @amd It's interesting that whenever I'm using this formula I meet with some kind of resistance, once I was even downvoted for its use in other question, strange enough because formula is concise, universal and easy to interpret... – Widawensen Oct 30 '16 at 06:13
  • @Widawensen :shrug: Perhaps it’s not this formula per se, but your presentation of it (“I dn’t understand your answer.”) If a questioner doesn’t understand how to approach the problem in the first place, a concise, universal formula might not be the best way to go. – amd Oct 31 '16 at 03:34

1 Answers1

0

IF
$W=span\lbrace{v_1},{ v_2}\rbrace$ where unit vectors $v_1, v_2$ are orthogonal
THEN
matrix $P=v_1{v_1}^T+v_2{v_2}^T$ is projecting point $A$ into $W$ as a point $A_W$.
Having two points finally we can calculate distance $AA_W$, because vector $r_{AA_w}$ is orthogonal to this space.

To prove this it can be noticed that $r_{A_w}=Pr_A$ so $r_{AA_w}= r_A - r_{A_w} = (1-P)r_A$ and this vector is orthogonal to $Pr_{A}$ (projection of point $A$) because $P(1-P)=0$. Distance $AA_W$ is equal to $\Vert{r_{AA_w}}\Vert$.

In this case $r_{A_W}={\begin{bmatrix} 0.5 & -0.5 & 0 & 0 \\ -0.5 & 0.5 & 0 & 0 \\ 0 & 0 & 0.5 & 0.5 \\ 0 & 0 & 0.5 & 0.5 \\ \end{bmatrix}} {\begin{bmatrix} 1 \\ 1 \\ 1 \\ 1 \\ \end{bmatrix}}={\begin{bmatrix} 0 \\ 0 \\ 1 \\ 1 \\ \end{bmatrix}}$

Widawensen
  • 8,172
  • Widawensen..I dn't understand your answer. Please elaborate. – Nitin Uniyal Oct 29 '16 at 01:06
  • @mathlover I've added some more detailed explanations.. – Widawensen Oct 29 '16 at 03:00
  • @Widawensen...as you said, $P=||v_1||^2+||v_2||^2=2$ is a real scalar which gives the point $A_W=(2,2,2,2)$. Am I correct? – Nitin Uniyal Oct 29 '16 at 04:43
  • @mathlover As I see you want me to make all calculations.. From my calculations $ A_w = [ 0\ 0\ 1\ 1]^T$. Just calculate matrix $P$ with my formula and transform vector describing point $A$ by it. – Widawensen Oct 29 '16 at 06:19
  • @mathlover And Mathlover,be careful ...$vv^T$ is the matrix (dim 4x4 in your case ) , not a scalar.. don't mix it with the scalar product.. – Widawensen Oct 29 '16 at 06:24
  • Thanks Widawensen..I understand now. – Nitin Uniyal Oct 29 '16 at 07:58
  • @Widawensen...What is matrix $P$ if subspace $W$ is 3-dimensional? – Nitin Uniyal Oct 29 '16 at 08:04
  • @mathlover Constructing a projection matrix isn’t essential. You’re computing the length of the component of $w=(1,1,1,1)$ that’s orthogonal to the subspace by subtracting its orthogonal projection onto that space from it. That can be computed directly as $w-(v_1^Tw)v_1-(v_2^Tw)v_2$. For a three-dimensional subspace (again with an orthonormal basis for it), you’d have a third basis vector $v_3$ with a corresponding term. If you really need a projection matrix for some reason, add a term for a third basis vector. – amd Oct 29 '16 at 17:48
  • @mathlover However, for an $(n-1)$-dimensional subspace of an $n$-dimensional vector space, you often have a normal vector as part of its definition, so you can simply project onto that to compute distances to the subspace. – amd Oct 29 '16 at 17:49
  • @mathlover For 3- dimensions formula for projection matrix is $P= v_1{v_1}^T+v_2{v_2}^ T +v_3{v_3}^ T $ . Of course vectors must be, as in your example, orthogonal and of unit length, – Widawensen Oct 30 '16 at 05:57
  • @amd Your formula amd for $w$ is exactly the same as mine :) Change only the place of $v_i$ vector to this before dot product instead behind.. of course in number of calculations it can differ.. – Widawensen Oct 30 '16 at 06:38
  • @Widawensen “algebraically equivalent” $\ne$ “the same.” The emphasis isn’t on a projection operator (matrix), but on computing the orthogonal rejection of the given vector. – amd Oct 31 '16 at 03:29