How to find a line perpendicular to another line and through a point.

1. Sep 19, 2013

iScience

i'm given some line and a point (not on that line), and i want to find a line that is perpendicular to given line and passes through the given point.

here is what i've tried so far. please tell me where i went wrong.

given line:

x=at+x0
y=bt+y0
z=ct+z0

given point: P(Px,Py,Pz)

my method is to use coordinate transformation basically. but apparently i've done it incorrectly.

<x0,y0,z0> is the initial point if you will on the line; it is the initial vector we are starting from when @ t=0. but this vector is with respect to some origin. as shown in the picture here.
http://i.imgur.com/dFs5FvQ.png

i wanted to redefine my origin at the point P such that the vector traversing through parameter t would always originate from point P like so
http://i.imgur.com/fvvWpoq.png

(where my starting point on the line ((t=0) is r0)

so to redefine the starting/initial vector..

<x0,y0,z0> - (Px,Py,Pz) would give me $\vec{Pr }$0

and here's where i think i got it wrong; i figured the following would give me the line's vector component

<a,b,c> - (Px,Py,Pz)

my idea was, when find the magnitude of the line's new equation, then take the derivative with respect to t, then set this equal to zero and this would yield the minimum distance from P to some point along the line. but i tried this and the math is not working out where did i go wrong?

Last edited: Sep 19, 2013
2. Sep 19, 2013

Office_Shredder

Staff Emeritus
You're making life too difficult. If I want the line to pass through P when t=0, what are x0, y0 and z0? No changing origins or anything.

The values of a,b and c will depend on the line you want to be perpendicular to.

3. Sep 21, 2013

iScience

well.. all that was to determine a b and c. the idea was to find the orthogonal by minimizing d the distance. any suggestions on how else i could approach the problem?

4. Sep 21, 2013

HallsofIvy

Staff Emeritus
If the problem is to find a line perpendicular to a given line in three dimensions, at a given point on the line there is NO unique solution. At any point on the given line, there exist a plane perpendicular to the given line. Any line on that plane, through the given point, is such a line.

If the problem is to find a line perpendicular to the given line through a given point not on the line then first find the plane perpendicular to the given line containing the given point.

If the given line is x= at+ d, y= bt+ e, z= ct+ f, then any plane perpendicular to that line has equation ax+ by+ cz= D. If the given point is $(x_0, y_0, z_0)$ then we must have $$ax_0+ by_0+ cz_0= D$$ so the equation of the plane perpendicular to the given plane, containing the given point, is $$ax+ by+ cz= ax_0+ by_0+ cz_0$$ or, equivalently, $$a(x- x_0)+ b(y- y_0)+ c(z- z_0)= 0$$.

Now find the point where the given line intersects that plane: replace x, y, and z in the equation of the plane with at+ d, bt+ e, and ct+ f, and solve for t. The line through the given point and that point of intersection is the desired perpendicular line.

Last edited: Sep 21, 2013