2

I have an affine space in $V_6(\mathbb{R})$: $\{Y=(2,-2,0,1,-1,0)+a(1,-1,0,0,0,0)+b(1,0,0,1,-3,1)+c(1,-4,0,2,1,0)$ with $a,b,c \in \mathbb{R}\}$.

A generic vector of $Y$ is something like this :$P+rA+sB+tC= \left( \begin{array}{c} 2+r+s+t \\ -2-r-4t \\ 0 \\ 1+s+2t \\ -1-3s+t \\ 0+s \end{array} \right)$

The orthogonal complement $Y'= 0 + \{ (1,-1,0,0,0,0),(1,0,0,1,-3,1),(1,-4,0,2,1,0) \}^\perp $ passes through the origin and intersects $Y$ in one point. That is the point of the intersection between the affine space and its perpendicular line through the origin, so it is supposed to be the point of $Y$ at a minimum distance from the origin. The idea is to compute this vector's length and say 'That is the distance from O'.

The carthesian equations representation of the orthogonal complement is $\begin{equation} \begin{cases} x_1-x_2=0\\x_1+x_4-3x_5+x_6=0\\x_1-4x_2+2x_4+x_5=0 \end{cases} \end{equation}$

(from this representation I can check again that $0 \in Y'$).

Now, if I substitute $x_1, x_2$ ... with the coordinates of the generic vector of $Y$ I should get the intersection between $Y$ and the orthogonal complement passing through the origin and this point should be good to compute the distance. The problem is: the solution of the system is r = -132/103, s = -81/206, t = -43/206 [See Wolfram].

This solution is corresponding to the vector $(12/103, 12/103, 0, 39/206, -3/103, -81/206)$ whose length is $3 \sqrt{5/206}$.

User A.P. used instead another formula in the Update of this answer: $$ \vec{x}_\perp = \vec{x} - (\vec{x} \cdot \vec{v}_1) \, \frac{\vec{v}_1}{\|\vec{v_1}\|^2} - \dotsb - (\vec{x} \cdot \vec{v}_d) \, \frac{\vec{v}_d}{\|\vec{v_d}\|^2}. $$ and got $\sqrt{11/2}$. Where's the problem? Thanks for the help!

1 Answers1

2

The discrepancy is due to an oversight by A.P. He’s subtracting the orthogonal projection $\pi_V\vec x$ from $\vec x$ to get the orthogonal rejection $\vec x_\perp$, but the formula he uses for the projection requires an orthogonal basis $\{\vec v_i\}$ of $V$. It looks like he used the given generators of $V$ in the formula without checking that they were orthogonal first. If you compute $\pi_V\vec x$ some other way, then the answer does agree with the one you got by solving the system of linear equations.

One way to compute this projection is to take $\pi_v=U(U^TU)^{-1}U^T$, where $U$ has any basis of $V$ as its columns. Taking $\vec x=(2,-2,0,1,-1,0)^T$ as before, we end up with $(I-\pi_V)\vec x=\frac1{206}(24,24,0,39,-6,-81)^T$, which has the norm $\sqrt{45/206}$.

Another approach is to find an orthogonal basis for $V$. Applying the Gram-Schmidt process without normalizing yields the basis $\vec v_1=(1,-1,0,0,0,0)^T$, $\vec v_2=(1/2,1/2,0,1,-3,1)^T$ and $\vec v_3=(-32/23,-32/23,0,51/23,8/23,5/23)^T$. Using these vectors in the formula given by A.P. produces the same vector as above.

amd
  • 53,693
  • Great, I was having a bad time because of this :D – Surfer on the fall Jan 03 '16 at 23:14
  • @Surferonthefall I’ve also added a comment to A.P.’s answer to your original question pointing out the error. – amd Jan 03 '16 at 23:16
  • I would have tried to minimize $||x||^2, x \in \mathcal{A}$ by starting at $x = (a=0,b=0,c=0)$ and then minimizing with respect to $a$, then with respect to $b$, and finally with respect to $c$. because of the convexity of the Affine space, this would have worked in 3 simple steps of the form $\min_c ||x_0 + c v||^2 \rightarrow c = -\frac{<x_0,v>}{||v||^2}$ – reuns Jan 04 '16 at 02:46
  • @user1952009 There are certainly other ways than this to find the distance to an affine space. Finding that distance wasn’t part of the original problem posed by the OP (see linked question), though. The fact that you could use the solution to those questions to compute the distance to the space was more of an afterthought. Unfortunately, the values computed by the OP and in the original answer disagreed. – amd Jan 04 '16 at 06:42
  • no ok you are right, orthogonalize the basis first – reuns Jan 04 '16 at 07:19
  • Indeed, I was too sloppy. By the way, I totally forgot about the pseudo-inverse! :P – A.P. Jan 04 '16 at 20:59