Q: Min. Distance

This forum made possible through the generous support of SDN members, donors, and sponsors. Thank you.

dat_student

Junior Member
10+ Year Member
5+ Year Member
15+ Year Member
Joined
Apr 5, 2005
Messages
2,068
Reaction score
0
Q: What is the min distance between these two lines:
Equation #1: y = 3/2 x + 9
Equation #2: y = 3/2 x -4
a) 5.83
b) 6.50
c) 7.21
d) 9.19
e) 13.00

For some reason, I can't solve the above problem using the formula for "distance from a point (P) to a plane in R3"
i.e. d = |QP dot N| / ||N|| = |Ax0 + By0 + Cz0 + D| / square root of (A^2 + B^2 + C^2)
where Q is any point in a given plane and N is a normal to the given plane and P is the point.

The cross product of the two lines obviously gives us a line that is perpendicular to both lines but I figured I could get my perpendicular line by negating the inverse of the slope of both lines since both lines have the same slope. (i.e. slope = -1 / (3/2) = -2/3).

So the perpendicular line has the following formula: y = -2/3 x >> y + (2/3)x = 0

To find a plane that goes through one of the two lines I did the following:

P1 (-2, 6) is a point on "line #1": y = (3/2) x + 9 or y -(3/2)x - 9 = 0
So, my plane equation is:
(2/3)(x - (-2)) + 1(y - 6) = 0
(2/3)x + 4/3 + y - 6 = 0
(2/3)x + y - 14/3 = 0 << the plane that goes through line #1

Now all I need to do is find a point on line #2 and use the plane equation to find the distance:

P2 (2, -1) is on line #2: y = 3/2 x - 4

d = |QP dot N| / ||N|| = |Ax0 + By0 + Cz0 + D| / square root of (A^2 + B^2 + C^2)

d = | (2/3) * 2 + 1 (-1) -14/3 | / sq rt of ( (2/3)^2 + 1^2 )
d = (13/3) / (sq rt of 13) / 3
d = sq rt of 13
d = 3.6

but answer is 7.2 (which is 2 * d ) 😕 😕

Everything seems correct but for some reason I can't get the right answer. 😡

I know, for sure, 7.2 is the right answer because my second solution gives the right answer:

Solution #2:
Find the intersection of y = -2/3 x with the other two lines
and then use the points of intersection to find the distance

points of intersection are approx. (-4.15, 2.77) & (1.85, -1.23)

d = sq rt of [ (4.15 + 1.85)^2 + (2.77 + 1.23)^2 ] = 7.21

Does anyone know why my 1st solution doesn't give me the right answer???!!!! 😕 (solution #1 is better than #2 because solution #1 works for any pair of skew lines in 3 dimensional space; solution #2 is only good for this problem)

Thanks a bunch in advance.
 
This math problem is way over my head but looking through your work, there seems to be a little mathematical boo boo:

d = | (2/3) * 2 + 1 (-1) -14/3 | / sq rt of ( (2/3)^2 + 1^2 )
d = (13/3) / (sq rt of 13) / 3

(2/3) * 2 + 1 (-1) -14/3 doesnt = 13/3??

It equals 18/6 which is 2 times more than what you originally got which ends up being the difference in your answer and the correct one.

🙂
 
tinman831 said:
This math problem is way over my head but looking through your work, there seems to be a little mathematical boo boo:

d = | (2/3) * 2 + 1 (-1) -14/3 | / sq rt of ( (2/3)^2 + 1^2 )
d = (13/3) / (sq rt of 13) / 3

(2/3) * 2 + 1 (-1) -14/3 doesnt = 13/3??

It equals 18/6 which is 2 times more than what you originally got which ends up being the difference in your answer and the correct one.

🙂

d = | (2/3) * 2 + 1 (-1) -14/3 | / sq rt of ( (2/3)^2 + 1^2 )

