Coordinate Geometry (Analytic Geometry) in Three-dimensional Space
Point, Line and Plane - orthogonal projections, distances, perpendicularity of line and plane Through a given point lay a line perpendicular to a given line
A line which will pass through a given point perpendicular to a given line will lie in a plane that is perpendicular to the given line and which passes through the given point.
The equation of that line is then determined by two points, the given point and by its projection onto the given line or the intersection with the plane.
 Example:  Through the point A(-6, -3, 4) pass a line perpendicular to the line Solution:   Through the given point lay a plane perpendicular to the given line, therefore N = s = 3i - 4j - 3k. Plug the point A into the plane, A(-6, -3, 4)  =>   3x - 4y - 3z + D = 0,   D = 18. So, the equation of the plane P ::  3x - 4y - 3z + 18 = 0. The intersection A´, as the common point of the given line and the plane P, can be determined by plugging its parametrically expressed coordinates into the equation of the plane, that is  plug these variable coordinates of a point that moves along the line A into the plane P
3 · (3t + 2) - 4 · (-4t - 1) - 3 · (-3t - 2) + 18 = 0,      t = -1.
Thus, determined is parameter t such that the point lies onto the lines l and l1 and the plane P, so that
x = 3t + 2 = 3 · (-1) + 2 = -1,    y = -4t - 1 = -4 · (-1) - 1 = 3 and  z = -3t - 2 = -3(-1) - 2 = 1
the coordinates of the intersection (-1, 3, 1).
To write the equation of the line l1 through the points, A(-6, -3, 4) and (-1, 3, 1), that is perpendicular to the given line l, we should calculate its direction vector and include one of its points.
The direction vector s1 we get as the difference between positions vectors of the points, A and
s1 = rA - rA  =  (-6i  - 3 j  + 4k) - (-i + 3 j + k) = -5i  - 6j  + 3k
then, we plug any of its points, A or to form the equation of the line l1. So, let plug the point A Let check the result by calculating the scalar product of the vectors,  s and s1
s · s1 = (3i - 4j - 3k) · (-5i  - 6j  + 3k) = 3 · (-5)  + (-4) · (-6)  + (-3) · 3 = 0, since  s ^ s1.   Coordinate geometry contents 