Calculating the distance between a point and a line.

Hi everyone,

The question is as follows: “Find the distance from the point Q (3, 5,-1) to the line x=3t, y= 3-2t, z= 2 + t. (Choose any two points P and R on the line, then consider the parallelogram determined by PQ and PR).

First, in order to find P, I set t = 3, and obtained the vector (-6, 8,-6). Similarly, to find R, I set t=5, and found the vector to be (15,-7, 7).

Second, I calculated PQ, received (-6, 8,-6) as the answer, and found PR (6,-4, 2).

Third, the cross product of PQ and PR was calculated to be (-8, 48,-24).

Fourth, the cross product of PQ and PR was placed into the distance formula, providing the answer of square root (2944). Afterwards, PR was calculated to be the square root of 56, using the distance formula as well.

The final answer I get is the square root of 368/7, or approximately 7.2506. The answer given by the instructor is the square root of 152/7, approximately 4.6599. The only difference I am able to see between the work completed by myself, and the work completed by the instructor is on order to find P, t = 0, and to find R, t=1.

Thank you in advance!

Re: Calculating the distance between a point and a line.

Quote:

Originally Posted by

**SC313** Hi everyone,

The question is as follows: “Find the distance from the point Q (3, 5,-1) to the line x=3t, y= 3-2t, z= 2 + t. (Choose any two points P and R on the line, then consider the parallelogram determined by PQ and PR).

First, in order to find P, I set t = 3, and obtained the vector (-6, 8,-6). Similarly, to find R, I set t=5, and found the vector to be (15,-7, 7).

Second, I calculated PQ, received (-6, 8,-6) as the answer, and found PR (6,-4, 2).

Third, the cross product of PQ and PR was calculated to be (-8, 48,-24).

Fourth, the cross product of PQ and PR was placed into the distance formula, providing the answer of square root (2944). Afterwards, PR was calculated to be the square root of 56, using the distance formula as well.

The final answer I get is the square root of 368/7, or approximately 7.2506. The answer given by the instructor is the square root of 152/7, approximately 4.6599. The only difference I am able to see between the work completed by myself, and the work completed by the instructor is on order to find P, t = 0, and to find R, t=1.

Thank you in advance!

We are in 'calculus section' so that an an analytic solution is fully adequate. Why don't compute the square of distance...

$\displaystyle \Delta^{2}(t)= (3t-3)^{2} + (-2t-2)^{2} + (t+3)^{2}$ (1)

... and then find the value of t that minimizes (1)?...

Kind regards

$\displaystyle \chi$ $\displaystyle \sigma$

Re: Calculating the distance between a point and a line.

Quote:

Originally Posted by

**SC313** Hi everyone,

The question is as follows: “Find the distance from the point Q (3, 5,-1) to the line x=3t, y= 3-2t, z= 2 + t. (Choose any two points P and R on the line, then consider the parallelogram determined by PQ and PR).

First, in order to find P, I set t = 3, and obtained the vector (-6, 8,-6). Similarly, to find R, I set t=5, and found the vector to be (15,-7, 7).

Second, I calculated PQ, received (-6, 8,-6) as the answer, and found PR (6,-4, 2).

Third, the cross product of PQ and PR was calculated to be (-8, 48,-24).

Fourth, the cross product of PQ and PR was placed into the distance formula, providing the answer of square root (2944). Afterwards, PR was calculated to be the square root of 56, using the distance formula as well.

The final answer I get is the square root of 368/7, or approximately 7.2506. The answer given by the instructor is the square root of 152/7, approximately 4.6599. The only difference I am able to see between the work completed by myself, and the work completed by the instructor is on order to find P, t = 0, and to find R, t=1.

Thank you in advance!

The shortest distance between any point and a line always creates a line that is perpendicular to the original line.

So the line you have been given, in vector form, is $\displaystyle \displaystyle \left(3t, 3-2t, 2+t\right)$, which means that any point R on the line will have the same coordinates (for some value of t), and the position vector of point Q is $\displaystyle \displaystyle (3, 5, -1)$. So the vector that goes between the point and the line is $\displaystyle \displaystyle \vec{QR} = \vec{QO} + \vec{OR} = \vec{OR} - \vec{QO} = (3t - 3, 3-2t-5, 2+t-1) = (3t-3, -2-2t, 1+t)$

For the shortest distance, this vector is perpendicular to the line you have been given, so their dot product = 0.

$\displaystyle \displaystyle \begin{align*} (3t-3, -2-2t, 1+t)\cdot(3t, 3-2t, 2+t) &= 0 \\ (3t-3)(3t) + (-2-2t)(3-2t) + (1+t)(2+t) = 0 \\ 9t^2 - 9t - 6 - 6t + 4t + 4t^2 + 2 + 2t + t + t^2 &= 0 \\ 14t^2 -8t - 4 &= 0 \\ 7t^2 - 4t - 2 &= 0\end{align*}$

Solve this for $\displaystyle \displaystyle t$, then substitute this into your vector $\displaystyle \displaystyle \vec{QR}$ and evaluate its magnitude. This will give you the distance you need :)

Re: Calculating the distance between a point and a line.

Please check the cross product of PQ and PR.

Re: Calculating the distance between a point and a line.

Quote:

Originally Posted by

**chisigma** We are in 'calculus section' so that an an analytic solution is fully adequate. Why don't compute the square of distance...

$\displaystyle \Delta^{2}(t)= (3t-3)^{2} + (-2t-2)^{2} + (t+3)^{2}$ (1)

... and then find the value of t that minimizes (1)?...

Kind regards

$\displaystyle \chi$ $\displaystyle \sigma$

Expanding the formula (1) You find...

$\displaystyle \Delta^{2}=14\ t^{2} - 4\ t + 22$ (2)

... and the value ot t that minimizes (2) is the solution of the equation...

$\displaystyle \frac{d \Delta^{2}}{d t}= 28\ t - 4=0 \implies t=\frac{1}{7}$ (3)

... and that means that [without errors of me (Thinking)...] is $\displaystyle \Delta= \frac{\sqrt{1064}}{7}= 4.65985898008574...$

Kind regards

$\displaystyle \chi$ $\displaystyle \sigma$

Re: Calculating the distance between a point and a line.

Here is a useful formula.

If $\displaystyle P$ is point and $\displaystyle \ell:Q+tD$ is a line

the distance $\displaystyle D(\ell,P)=\frac{\|\overrightarrow {QP} \times D\|}{\|D\|}$