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

  • Thread starter iScience
  • Start date
  • #1
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:


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.

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

(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 [itex]\vec{Pr }[/itex]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:

Answers and Replies

  • #2
Staff Emeritus
Science Advisor
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.
  • #3
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
Science Advisor
Homework Helper
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 [itex](x_0, y_0, z_0)[/itex] then we must have [tex]ax_0+ by_0+ cz_0= D[/tex] so the equation of the plane perpendicular to the given plane, containing the given point, is [tex]ax+ by+ cz= ax_0+ by_0+ cz_0[/tex] or, equivalently, [tex]a(x- x_0)+ b(y- y_0)+ c(z- z_0)= 0[/tex].

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 by a moderator:

Suggested for: How to find a line perpendicular to another line and through a point.