You've been asked to derive this distance formula . . . messy!
Find the perpendicular distance of the point from the plane
We want a line from perpendicular to the plane.
The plane has normal direction:
So our line has parametric equations:
To find , the intersection of the line and the plane:
. . .
. . and solve for . . . call this
Then is: .
Let be the desired distance.
Then: P_1P_2)^2\:=\p + aT - p)^2 + (q + bT - q)^2 +" alt="D^2\:=\P_1P_2)^2\:=\p + aT - p)^2 + (q + bT - q)^2 +" />
. . . .
. . we have: .