Drexel dragonThe Math ForumDonate to the Math Forum

Ask Dr. Math - Questions and Answers from our Archives
_____________________________________________
Associated Topics || Dr. Math Home || Search Dr. Math
_____________________________________________

Shortest Distance between Points


Date: 01/17/98 at 17:58:53
From: Justin
Subject: Shortest distance between lines 

I am doing a science fair project on the shortest distance between two 
points via another plane.  I need help with my theorems.  

Thanks.


Date: 01/17/98 at 18:16:31
From: Doctor Anthony
Subject: Re: Shortest distance between lines 

I'm not sure whether you really mean the shortest distance between two
lines, as your subject line says, or between two points, as your
question says.  I'll address the question of the distance between two
lines.

I will illustrate the method by way of an example. I hope you can 
follow the working here.  If not, write back.

Find the shortest distance between the given lines, and the points of 
closest approach on each line.

  x     y-3     z                  x-5     y-8     z-2 
 --- =  ---  = ---   = s   and    ----- = ----- = ------ = t
  1      1      -1                  3       7       -1

The common perpendicular is obtained from the vector product

   | i   j    k |    = i(6) -j(2) + k(4)
   | 1   1   -1 |
   | 3   7   -1 |   

So the common perpendicular is the vector (3, -1, 2) which can be 
written as a unit vector in the form  1/(sqrt(14)[3, -1, 2]

The vector connecting the given point on line (1) with the given point 
on line (2) is  [(5-0), (8-3), (2-0)] = (5, 5, 2)

The scalar product of this with the common perpendicular in unit 
vector form is

            5 x 3 + 5 x (-1) + 2 x 2        14 
            -------------------------  =  -------   =  sqrt(14)
                    sqrt(14)              sqrt(14)


So the shortest distance is sqrt(14).

Now to find the points of closest approach, we have:

line (1) is  r = (0, 3, 0) + s(1, 1, -1)  =  [s, (3+s), -s]
line (2) is  r = (5, 8, 2) + t(3, 7, -1)  =  [(5+3t), (8+7t), (2-t)]

and we must find s and t. 

The line joining a general point on line(1) to a general point on 
line(2) is the vector

  [(5+3t-s), (8+7t-3-s), (2-t+s)]

  [(5+3t-s), (5+7t-s), (2-t+s)]

and if s and t are points of closest approach, this must be parallel 
to the vector (3, -1, 2)

     5+3t-s     5+7t-s     2-t+s
so   ------  = -------- =  ------
       3           -1        2

From these equations s = -1  and  t = -1

The points of closest approach are therefore 

   on line(1)  (-1, 2, 1)      and on line(2)   (2, 1, 3)

Check that shortest distance is sqrt(14)

shortest distance = sqrt((2+1)^2 + (1-2)^2 + (3-1)^2)

                  = sqrt(9 + 1 + 4)  =  sqrt(14) 


Now, if your question is really that you want to find the distance
between two lines while travelling along a given plane, simply find
the two points where the two lines puncture the plane, then find the
distance between those two points.

-Doctors Anthony and Ken,  The Math Forum
 Check out our web site!  http://mathforum.org/dr.math/   


Date: 08/125/98 at 2:11:26
From: Doctor Ujjwal
Subject: Re: Shortest distance between lines 

In the subject line of your question you are asking about the distance 
between two lines, but in your actual question you ask about the 
shortest distance between two points.  Here is an outline of how you 
would find the shortest distance between two POINTS via a plane.

Let 
   P = The given plane
A, B = Two points whose distance via P is to be found.

To find the distance 'via' P, we go from A to P and then to B.

There are three cases:

  I. A and B are on opposite sides of P
 II. A or B (or both) lie in plane P
III. A and B are on the same side of the plane

          |                |             |         
     A*   |          A*    |        A*   |           
       \  |            \   |          \  |          
        \ |             \  |           \ |          
         \|              \ |            \|          
          |               \|             *I         
          |\               *B           /|           
          | \              |           / |          
          |  *B            |         B*  |           
          |                |             |          
          P                P             P 
       CASE I          CASE II       CASE III

CASES I & II are straightforward - the shortest distance from (A) 
to (B) via (P) is (AB).

CASE III is very interesting. It is the classic case of reflection from
a flat mirror! It is a well-known fact that light rays follow the
shortest path during reflection. 

A ray from (A) reaches (B) after being reflected from mirror (P). 
So just find the 'reflection' (B') of (B) about (P) and then find the
distance (AB') as in case I.

         |         
    A*   |           
      \  |          
       \ |          
        \|          
         *I         
        /|\          
       / | \        
     B*--|--*B'         
         | 
         |
        O*--->N         
         |         
         |         
         P 

     CASE III

The steps will be as follows:

0. The given formulation of the plane (P), may directly give (or help
   find) a point (O) in the plane and a normal (N) to the plane.

1. Normalize (N) to get the unit normal (n)

2. Find dot product (d) of vectors (n) and (OB). This is the signed
   distance of point (B) from plane (P). A positive sign means (B) is 
   on the side of the plane pointed towards by the normal.

3. The 'image' or reflection (B') of point (B) about the 'mirror' or
   plane (P) can be found by walking twice the distance (d) 'into' the
   mirror from point (B).

Thus,
        B' = B - 2(d)(n) .... substitute (d) with its proper sign.

4. Find the distance (AB') as usual.

- Doctor Ujjwal Rane
http://mathforum.org/dr.math/   
    
Associated Topics:
High School Geometry
High School Higher-Dimensional Geometry
High School Linear Algebra
High School Symmetry/Tessellations

Search the Dr. Math Library:


Find items containing (put spaces between keywords):
 
Click only once for faster results:

[ Choose "whole words" when searching for a word like age.]

all keywords, in any order at least one, that exact phrase
parts of words whole words

Submit your own question to Dr. Math

[Privacy Policy] [Terms of Use]

_____________________________________
Math Forum Home || Math Library || Quick Reference || Math Forum Search
_____________________________________

Ask Dr. MathTM
© 1994-2013 The Math Forum
http://mathforum.org/dr.math/