Distance between $P$ and a line in $\mathbb{R}^3$

67 Views Asked by At

Find the distance between $P=(6,4,-4)$ and a line that crosses points $A=(2,1,2)$ and $B=(3,1,-4)$. Note: Using dot product only. (No cross product).

I've tried doing the proyection of $P$, but since the canonical equation of the line does not exist, the solution was wrong. How could I apply the dot product for this problem?

2

There are 2 best solutions below

0
On BEST ANSWER

First the equation of the line $\vec{AB}$ going through points $A$ and $B$:

Direction vector $\vec{AB} = (3 - 2, 1 - 1, -4 - 2) = (1, 0, -6)$

Points on line $AB$ will be given by $(2, 1, 2) + (1, 0, -6) t = (2 + t, 1, 2 - 6t)$

Now if a perpendicular from point $P$ to the line $AB$ meets at point $C$, the direction vector of line $\vec{PC} = (2 + t - 6, 1 - 4, 2 - 6t - (-4)) = (t - 4, -3, 6 - 6t)$

As they are perpendicular to each other $\vec{AB} \cdot \vec{PC} = 0$

So, $(t-4,-3,6-6t) \cdot (1, 0, -6) = (t - 4 - 36 + 36t) = 37t - 40 = 0$

So the point $C$ on line $AB$ for $t = \frac{40}{37}$ is $(\frac{114}{37}, 1, \frac{-166}{37})$.

Distance from point $P$ to the line $AB, PC = \sqrt{(\frac{108}{37})^2 + 3^2 + (\frac{18}{37})^2} = \sqrt{\frac{657}{37}}$

0
On

If $\vec{v}$ is the projection of $\vec{PA}$ over $\vec{BA}$, then the distance you require is $||\vec{v}-\vec{PA}||.$