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

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:

Staff Emeritus
Gold Member
2021 Award
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.

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?

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$$.