1. ## The perpendicular distance-vector

Find the perpendicular distance of the point (p,q,r) from the plane ax+by+cz=d

2. Hello, kingkaisai2!

You've been asked to derive this distance formula . . . messy!

Find the perpendicular distance of the point $(p,q,r)$ from the plane $ax+by+cz\:=\:d$

We want a line from $P_1(p,q,r)$ perpendicular to the plane.

The plane has normal direction: $\vec{n} = \langle a,b,c\rangle$
So our line has parametric equations: $\begin{Bmatrix}x = p + at\\y = q + bt\\z = r + ct\end{Bmatrix}$

To find $P_2$, the intersection of the line and the plane:
. . . $a(p + at) + b(q + bt) + c(r + ct) \:= \:d$

. . and solve for $t:\;\;t\;=\;\frac{d - ap - bq - cr}{a^2+b^2+c^2}$ . . . call this $T$

Then $P_2$ is: . $(p + aT,\:q + bT,\:r + cT)$

Let $D$ be the desired distance.

Then: $D^2\:=\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 +" /> $(r + cT - r)^2$

. . . . $D^2 \;= \;a^2T^2 + b^2T^2 + c^2T^2\;=\;T^2(a^2+b^2+c^2)$

Since $T = \frac{d - ap - bq - cr}{a^2+b^2+c^2}$

. . we have: . $D^2\;=\;\frac{(d - ap - bq - cr)^2}{(a^2+b^2+c^2)^2}(a^2+b^2+c^2) \;= \;\frac{(d - ap - bq - cr)^2}{a^2 + b^2 + c^2}$

Hence: . $D \;= \;\sqrt{\frac{(d - ap - bq - cr)^2}{a^2 + b^2 + c^2}}$

Therefore: . $\boxed{D \;= \;\frac{|ap + bq + cr - d|}{\sqrt{a^2+b^2+c^2}}}$