1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Shortest distance between lines and the lines

  1. May 29, 2012 #1
    1. The problem statement, all variables and given/known data
    Find the shortest distance between the lines r = (0,7,6) + t (-3,2,2) and the line r = (-3,6,-4) + s (2,-5,6)

    3. The attempt at a solution
    What I did was I cross product s(2,-5,6) & t(-3,2,2) then I took (0,7,6) - (-3,6,-4)
    After getting both answer from the 2 steps I took the 2 equation I got and times (x) with each other. It is even correct? Because I referred this step from Shortest distance between 2 skewed lines since I have no notes or example regarding 2 lines
     
  2. jcsd
  3. May 29, 2012 #2
    I didn't understand why you were doing what you said after cross product. Try giving us a conceptual recipe for your steps, such as:

    The shortest segment connecting these two lines I would guess would be orthogonal to both of them. This is hard to justify (unless you come up with a slick reason), but it seems lie it might be right. So the segment should be parallel to the cross product of the directions.

    We can express the connecting line as a point on the first curve plus some multiple call it u times the cross product we found earlier. We'll set this expression for the connecting line to be equal to the other skew line.

    So we now have three unknowns, s,t and u, and one equation, the one for the line. So we don't have enough equations? Actually, our equation is a vector equation, so it is actually three equations, so we'll be able to solve.



    Here's another method. Consider the distance squared function,

    [itex]f(s,t)=d^2(r_1(s),r_2(t))=|r_1(s)-r_2(t)|^2.[/itex]

    This is a function from ℝ^2 to ℝ. Since we are trying to minimize it, we can just check for the partials [itex]\frac{\partial}{\partial s}f(s,t)[/itex] and [itex]\frac{\partial}{\partial t}f(s,t)[/itex] are both zero. The reason I squared the distance is so you wouldn't have to take the derivative of a square root. This is okay since distance is nonnegative, and is an increasing function there.
     
  4. May 29, 2012 #3

    ehild

    User Avatar
    Homework Helper
    Gold Member

    You can take any vector that connects the two lines. It can be the vector b=(0,7,6)-(-3,6,-4)=(3,1,10) The projection of b onto the direction of the common normal is the distance between the lines. [tex]d=\vec b \cdot \vec n[/tex] where n is the unit normal vector and the dot means dot product.

    You need to multiply the difference vector by the unit normal vector, that is, the cross product divided by its magnitude. Find the magnitude of the cross product and divide your result with it. That will be all right.
     
  5. May 29, 2012 #4
    Oops, that must be what ezsmith was going for. That works nice, very fast, clever trick.
     
  6. May 29, 2012 #5
    Sorry for the late reply and thanks for the reply algebrat and ehild.. Its really helpful as I am pretty stuck earlier. Just to make sure whether I am on the right track. After doing cross product which is -22i-22j+11k. I found the magnitude of the cross product which is 33 and then I took the (3,1,10)x(-22,-22,11) and got 198. Lastly, I took 198/33 and the final answer I got was 6.
     
  7. May 29, 2012 #6

    ehild

    User Avatar
    Homework Helper
    Gold Member

    The cross product is 22i+22j+11k. The magnitude is correct. When multiplying with 3,1,10, it is dot product, so use dot instead of cross. The result is correct, that means you used the correct normal vector instead of the written one.

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




Similar Discussions: Shortest distance between lines and the lines
Loading...