Calculate the distance between point P(1,2,0) and line AB given points A(0,1,2) and B(3,0,1).

3k Views Asked by At

Calculate the distance between point P(1,2,0) and line AB given points A(0,1,2) and B(3,0,1).

First we must find the parametric equations for the line:

$\vec{AB} = (3,-1,-1) \rightarrow \vec{r} = t(3,-1,-1) + (0,1,2) = (x,y,z)$

So that: $$x = 3t$$ $$y = -t-1$$ $$z = -t - 2$$

Now we find the plane in which $\vec{AB}$ is the normal vector:

$3x - y - z + D = 0$. For P(1,2,0), D = 1.

Therefore we have the plane $3x - y - z + 1 = 0$.

Now, using the x,y,z values from the parametric equations, $$t = \frac{2}{11}$$.

So we have to calculate the distance between the points $P'(3t,-t-1,-t-2)$ and $P(1,2,0)$.

This distance is: $$d = \frac{3\sqrt22}{11}$$.

Is this correct?

4

There are 4 best solutions below

0
On BEST ANSWER

When you are uncertain if your solution is correct, try to solve it using a different approach. Here is an example.

Another way to parametrise the line $\vec{v}(t)$ is to make $\vec{v}(0) = \vec{A} = (0, 1, 2)$, and $\vec{v}(1) = \vec{B} = (3, 0, 1)$, so $$\vec{v}(t) = \vec{A} + t \left ( \vec{B} - \vec{A} \right ) = ( 3 t ,\;\, 1 - t ,\;\, 2 - t )$$ I parametrise my lines this ways very often, because otherwise I seem to get errors. In this form, it is trivial to check that $\vec{v}(t)$ passes through $\vec{A}$ and $\vec{B}$.

When a distance is minimized, distance squared is also minimized. The distance squared between point $\vec{v}(t)$ on the line and point $\vec{C} = (1, 2, 0)$ is $$f(t) = \left ( \vec{v}(t) - \vec{C} \right ) \cdot \left ( \vec{v}(t) - \vec{C} \right ) = (3 t - 1)^2 + (1 - t - 2)^2 + (2 - t - 0)^2$$ i.e. $$f(t) = 11 t^2 - 8 t + 6$$ Such an everywhere continuous and differentiable function reaches its extremum (a minimum or a maximum) at its stationary points where its derivative is zero: $$\frac{d f(t)}{d t} = 22 t - 8 = 0$$ This is trivial to solve for $t$, and of course yields $$t = \frac{8}{22} = \frac{4}{11} \approx 0.36\overline{36}\dots$$ We know from geometry of this particular case that if there is exactly one extremum, it must be the minimum. In this case, it means that $f\left(\frac{4}{11}\right)$ is the minimum distance squared, and that the point closest to $\vec{C}$ on the line is $\vec{v}\left(\frac{4}{11}\right)$.

Therefore, the minimum distance between the line and the point $\vec{C}$ is $\sqrt{f\left(\frac{4}{11}\right)}$, i.e. $$\sqrt{f\left(\frac{4}{11}\right)} = \sqrt{\frac{16}{11} - \frac{32}{11} + 6} = \sqrt{\frac{50}{11}} = \sqrt{\frac{2\cdot5^2}{11}} = 5 \sqrt{\frac{2}{11}}$$

Thus, I agree with Michael Rozenberg. OP seems to have a bug in their calculations; the first one in the equation for the line.

0
On

No. The point $P$ does not belong to the plane $3x-y-z+1=0$. You should have taken $D=-1$ instead. This leads to $t=-\frac2{11}$. And the answer to your problem is $\sqrt{\frac{150}{11}}=5\sqrt{\frac6{11}}$.

0
On

I think, it should be $$P'(3t,1-t,2-t)$$ and $$\vec{PP'}(3t-1,-1-t,2-t).$$

Thus, $$3(3t-1)-1(-1-t)-1(2-t)=0,$$ which gives $t=\frac{4}{11},$ $$\vec{PP'}\left(\frac{1}{11}-\frac{15}{11},\frac{18}{11}\right)$$ and $$PP'=5\sqrt{\frac{2}{11}}.$$

0
On

I like Nominal Animal’s suggestion of checking your work via a different method, but I’d prefer to use a very different method so that the chance of making systematic errors is minimized: The distance from $P$ to $\overline{AB}$ is the area of the triangle formed by the three points divided by the length of the leg opposite $P$, i.e., $AB$. We can use a cross product to compute the triangle’s area, which gives for the distance $${\frac12\|(A-P)\times(B-P)\| \over \|A-B\|} = {\|(3,5,4)\| \over 2 \|(3,-1,-1)\|} = 5\sqrt{\frac2{11}}.$$