d = | 4/3 -1 -14/3 | / sq rt of ( (4/9 + 1 )

d = | 4/3 -3/3 -14/3 | / sq rt of ( (4/9 + 1 )

d = | (4 -3 -14)/3 | / sq rt of ( (13/9 )

d = | (-13)/3 | / sq rt of ( (13/9 )

d = (13)/3 * (3 / sq rt of 13)

d = sq rt of 13

d = 3.6

how did you get 7.2???? 😕
 
slope = 3/2 for both of them
so that means that distance b/w all points is the same
9-(-4)= 13 distance is 13
 
Chga said:
slope = 3/2 for both of them
so that means that distance b/w all points is the same
9-(-4)= 13 distance is 13
i dont think the answer you have is right

13 is NOT the min. distance
 
Chga said:
oh i just realized what it is asking lol

This problem is driving me nuts. My 1st solution should work. eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee +pissed+
 
dat_student said:
d = | (2/3) * 2 + 1 (-1) -14/3 | / sq rt of ( (2/3)^2 + 1^2 )

d = | 4/3 -1 -14/3 | / sq rt of ( (4/9 + 1 )

d = | 4/3 -3/3 -14/3 | / sq rt of ( (4/9 + 1 )

d = | (4 -3 -14)/3 | / sq rt of ( (13/9 )

d = | (-13)/3 | / sq rt of ( (13/9 )

d = (13)/3 * (3 / sq rt of 13)

d = sq rt of 13

d = 3.6

how did you get 7.2???? 😕


where are you getting this stuff? 🙂

working on the nobel prize in math....and need some SDN help... :laugh:
 
howui3 said:
where are you getting this stuff? 🙂

working on the nobel prize in math....and need some SDN help... :laugh:

This is for a class I teach. I gave solution #2 to one of my students. Then, I told her there is a second solution that works for all cases (i.e. d = |QP dot N| / ||N|| = |Ax0 + By0 + Cz0 + D| / square root of (A^2 + B^2 + C^2) ). (I told her that I'd email her "solution #2.")
Solution #1 should work. Not sure what I am doing wrong. 😳 Plz, helpppppppppppppppppppppppppppppppppppppppppppp

This is so embarrassing. 😳
 
aaayayaya, My projection in 3D space didn't work.

This is how it can be done in 2D:

Solution #3:
Q: What is the min distance between these two lines:
Equation #1: y = 3/2 x + 9 or y_1 = 1.5 * x_1 + 9
Equation #2: y = 3/2 x -4 or y_2 = 1.5 * x_2 - 4

Both lines are parallel. Thus, any point on one line can be used to calculate
the distance to the second line.

- when 'x_1 = 0', 'y_1 = 9' and this is our point on line #1
- line #2 can be rewritten as '1.5 * x_2 - y_2 - 4 = 0'
- this gives the three parameters 'A = 1.5', 'B = -1' and 'C = -4'
where 'A*x_2 + B*y_2 + C = 0'
- the distance 'd' between the point P(x_1=0, y_1=9) and the above
line can be calculated by the formula:
'd = |(A*x_1 + B*y_1 + C)|/sqrt(A^2 + B^2)'
- this results in the distance 'd = 13/sqrt(1.5^2 + 1) ~= 7.2111025'
 
solution #1:
ok, I finally figured what went wrong:

Q or P1 (-2, 6)
P or p2 (2, -1)
QP is (4, -7)

y = -2/3 x
so, N is (3, -2)

d = |QP dot N| / ||N||

d = |4 * 3 + (-2)(-7)| / (sq rt of (9 + 4) )

d = |12 + 14| / (sq rt of 13)

d = (2 * 13) / (sq rt of 13)

d = 2 * (sq rt of 13)

d = 7.2
 
if the 2 lines are parallel (same slope)....and the distance between them at the y-intersect is 13...how can any distance between them be less than 13? I am confused...unless I am looking at it wrong or something.
 
gdunk said:
if the 2 lines are parallel (same slope)....and the distance between them at the y-intersect is 13...how can any distance between them be less than 13? I am confused...unless I am looking at it wrong or something.

minimum distance, not any distance...(y-axis is not perpendicular to the two lines)
 
if they are parallel how can there be a minimum distance that is different?

yeah, i was just using the y axis as a reference point between the two....like x=0.....i dont see the distance changing if you put in any points on the x-axis.
 
gdunk said:
if they are parallel how can there be a minimum distance that is different?

y-axis is not perpendicular to the two lines.

There is only one min distance and that is ~7.2

You have to either find a line that is perpendicular to both or use orthogonal projections in 2D and 3D.
 
yes I understand that.....but if i draw out these to lines on paper or something....the slopes are equal and the lines are parallel....where would the distance be 7.2?
 
gdunk said:
yes I understand that.....but if i draw out these to lines on paper or something....the slopes are equal and the lines are parallel....where would the distance be 7.2?

ok draw the two lines on a piece of paper

draw any line that is perpendicular to both lines & measure it.
 
k i understand now....WOW....lol.. I just kept looking at it vertically in my head and feel silly now hooo ahhhhh. thanks for clarifying.

so if the lines were horizontal and parallel...everything i was saying would have been right.
 
d= Sqr((X2-X1)^2+(Y2-Y1)^2)
is the formula for distance b/w two points... i got a line thats perperndicular to both of the lines ie (Y=-1.5X+9) found out where they intersected and got two points
P1(0,9) P2(4.3333,2.5)
but when i plug it into the formula i get 7.81
i dont get what im doing wrong
 
Chga said:
d= Sqr((X2-X1)^2+(Y2-Y1)^2)
is the formula for distance b/w two points... i got a line thats perperndicular to both of the lines ie (Y=-1.5X+9) found out where they intersected and got two points
P1(0,9) P2(4.3333,2.5)
but when i plug it into the formula i get 7.81
i dont get what im doing wrong

That's solution #2 in the original post:

Solution #2:
Find the intersection of y = -2/3 x with the other two lines
and then use the points of intersection to find the distance

points of intersection are approx. (-4.15, 2.77) & (1.85, -1.23)

d = sq rt of [ (4.15 + 1.85)^2 + (2.77 + 1.23)^2 ] = 7.21
...
 
dat_student said:
Q: What is the min distance between these two lines:
Equation #1: y = 3/2 x + 9
Equation #2: y = 3/2 x -4
a) 5.83
b) 6.50
c) 7.21
d) 9.19
e) 13.00

For some reason, I can't solve the above problem using the formula for "distance from a point (P) to a plane in R3"
i.e. d = |QP dot N| / ||N|| = |Ax0 + By0 + Cz0 + D| / square root of (A^2 + B^2 + C^2)
where Q is any point in a given plane and N is a normal to the given plane and P is the point.

The cross product of the two lines obviously gives us a line that is perpendicular to both lines but I figured I could get my perpendicular line by negating the inverse of the slope of both lines since both lines have the same slope. (i.e. slope = -1 / (3/2) = -2/3).

So the perpendicular line has the following formula: y = -2/3 x >> y + (2/3)x = 0

To find a plane that goes through one of the two lines I did the following:

P1 (-2, 6) is a point on "line #1": y = (3/2) x + 9 or y -(3/2)x - 9 = 0
So, my plane equation is:
(2/3)(x - (-2)) + 1(y - 6) = 0
(2/3)x + 4/3 + y - 6 = 0
(2/3)x + y - 14/3 = 0 << the plane that goes through line #1

Now all I need to do is find a point on line #2 and use the plane equation to find the distance:

P2 (2, -1) is on line #2: y = 3/2 x - 4

d = |QP dot N| / ||N|| = |Ax0 + By0 + Cz0 + D| / square root of (A^2 + B^2 + C^2)

d = | (2/3) * 2 + 1 (-1) -14/3 | / sq rt of ( (2/3)^2 + 1^2 )
d = (13/3) / (sq rt of 13) / 3
d = sq rt of 13
d = 3.6

but answer is 7.2 (which is 2 * d ) 😕 😕

Everything seems correct but for some reason I can't get the right answer. 😡

I know, for sure, 7.2 is the right answer because my second solution gives the right answer:

Solution #2:
Find the intersection of y = -2/3 x with the other two lines
and then use the points of intersection to find the distance

points of intersection are approx. (-4.15, 2.77) & (1.85, -1.23)

d = sq rt of [ (4.15 + 1.85)^2 + (2.77 + 1.23)^2 ] = 7.21

Does anyone know why my 1st solution doesn't give me the right answer???!!!! 😕 (solution #1 is better than #2 because solution #1 works for any pair of skew lines in 3 dimensional space; solution #2 is only good for this problem)

Thanks a bunch in advance.
You are confused between 2D and 3D. In 2D, Ax + By + C = 0 represents a line, but that is a representation (special case when z coefficient is zero) of a plane in 3D. This plane is the plane that passes through the Ax + By + C = 0 line in Oxy plane and is parallel to the z-axis (or perpendicular to the Oxy plane). A line in 3D is represented differently. X, y, z are functions of a forth variable. For example,
x= t + 3
y= 3t
z= t+5
 
luder98 said:
...A line in 3D is represented differently. X, y, z are functions of a forth variable. For example,
x= t + 3
y= 3t
z= t+5

Are you talking about the parametric form of lines in 3D?
 
dat_student said:
Are you talking about the parametric form of lines in 3D?
I'm a 4th year dental student, but I was a math tutor for my undergrad university for 4 years.

The formula you are using is for distance between 2 points in space (3-D). The question is less complex than you think.

1st solve for y. (already done for you) remember that the slope tells you a lot of info (parallel, perpindicular, etc).

In this case since the slopes are the same, the lines are parallel. If you susbstitute x as zero and graph by hand you will see the answer is 13. I can prove it to you mathmatically if you want...let me know.

Remember, the DAT math is quick and easy, you don't have a lot of time. So, most of the questions are straight forward and require algebra or basic trig. If you need any math help let me know.

Good luck!!!! 🙂
 
soflamel said:
..
In this case since the slopes are the same, the lines are parallel. If you susbstitute x as zero and graph by hand you will see the answer is 13. I can prove it to you mathmatically if you want...let me know.
...

Please, let me know how you got 13 😕

I got 7.2 and these are my 3 solutions:

Solution #2 (easiest solution)
(Easiest, only works for this problem, doesn't work for skew lines in 3D)

Find the intersection of y = -2/3 x with the other two lines
and then use the points of intersection to find the distance

points of intersection are approx. (-4.15, 2.77) & (1.85, -1.23)

d = sq rt of [ (4.15 + 1.85)^2 + (2.77 + 1.23)^2 ] = 7.21

Solution #1 (Best solution)
(works for skew and parallel lines in 2D & 3D)
Q or P1 (-2, 6)
P or p2 (2, -1)
QP is (4, -7)

y = -2/3 x
so, N is (3, -2)

d = |QP dot N| / ||N||

d = |4 * 3 + (-2)(-7)| / (sq rt of (9 + 4) )

d = |12 + 14| / (sq rt of 13)

d = (2 * 13) / (sq rt of 13)

d = 2 * (sq rt of 13)

d = 7.2

Solution #3:
(works only for parallel lines)

Equation #1: y = 3/2 x + 9 or y_1 = 1.5 * x_1 + 9
Equation #2: y = 3/2 x -4 or y_2 = 1.5 * x_2 - 4

Both lines are parallel. Thus, any point on one line can be used to calculate
the distance to the second line.

- when 'x_1 = 0', 'y_1 = 9' and this is our point on line #1
- line #2 can be rewritten as '1.5 * x_2 - y_2 - 4 = 0'
- this gives the three parameters 'A = 1.5', 'B = -1' and 'C = -4'
where 'A*x_2 + B*y_2 + C = 0'
- the distance 'd' between the point P(x_1=0, y_1=9) and the above
line can be calculated by the formula:
'd = |(A*x_1 + B*y_1 + C)|/sqrt(A^2 + B^2)'
- this results in the distance 'd = 13/sqrt(1.5^2 + 1) ~= 7.2111025'
 
dat_student said:
Please, let me know how you got 13 😕

I got 7.2 and these are my 3 solutions:

Solution #2 (easiest solution)
(Easiest, only works for this problem, doesn't work for skew lines in 3D)

Find the intersection of y = -2/3 x with the other two lines
and then use the points of intersection to find the distance

points of intersection are approx. (-4.15, 2.77) & (1.85, -1.23)

d = sq rt of [ (4.15 + 1.85)^2 + (2.77 + 1.23)^2 ] = 7.21

Solution #1 (Best solution)
(works for skew and parallel lines in 2D & 3D)
Q or P1 (-2, 6)
P or p2 (2, -1)
QP is (4, -7)

y = -2/3 x
so, N is (3, -2)

d = |QP dot N| / ||N||

d = |4 * 3 + (-2)(-7)| / (sq rt of (9 + 4) )

d = |12 + 14| / (sq rt of 13)

d = (2 * 13) / (sq rt of 13)

d = 2 * (sq rt of 13)

d = 7.2

Solution #3:
(works only for parallel lines)

Equation #1: y = 3/2 x + 9 or y_1 = 1.5 * x_1 + 9
Equation #2: y = 3/2 x -4 or y_2 = 1.5 * x_2 - 4

Both lines are parallel. Thus, any point on one line can be used to calculate
the distance to the second line.

- when 'x_1 = 0', 'y_1 = 9' and this is our point on line #1
- line #2 can be rewritten as '1.5 * x_2 - y_2 - 4 = 0'
- this gives the three parameters 'A = 1.5', 'B = -1' and 'C = -4'
where 'A*x_2 + B*y_2 + C = 0'
- the distance 'd' between the point P(x_1=0, y_1=9) and the above
line can be calculated by the formula:
'd = |(A*x_1 + B*y_1 + C)|/sqrt(A^2 + B^2)'
- this results in the distance 'd = 13/sqrt(1.5^2 + 1) ~= 7.2111025'


1) STOP using that d formula...it's only for certain problems...like a question that gives you an x,y and z for one line and an x,y and z for another line and the question would ask you what is the distance between two points. In your question you are NOT dealing with points, you are dealing with 2 lines

2) I will prove my answer mathmatically, but like I said you don't have to waste your time on the test doing this. Ok....
a) take your either equation and solve for x.
y=3/2x -4 solve and you get -17/3
b) shove this into the other equation (y=3/2x+ 9) and solve for y...you get .5


so, now you have an x and y coordinate for the lone of y=3/2x+9

remember that your slope is the same for both lines so take the x(-17/3) and put it back into the other eqaution and solve for y...you get -12.5.

c) grpahboth lines and the distance between .5 and -12.5 is 13.

