# 3-D geometry question based on direction ratios

Let $$ax + by + cz + d = 0$$ be equation of a plane and

$$\frac{x-x_1}{a_1} = \frac{y-y_1}{b_1} = \frac{z-z_1}{c_1}$$ be equation of a line.

How to find the distance between a point say $(x_2,y_2,z_2)$ and the given line measured parallel to the given plane?

What should be the approach?

We have $P (x_2, y_2, z_2)$ and let $Q(x, y, z)$ be the point on the line given. Then we have $Q(x,y,z) =Q(a_1k +x_1, b_1k + y_1, c_1k + z_1)$ where $k$ is a constant.

We need the line $PQ$ to be parallel to the plane $\pi: ax+by+cz +d=0$. If this line $PQ$ is parallel to the plane then its direction vector must be perpendicular to the plane's normal vector.

The direction vector normal or perpendicular to the plane $ax + by +cz + d= 0$ is $D (a, b, c)$. Now, if two vectors are perpendicular then their scalar or dot product is zero. Therefore $D$ and $PQ$ are perpendicular to each other.

Thus we solve for $k$ in the equation $$a (a_1k +x_1-x_2) +b (b_1k + y_1-y_2) + c (c_1k + z_1-z_2) =0$$ and find the point $Q$ and find the distance. Hope it helps .

• Nice approach. I just think you forgot $(x_2,y_2,z_2)$ is the final equation. – Roberto Rastapopoulos Jan 21 '17 at 9:16
• You got to subtract x2,y2,z2 to find the direction ratio and then multiply with a,b,c to get 0. – Resorcinol Jan 21 '17 at 9:22
• @Resorcinol Typo corrected. Thank you for pointing it out. – Rohan Jan 21 '17 at 9:27
• @UrbainVaes Typo corrected. Thank you for pointing it out. – Rohan Jan 21 '17 at 9:28

We first calculate the equation of the plane containing $(x_2,y_2,z_2)$ and parallel to the one given. The equation is $$a\,(x - x_2) + b\,(y-y_2) + c(z-z_2) = 0.$$ The distance you are looking for is the distance between $(x_2,y_2,z_2)$ and the intersection point between this plane and the line. To calculate this point, it helps to write the equation of the line parametrically: $$x = a_1 s + x_1, \quad y = b_1 s + y_1, \quad z = c_1 s + z_1, \quad s \in \mathbb R.$$ Inserting these expressions in the equation of the plane, we find $$a(a_1 s + x_1 - x_2) + b(b_1 s + y_1 - y_2) + c(c_1 s + z_1 - z_2) = 0,$$ from which we have: $$s(a\,a_1 + b\,b_1 + c\,c_1) = a\,(x_2 - x_1) + b\,(y_2 - y_1) + c(z_2 - z_1).$$ Assuming that the expression between round brackets is nonzero, i.e. assuming that the vector normal to the plane is not orthogonal to the direction of the straight line, $$s = (a\,(x_2 - x_1) + b\,(y_2 - y_1) + c(z_2 - z_1))/(a\,a_1 + b\,b_1 + c\,c_1).$$ Plugging back in the equation of the line, the intersection point can be calculated, and then the distance.