[Math] Calculus III Vector distance problem.

calculuscross productorthogonalityvectors

Here is the question:

The distance,d, of a point P to the line through points A and B is the length of the component of AP that is orthogonal to AB, as indicated in the diagram below.

So the distance from $P=(−4,−5,−1)$ to the line through the points $A=(1,2,−4)$ and $B=(5,−2,−5)$ is_____?

The diagram is:

enter image description here

If someone could explain to me how to do this without giving the answer away, that would be much appreciated. I have tried this problem three times and all three answers are wrong. For all three of my attempts, I used the equation: $\dfrac{a\cdot{b}}{|a|}$, where the top is a dot product and then divided by the unit vector of a. I am not sure if this is the wrong equation or if I am approaching the problem incorrectly.

Best Answer

Hint: $\;\vec{AP}=\dfrac{\vec{AP} \cdot \vec{AB}}{\left|\vec{AB}\right|^2} \, \vec{AB} + \vec{d}\,$, so $\vec{d} = \vec{AP} - \dfrac{\vec{AP} \cdot \vec{AB}}{\left|\vec{AB}\right|^2} \, \vec{AB}\,$ where the RHS is easily calculated.