A is any point on a straight line and b is any point on a plane.
Then, the distance d from the straight line to this plane is equal to the absolute value of the projection of vector AB on vector N. 。
That is: d=|n times AB|/|n|.
If you like, you can naturally change it to coordinate expression.