Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Shortest distance between two lines

  1. May 4, 2010 #1
    I'm a bit uncertain about this question and would like some help, as I don't have the correct answer. Have I done this correctly?

    1. The problem statement, all variables and given/known data
    What is the shortest distance between the two lines A = (1,2,3) + t(0,1,1) and B = (1,1,1) + s(2,3,1)

    3. The attempt at a solution
    My reasoning: The vector AB is shortest when AB is orthogonal to BOTH A and B.

    Therefore the scalar product AB [tex]\circ[/tex] A = AB [tex]\circ[/tex] B = 0. That gives a system with two equations

    AB = (2s, -1+3s-t, -2+s-t)

    AB [tex]\circ[/tex] A = -3+4s-2t=0
    AB [tex]\circ[/tex] B = 14s-5-4t=0

    which when solved gives s = -1/6 and t = -11/6.

    I now seek |AB|, or the LENGTH of the vector.

    Substituting s and t with the corresponding values and then using Pythagoras gives:

    |AB| = sqrt(1/3)

    Is this correct? Is there perhaps an easier way to do this?

    Danke schön!
     
  2. jcsd
  3. May 4, 2010 #2

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Yes, your method is correct. Another approach that doesn't involve simultaneous equations is to cross the two direction vectors and make a unit normal n from it. That gives the orthogonal direction. Then let V be a vector from a point on one line to a point on the other.

    Then d = |V dot n|
     
  4. May 4, 2010 #3
    Worked excellent, thank you. I also noticed that I could use the normal vector without turning it into a unit vector. I used it to create a system of equations
    1+2s=1-2a
    1+3s=2+t+2a
    1+s=3+t-2a
    which gives that a = 1/6

    Then I multiplied that(1/6) with (-2,2,-2) and then used Pythagoras to calculate the length of the vector, which in this case is 1/sqrt(3).
     
  5. May 10, 2010 #4
    or you could use projection
     
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook