# Distance between two position vectors.

1. Oct 31, 2012

### peripatein

Hi,

Supposing the position vectors of two bodies A and B are described thus: A = (a1,0,a3) + (Va,0,0)t and B = (0,b2,b3) + (Vb,Vb,0)t, where Va, Vb are constant in time. How may I find the minimum distance between these two bodies?

If the vectors are skew, then the distance comes out as a3-b3, but that is probably wrong as independent of too many of the other parameters given.

I'd appreciate any advice.

2. Oct 31, 2012

### LCKurtz

$t$ represents the same time for both bodies I guess, so at $t=0$ A starts at $(a_1,0,a_3)$ and B starts at $(0,b_2,b_3)$.
Write both A and B as single vectors by adding the two terms in their formulas and use the distance between two points formula. That will be a function of $t$ that you can minimize using calculus. It will be easier if you use the distance squared in the calculations.

3. Oct 31, 2012

### SammyS

Staff Emeritus
What is the distance between the two objects at time t ?

4. Oct 31, 2012

### Staff: Mentor

This can be done without resorting to calculus techniques, if you have learned how to find the projection of one vector in the direction of another. This would be a technique you use with lines that don't intersect (and for which the minimum distance is 0.)

Pick a point on each line (the two equations are parametric equations of lines in space) and form a vector - call it H. Then find the projection of H onto one of the lines - call it Pr. The vector H - Pr gives you the vector that is perpendicular to Pr. Its magnitude is the distance between the two lines.

5. Oct 31, 2012

### LCKurtz

I don't think so. The minimum distance between the two moving particles won't be the same as the distance between the lines unless both particles happen to be at the closest points at the same time, which wouldn't generally be true.

6. Nov 1, 2012

### peripatein

How do I project vector H onto one of the lines, given their parametric equations?

7. Nov 1, 2012

### LCKurtz

Don't bother with that method. Read my post #5 and my earlier post.

8. Nov 1, 2012

### peripatein

The equation you get that way are too cumbersome to solve, I fear. I am pretty stuck.

9. Nov 1, 2012

### LCKurtz

You give up too easily. If you call D the distance squared, it is just a quadratic. Show us your effort.

10. Nov 1, 2012

### SammyS

Staff Emeritus
With what LCKurtz says above in mind:

The minimum (or maximum) of the quadratic ax2 + bx +c occurs at $\displaystyle x=-\frac{b}{2a}\ .$

Show us what you get for the square of the distance.

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook