# Homework Help: Distance of a point from a line (3-D)

1. Aug 28, 2008

### forty

Find the distance of the point P(-1, 2, -1) from the line whose parametric equations are:

x = 2+2t
y = 2-t
z = -3-3t

***

So i worked out the vector equation of the line r = ro + vt

r = (2,2,-3) + t(2,-1,-3)

if i take the dot product of the the point P with the t component of r and equate it to 0 will the value of t give me the point on the line that is closest to P?

(-1,2,-1) . (2+2t,2-t,-3-3t) = 0

-2-2t+4-2t+3+3t = 0

t = 5

So if i use that value in r to get the point (12,-3,-18) is that point the closest point to P? in which case calculating the distance is just the distance from this point to P?

I have a feeling this is all so very very wrong >.<

Thanks :)

************EDIT

This is obviously wrong, re-working this out and will repost to see if what i come up with is even logical ;)

*************NEW try

If i put everything relative to the origin ie so the r vector becomes just t(2,-1,-3) and P becomes (-3,0,2). then take some point on the line Q = (x,y,z) that is closest to P, then QP.r should = 0 (perpendicular)

QP = OP - OQ = (-3,0,2) - (x,y,z) = (-3-x,-y,2-z)

then (-3-x,-y,2-z).(2,-1,-3) = 0

which gives -2x + y + 3z = 12

so where to from here? (if my logic is right)

Last edited: Aug 28, 2008
2. Aug 28, 2008

### HallsofIvy

No, it won't and you have no reason to thinks so.

It is!

gives that as what? What is the significance of that equation? It appears to be the equation of a plane but what plane?

The line from the point to the line is, as you say, perpendicular to the line but there is a whole plane of of such lines through any point on the line. You need first to find the plane perpendicular to that line, containing (-1, 2, -1).
But that's easy. As you have already determined, the direction vector of the line is <2, -1, -3>. And that vector is normal to any plane that is normal to the line. So the plane you want is the plane having normal vector <2, -1, -3> and containing point (-1, 2, -1). Of course, that is given by 2(x+1)- (y- 2)- 3(z+ 1)= 0 or 2x-y- 3z+ 1= 0.

Now, where does the given line intersect that plane? Do you see that that point is the point where the perpendicular from (-1, 2, -1) intersects the line? And so the distance between those points is the distance from the point to the line?

3. Aug 28, 2008

### forty

i really need pictures >.<

so what i think your saying is:

point where the plane 2x-y- 3z+ 1= 0 and the line given to me r = (2,2,-3) + t(2,-1,-3) intersect is the point that is the closest to point P. so if i find where that line intersects this plane then just calculate the distance from this point to P thats the answer?

4. Aug 28, 2008

### forty

worked it out to be root(19/7) using pythag theorem

thanks for your help !

5. Aug 28, 2008

### HallsofIvy

?? Not root(19)/7? Be careful!

6. Aug 28, 2008

### forty

i feel bad saying this... but are you sure?

2 of my friends both worked it out to be the root(19/7)

!_!

7. Oct 14, 2009

### gbalajimecse

how to find 3D point on the 3D line with given distance and from given 3D point

Hi

how to find 3D point(lie on line) on the 3D line with given distance and from given 3D point(this is also lie in line) where the given line equation

Please explain the derivation

8. Oct 14, 2009

### Staff: Mentor

Re: how to find 3D point on the 3D line with given distance and from given 3D point

Rather than hijacking a thread that's over a year old, you should start a brand-new thread.

9. Jul 26, 2010

### mac888_00

take the ro of the vector equation and the point given and put it into the formula

(a(x1)+b(y1)+c(z1))/sqrt((a^2)+(b^2)+(c^2))