But, like I said you don't even have to do math for this problem...think about it logically. The slopes are equal and tell you that the lines are parallel. No matter what number you put in for x(0,1, etc) you have to put the same x value in for both equations and solve for y. You will always get a difference of 13. Try it...substitute 0,1,2 in for x each time and you will always get a y difference of 13. The lines will always be horizontally parallel for this equation because the slopes are the same value!

I hope this helps...let me know 🙂
 
soflamel said:
1) STOP using that d formula...it's only for certain problems...

The formula for solution #1 is a very general formula. It works for all problems in all dimensions.

soflamel said:
...I will prove my answer mathmatically,...

please prove it mathematically because correct answer is NOT 13.

soflamel said:
a) take your either equation and solve for x.
y=3/2x -4 solve and you get -17/3
b) shove this into the other equation (y=3/2x+ 9) and solve for y...you get .5


so, now you have an x and y coordinate for the lone of y=3/2x+9

remember that your slope is the same for both lines so take the x(-17/3) and put it back into the other eqaution and solve for y...you get -12.5.

c) grpahboth lines and the distance between .5 and -12.5 is 13.

please, show all the steps. Again, the correct answer is NOT 13. We want the minimum distance, not just any distance.
 
dat_student said:
The formula for solution #1 is a very general formula. It works for all problems in all dimensions.



