Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Given a Point $P\in\mathbb{R}^3$ is there a way to compute the foot of a dropped perpendicular to line $l = \vec{a} + x\vec{b}$ with $x\in\mathbb{R}$?

There is one constraint here: I want to compute it with a computer program. Thus, a set of linear equations should be avoided.


My own thoughts so far:

A line has no unique perpendicular in $\mathbb{R}^3$. That's why we can't easily construct a perpendicular from the get-go. But we can construct a helping plane $H$ that's perpendicular to $l$: $$H: \left(\vec{r}\cdot\frac{\vec{b}}{\left\|\vec{b}\right\|}\right) - d = 0$$ with $d = \vec{a}\cdot\frac{\vec{b}}{\left\|\vec{b}\right\|}$.

We now could apply the line to this equation: $$H: \left(\left(\vec{a} + x\vec{b}\right)\cdot\frac{\vec{b}}{\left\|\vec{b}\right\|}\right) - d = 0$$

Here I am completely stuck because I can't come up with a computational solution to solve for $x$.

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

You seem to go through a lot of trouble when the naive way does work:

So you are looking for a point $Q$ on the line, say $Q=a+qb$, such that $P-Q$ is orthogonal to $b$, i.e. $\left<P-Q,b\right>=0$. Plugging things together we get:

$$0=\left<P-Q,b\right>=\left<P-a-qb,b\right>=\left<P-a,b\right>-q\left<b,b\right>$$

or equivalently

$$q=\frac{\left<P-a,b\right>}{\left<b,b\right>}$$

So just compute this $q$ and then the foot will be $Q=a+qb$.

share|improve this answer
    
I knew I was over-thinking it, but could find an easier way. Thanks! –  alnkpa Aug 28 '12 at 15:14
add comment

Suppose the foot of the perpendicular is the point $\vec q = \vec a + x_q\vec b$. Then you want $\vec p - \vec q$ to be perpendicular to $\vec b$. So $(\vec p - \vec q)\cdot\vec b = 0$. Solve for $x_q$ and thus obtain $\vec q$.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.