# Distance from point to line

1. Jan 29, 2006

### UrbanXrisis

Find the distance from the point (3, 5, 1) to the line x=0,y=5+4t,z=1+4t

I know that there is a distance formula for a point and a plane but how do I find the distance from a point to a line?

2. Jan 29, 2006

### 0rthodontist

Well, you could do this with vectors and orthogonality. First shift everything so that the line passes through the origin, then find the projection of the shifted point onto the shifted line, and the distance between that projection and the shifted point is the distance between the original point and line.

3. Jan 29, 2006

### HallsofIvy

Staff Emeritus
I don't happen to have the formula memorized (but I know it is in my Calculus book) so let's work it out:
Let (x,y,z) be the point on the line closest to (3, 5, 1). A vector pointing from (3, 5, 1) to (x, y, z) is (x-3)i+ (y-5)j+ (z-1)k. Of course, the line from (3, 5, 1) to (x, y, z) must be perpendicular to the given line. (If not, construct a right triangle have that line as hypotenuse and the given line as "opposite" side. Since the hypotenuse of a right triangle is the longest side in any right triangle, it can't be the shortest distance.)
A vector in the direction of the given line is, of course, 4j+ 4k and that must be perpendicular to (x-3)i+ (y-5)j+ (z-1)k:
(4j+ 4k).((x-3)i+ (y-5)j+ (z-1)k)= 4(y-5)+ 4(z- 1)= 0 so 4y- 20+ 4z- 4= 0 and 4y+ 4z= 24 or y+ z= 6. We now can write the point (x,y,z) as (0, y, 6-y) (x= 0 for any point on the line and clearly z= 6- y).

The distance function is
$$D= \sqrt{(x-3)^2+ (y- 6)^2+ (z-1)^2}= \sqrt{9+ (y-6)^2+ (5-y)^2}$$
Minimize that, or better,
$$D^2= 9+ (y-6)^2+ (5-y)^2= 9+ y^2- 12y+ 36+ 25-10y+ y^2= 3y^2-22y+ 70$$

4. Jan 29, 2006