# Proving 3D vector distance between point and line

I've been going through previous exams as I'm approaching my midterms and I've encountered a question I don't quite understand how to solve.

Let C be a point from $R^3$ not on the line L defined by points B and A. Prove the distance d from point C to the line L is given by $$d = \frac{|BA\times BC|}{|BA|}$$

I understand that the magnitude of a cross product produces a parallelogram and that if you divide out the vector BA I'll have $d = BA\sin\theta$ , which is also going to be the distance between the line and the point.

I've been trying to solve it via dot product + Pythagoras such as $d = \sqrt{|BA|^2-proj_{BC}BA^2}$ but it doesn't seem to be giving the same result for the same vectors as the first equation. Shouldn't these two equations give the same result?

• Is there a 2 factor missing in numerator? – kayush Mar 28 '18 at 11:28
• distance d from point C to the line L is given by, shouldn't C be A? – kayush Mar 28 '18 at 11:37
• thanks, just fixed it up. – Saturn Mar 28 '18 at 11:57

## 2 Answers

They do give the same result: $|\mathrm{proj}_{BC}(BA)|$ is just $\dfrac{BC\cdot BA}{|BC|}$, which is $\dfrac{|BC||BA|\cos\theta}{|BC|}$ $= |BA|\cos\theta$. Now $$\sqrt{|BA|^2 - |\mathrm{proj}_{BC}(BA)|^2} = \sqrt{|BA|^2 - |BA|^2 \cos^2\theta} = \sqrt{|BA|^2\sin^2\theta} = |BA|\sin \theta$$ as required.

• thanks! I wasn't getting the right answer when I swapped out the cross product because I hadn't calculated the cross product correctly... how might one go about determining the point/coordinates where $proj_{BC}{BA}$ is exactly? – Saturn Mar 28 '18 at 13:50

What is the area of the triangle $\overset{\bigtriangleup}{ABC}$ with height $d$ drawn from $C$ ?

$$\mbox{(Area)} = \frac{1}{2} | BA | d$$

What is the area spanned by two vectors $\vec{u}$ and $\vec{v}$?

$$\mbox{(Area)} = \frac{1}{2} | \vec{u} \times \vec{v} |$$

Combine the two above with $\vec{u}= BA$ and $\vec{v} = BC$

$$\boxed{d = \frac{ | BA \times BC | }{| BA |} }$$