Geometry of affine euclidean space

linear algebra

Suppose the line $\ell$ passes through the points $A(3,1,2,4)$ and $B(4,2,3,6)$, and 2D plane $\Pi$ through the points $C(2,1,3,-1), D(6,1,0,2),E(3,0,2,0)$. Find an equation of the common perpendicular to $\ell$ and $\Pi$ and its length.

My approach: Easy to note that $\ell$ can be written as $(3,1,2,4)+\langle (1,1,1,2)\rangle$ and $\Pi$ as $(2,1,3,-1)+\langle (4,0,-3,3),(1,-1,-1,1)\rangle$.

And I will use the following theorem from my lecture notes:

The distance between two affine subspaces $(\mathfrak{C},U)$ and
$(\mathfrak{B},W)$ is equal to the length of orthogonal component of
the vector $\overline{PQ}$ connecting any point $P\in \mathfrak{C}$
with any point $Q\in \mathfrak{B}$, relative to the subspace $U+W$:
$$\text{dist}(\mathfrak{C},\mathfrak{B})=|\text{ort}_{U+W}
\overline{PQ}| \quad \text{for all} \quad P\in \mathfrak{C},Q\in
\mathfrak{B}$$

In my case $U=\langle (1,1,1,2)\rangle, W=\langle (4,0,-3,3),(1,-1,-1,1)\rangle$ and let's take $A=(3,1,2,4), C=(2,1,3,-1)$. Then $\overline{CA}=(1,0,-1,5)$. And it's easy to show that $U+W=\langle (1,1,1,2),(4,0,-3,3),(1,-1,-1,1)\rangle=\langle a_1,a_2,a_3\rangle$.

From linear algebra we know that projection of $\overline{CA}$ into $U+W$ which is the vector $\text{pr}_{U+W}\overline{CA}=\alpha a_1+\beta a_2+\gamma a_3$ and $\alpha,\beta,\gamma$ can be computed from the following matrix equation: $$G(a_1,a_2,a_3)\begin{bmatrix}
\alpha \\
\beta \\
\gamma
\end{bmatrix}=\begin{bmatrix}
(a_1,\overline{CA}) \\
(a_2,\overline{CA}) \\
(a_3,\overline{CA})
\end{bmatrix},$$
where $G(a_1,a_2,a_3)$ is the Gram matrix of vectors $a_1,a_2,a_3$. And from computations I got the matrix equation $$\begin{bmatrix}
7 & 7 & 1 \\
7 & 34 & 10 \\
1 & 10 & 4
\end{bmatrix}\begin{bmatrix}
\alpha \\
\beta \\
\gamma
\end{bmatrix}=\begin{bmatrix}
10 \\
22 \\
7
\end{bmatrix}$$

with solution $\alpha=\frac{4}{3},\beta=\frac{-1}{6},\gamma=\frac{11}{6}$. Then computation shows us that $\text{pr}_{U+W}\overline{CA}=(\frac{5}{2},\frac{-1}{2},0,4)$. Then orthogonal component is equal to: $$\text{ort}_{U+W}\overline{CA}=\overline{CA}-\text{pr}_{U+W}\overline{CA}=(-\frac{3}{2},\frac{1}{2},-1,1).$$

Then by theorem distance between $\ell$ and $\Pi$ is $$|\text{ort}_{U+W}\overline{CA}|=\sqrt{\frac{9}{4}+\frac{1}{4}+2}=\dfrac{3}{\sqrt{2}}.$$

And this answer coincides with answer in the book.

Trouble starts here when I am trying fo find an equation of common perpendicular. Orthogonal component intersect plane $\Pi$ at the point $R=(2,1,3,-1)+\text{pr}_{U+W}\overline{QP}=(2,1,3,-1)+(\frac{5}{2},\frac{-1}{2},0,4)=(\frac{9}{2},\frac{1}{2},3,3)$. So the common perpendicular passes through the point $R$ and $A$ so it can be written as $$A+\langle \overline{RA}\rangle =(3,1,2,4)+\langle (\frac{3}{2},\frac{-1}{2},1,1)\rangle.$$
And the book's answer is different than mine I have checked my computations at least 3 time and everything is correct.

Can anyone explain to me what is wrong with the second part of my solution, please?

EDIT (uniqueness of common perpendicular): We will show that the common perpendicular is unique if and only if $U\cap W=\{0\}$.

$\Rightarrow$ Suppose by contradiction there is an $x\in U\cap W$ such that $x\neq 0$. Since $\text{pr}_{U+W}\overline{PQ}\in U+W$ then we can write it in two ways: $$\text{pr}_{U+W}\overline{PQ}=u+w=(u+x)+(w-x)$$
Let's take $P'=P+u, Q'=P'+\text{ort}_{U+W}\overline{PQ}$ (as in the proof of the theorem) and $P''=P+u+x, Q''=P''+\text{ort}_{U+W}\overline{PQ}$.

Let $\ell'$ and $\ell ''$ be lines passing trough points $P', Q'$ and $P'', Q''$, respectively.

Then $\ell'$ can be written as $P'+\langle \overline{P'Q'}\rangle =P'+\langle \text{ort}_{U+W}\overline{PQ}\rangle $ and $\ell''$ can be written as $P''+\langle \overline{P''Q''}\rangle =P''+\langle \text{ort}_{U+W}\overline{PQ}\rangle $.

Since the line is unique then $P''=P'+\alpha v$ where $v=\text{ort}_{U+W}\overline{PQ}$. And we can rewrite it in this way: $P+u+x=P+u+\alpha v$ or equivalently $P+x=P+\alpha v$ and it follows that $x=\alpha v$. Since $x\neq 0$ then $\alpha \neq 0$ and we have that $\alpha^{-1}x=v$ and since by definition $v=\text{ort}_{U+W}\overline{PQ}\in (U+W)^{\perp}$ it means that $v$ is orthogonal to $x$, i.e. $(v,x)=0$ which gives us that $(\alpha^{-1} x,x)=\alpha^{-1}(x,x)=0$ and hence $(x,x)=0$ and it means that $x=0$ which is a contradiction because $x\neq 0$.

$\Leftarrow$ How to prove this part?

Best Answer

Let the line be $A-t_1 d_1$ and the plane $C+t_2d_2 + t_3 d_3$. (I chose the $-$ sign on the line for my own convenience later, but it doesn't matter as long as you make the appropriate modifications.) The $d_1,d_2,d_3$ are from the corresponding vectors in the question paragraph starting with "My approach". I chose $d_4=(-3,1,-2,2)^T$ because I prefer whole numbers :-).

You wish to find the equation of the line in the direction $d_4$ (the common perpendicular) that passes through the line and the plane.

You know the direction, you need to find a point on either the line or plane to finish.

In other words, you wish to solve $A-t_1 d_1 = C+t_2d_2 + t_3 d_3 + t_4 d_4$, or $D t = A-C$, where $D$ has $d_k$ as columns.

Solving this gives $t={1 \over 6} (8,-1,11,3)^T$.

Hence the point on the line is $A'=A-t_1 d_1 = {1 \over 3}(5,-1,2,4)^T$ and so the equation of the perpendicular passing through both line and plane is $A'+td_4$.

The distance between the two must be given by $\|t_4d_4\| = { 1\over 2} \sqrt{18}= {3 \over \sqrt{2}}$.

Note:

The issue in the question is that the projection onto $U+W$ corresponds to $t_1d_1+t_2d_2+t_3 d_3 = A-C-t_4d_4$.

In order to find the point(s) that the perpendicular passes through you need to compute $A'=A-t_1d_1$ or $C'=C+t_2d_2 + t_3 d_3$.

You cannot just add the projection onto $A$ or $C$ as it combines the shifts.

Clarification:

The problem is equivalent to solving $\min_{u \in U, w \in W} \|A+u - (C+w)\|$. If you solve this problem, then $A'=A+u, C'=C+w$ will be the points on the line and plane corresponding to the closest distance and the perpendicular line will be $A'+t(C'-A')$ (or however you want to write it).

The issue with the projection, is that you are solving a slightly different problem, $\min_{n \in U+W} \|A-C -n\|$ and there is no way apriori to separate $n$ into the $u,w$ parts in order to get $A',C'$. In particular, you cannot just add $n$ to $A$.

However, since the vectors that make up the subspaces $U,W$ are linearly independent, you can uniquely find the $u,w$ such that $n=w-u$.

In particular, with $n={1 \over 2} (5,-1,0,8)^T$ we have $u=-{1 \over 3} (4,4,4,8)^T$ and $w={1 \over 6} (7, -11, -8, 8)^T$ and so $A' = A + u = {1 \over 3}(5,-1,2,4)^T$.

Hence one way of writing the perpendicular line is ${1 \over 3}(5,-1,2,4)^T + \lambda (-3,1,-2,2)^T$.

Addendum:

Suppose there are distinct $u,u' \in \mathfrak{C}$ and $w,w' \in \mathfrak{B}$ such that $p=u-w=u'-w'$ where $p$ is the common perpendicular. Then $u-u' = w-w'$ and so $U \cap W \neq \{0\}$.

However, I think it is easier to note that $\min_{u \in U, w \in W} \|u-w\| = \min_{x \in V-W} \|x\|$. (I'm assuming finite dimensions so the subspaces are closed.)

Since $V-W$ is a (closed) convex set there is a unique minimiser $\hat{x}$ and there must exist some $u \in U, w \in W$ such that $\hat{x} = u-w$.

Then we see that the $u,w$ are unique iff $V \cap W = \{0\}$.

Related Question