4

"Find the shortest distance between the point $(8,3,2)$ and the line through the points $(1,2,1)$ and $(0,4,0)$"

$$P = (1,2,1), Q = (0,4,0), A = (8,3,2)$$

$OP$ = vector to $P$

$$PQ_ = (0,4,0) - (1,2,1)$$

I found that the equation of the line $L$ that passes through $(1,2,1)$ and $(0,4,0)$ is:

$$L = OP + PQ \, t;$$

$$L = (1,2,1) + (-1,2,-1) \, t .$$

However after this I'm not sure how to proceed. I can find PA_ then draw a line from $A$ to the line $L$... advice?

Ozera
  • 2,050
  • shortest distance from point to line is orthogonal to this line which goes through to this point – dato datuashvili Aug 29 '13 at 05:06
  • 2
    I can't believe you've asked 19 question so far but still don't know how to format them... – Kaster Aug 29 '13 at 05:07
  • The shortest distance is the length of the vector whose tail is at OP and which is orthogonal to PQ. – Ethan Splaver Aug 29 '13 at 05:09
  • Alternately, you can calculate the area of the triangle formed in two ways, one a determinant, and another using the shortest distance to the line and distance between the two points... – Macavity Aug 29 '13 at 05:11
  • Write a formula for the distance squared from $A$ to the line $L$ in terms of $t$. This will be a convex quadratic in $t$. Minimise this over $t$. – copper.hat Aug 29 '13 at 05:12
  • @Ethan So I have the vector $PA$ and I can take the projection of that onto $PQ$. Is $PA -$projection-onto-PQ = a vector orthogonal to PQ? – Ozera Aug 29 '13 at 05:42

4 Answers4

5

The shortest distance should intuitively be the length of the segment which connects our point to our line and forms a right angle. Consider that we can determine this first by determining a vector from a point on our line to $A$ followed by finding its projection onto $\vec{PQ}$; the orthogonal part is then just the difference between this vector and our original vector from our line to our point and its magnitude yields the length of said segment:$$d=\left\|\vec{AP}-\frac{\vec{AP}\cdot\vec{PQ}}{\|\vec{PQ}\|^2}\vec{PQ}\right\|$$

obataku
  • 5,571
  • I think this is what I said in the comments? I said the distance $d$ is the magnitude of the difference of $PA$ and the projection of $PA$ onto $PA$. Right? – Ozera Aug 29 '13 at 05:57
  • 2
    my answer precedes your comments. – obataku Aug 29 '13 at 11:52
2

The equation of the plane passing through the points $P$, $Q$, and $A$ is given by

$\begin{vmatrix} x & y & z & 1 \\ 1 & 2 & 1 & 1 \\ 0 & 4 & 0 & 1 \\ 8 & 3 & 2 & 1 \end{vmatrix}=0$.

After you compute the determinant, you get $3x-6y-15z+24=0$. Then the area $S$ of the triangle defined by the points is given by $S=\frac{1}{2}\sqrt{3^2+(-6)^2+(-15)^2}=\frac{1}{2}\sqrt{270}$. The area also satisfies $S=\tfrac{1}{2}hb$, where the height $h$ is measured from $A$ to the base $b$ connecting $P$ and $Q$. So $h=2S/b$ where $b=\sqrt{(1-0)^2+(2-4)^2+(1-0)^2}=\sqrt{6}$ is the distance from $P$ to $Q$. So, you get $h=\sqrt{270}/\sqrt{6}=3\sqrt{5}$, which is the shortest distance from $A$ to the line passing through $P$ and $Q$.

Andrey Sokolov
  • 1,536
  • 10
  • 15
  • For the first part, perhaps simpler:

    The area of the triangle formed by $P, A, B$ is given by the magnitude of $\vec{PA}\times \vec{PB}$ which is given by the determinant $$\begin{vmatrix}\hat{i} & \hat{j} & \hat{k}\1-8 & 2-3 & 1-2\ 0-8 & 4-3 & 0-2\end{vmatrix} = \begin{vmatrix}\hat{i} & \hat{j} & \hat{k}\-7 & -1 & -1\ -8 & 1 & -2\end{vmatrix} = 3\hat{i}-6\hat{j}-15\hat{k}$$ Taking the magnitude, the area is $\sqrt{9+36+225}=\sqrt{270}$.

    – Macavity Aug 29 '13 at 07:17
  • Yes, this is simpler. By the way, $\sqrt{270}$ is the area of the parallelogram formed by those vectors. You need to halve it to get the area of the triangle. – Andrey Sokolov Aug 29 '13 at 07:22
  • yes that's correct. A factor of $\frac12$ was missed out throughout. – Macavity Aug 29 '13 at 07:26
1

Any point on the line looks like $\vec{\rm r}\left(\lambda\right) \equiv \vec{P} + \lambda\vec{n}$ where $\lambda \in {\mathbb R}$ and $\vec{n} \equiv \vec{Q} - \vec{P}$. The distance between the point $\vec{A}$ and the point $\vec{\rm r}\left(\lambda\right)$ is given by ${\rm d}\left(\lambda\right) = \left\vert\vec{\rm r}\left(\lambda\right) - \vec{A}\right\vert = \left\vert\lambda\,\vec{n} + \vec{P} - \vec{A}\right\vert$. So, you have to minimize

\begin{align} {\rm d}^{2}\left(\lambda\right) =& \lambda^{2} + 2\vec{n}\cdot\left(\vec{P} - \vec{A}\right)\,\lambda + \left(\vec{P} - \vec{A}\right)^{2} = \left\lbrack\lambda + \vec{n}\cdot\left(\vec{P} - \vec{A}\right)\right\rbrack^{2} + \left(\vec{P} - \vec{A}\right)^{2} - \left\lbrack\vec{n}\cdot\left(\vec{P} - \vec{A}\right)\right\rbrack^{2} \end{align}

Then the shortest distance is given by $${\large\sqrt{% \left(\vec{P} - \vec{A}\right)^{2} - \left\lbrack\vec{n}\cdot\left(\vec{P} - \vec{A}\right)\right\rbrack^{2}}} $$

Felix Marin
  • 89,464
1

Here is an approach, we have $P = (1,2,1), Q = (0,4,0), A = (8,3,2)$

1) Construct a vector $u=AP$

2) Construct a vector $v=AQ$

3) Find the projection $p$ of $u$ on $v$

4) Construct the vector $w = \frac {p}{||v||}v$

5) Construct the vector $d=u-w$ which its norm ||d|| gives the desired result.

  • I found that $PA = (7,1,1)$ and $PQ = (-1,2,-1)$. $Proj_{PA}^{PQ} = (PA . PQ)/||PQ||^2 * PQ$. Then $d$ = $PA$ - our projection. The only problem is , is that for the projection I find that it is -18/17... that can't be right. – Ozera Aug 29 '13 at 06:15
  • @Ozera: I have not worked out the problem. Make sure of your calculations. Follow the steps I gave you. You need to find $Proj_v^u$. Note that, there is no vector $PQ$ in my steps. – Mhenni Benghorbal Aug 29 '13 at 06:32