Distance between a straight line and a plane in space

Notice the relative positions between a straight line r and a plane π to calculate the distance between them:

  • If the straight line is included in the plane or if the straight line and the planes are secant, the distance between both is zero, d(r,π)=0
  • If the straight line and the plane are parallel, the distance between both is calculated taking a point P of the straight line and calculating the distance between P and the plane. d(r,π)=d(P,π) where Pr

Example

Find the distance between the straight line r:x2=y=z+1 and the plane π:x+y2z+3=0.

We verify that the plane and the straight line are parallel using the scalar product between the governing vector of the straight line, v, and the normal vector of the plane n. If the straight line and the plane are parallel the scalar product will be zero: vn=(1,1,1)(1,1,2)=1+12=0

So they are parallel. We look for a point of the straight line, Q=(2,0,1), and apply the formula: d(r,π)=d(P,π)=|12+102(1)+3|12+12+(2)2=76