please prove it mathematically because correct answer is NOT 13.



please, show all the steps. Again, the correct answer is NOT 13. We want the minimum distance, not just any distance.

Who said the answer isn't 13?
 
soflamel said:
Who said the answer isn't 13?

Please, prove it mathematically.

P.S. draw both lines on a piece of paper. Draw a line that's perpendicular to both lines and then measure the line. The length of that line is NOT 13. It's 7.2. That's my proof for my 3 solutions.
 
dat_student said:
Please, prove it mathematically.

P.S. draw both lines on a piece of paper. Draw a line that's perpendicular to both lines and then measure the line. The length of that line is NOT 13. It's 7.2. That's my proof for my 3 solutions.

The answer is 13

If you take out a piece of graph paper and graph the two lines the distance between them is 13. No matter where you move along the x axis the distance between those lines (on the y axis) is 13!

By the way, one of my classmates (also a 4th year dental student) just stopped by my apartment. I gave him your question, he looked at it for 2 seconds and said 13. We both are saying the same things. We don't remember using that d formula on the DAT and the DAT math is easy. If you solve for x like I said and then solve for y. Take that same x value and solve for y in the second equation, you have 2 sets of points to graph. If you don't believe it just graph it...they are linear equatons!!!! They are NEVER, NEVER, NEVER going to intersect because they are parallel lines with a constant slope(3/2x). It doesn't matter what value x is because it's the same for both equations. This isn't vectors. Did you do the math like I told you to do?
 
soflamel said:
The answer is 13

If you take out a piece of graph paper and graph the two lines the distance between them is 13. No matter where you move along the x axis the distance between those lines (on the y axis) is 13!

By the way, one of my classmates (also a 4th year dental student) just stopped by my apartment. I gave him your question, he looked at it for 2 seconds and said 13. We both are saying the same things. We don't remember using that d formula on the DAT and the DAT math is easy. If you solve for x like I said and then solve for y. Take that same x value and solve for y in the second equation, you have 2 sets of points to graph. If you don't believe it just graph it...they are linear equatons!!!! They are NEVER, NEVER, NEVER going to intersect because they are parallel lines with a constant slope(3/2x). It doesn't matter what value x is because it's the same for both equations. This isn't vectors. Did you do the math like I told you to do?


ok, it's 13. Can you prove it mathematically or show all your steps (without skipping anything)? Thanks
 
i agree with dat_student....
the answer is 13 only if the points are located on the same y axis, but the two closest points are actually closer then 13 but for some reason i dont get 7.2
i get 7.81
 
Top