A TRIGONOMETRIC DERIVATION OF POINT–TO–LINE

AND POINT–TO–PLANE DISTANCE FORMULAS

Bella Wiener and Joseph Wiener

University of Texas–Pan American

The aim of the note is to obtain the distance formulas in an elementary fashion with a minimal amount of calculations. Why should there be interest in this very old problem which had been resolved in so many different ways? Admittedly, one can use partial derivatives to minimize the square of the distance between the given point and a variable point on the line or plane, but the method is far beyond the means of precalculus. Furthermore, algebraic attempts to minimize this function involve a large number of tedious computations. Some students suggest a straightforward approach that includes the following steps: write an equation of the line which is perpendicular to the given line and passes through the given point; solve the system of equations and thus, find the point of intersection of the lines; to complete the solution, use the distance formula between two points. This is easier said than done, and soon we realize that the volume of calculations is overwhelming. Another procedure offered in some texts reduces the problem to finding the distance between parallel lines. One has to admit that this method is not encouraging either.

On the other hand, our trigonometric method is elementary and short, and it works for both the line and plane. From the given point P (x_{0}, y_{0}) draw a perpendicular P Q to the x–axis and a perpendicular P R to the given line (L) : Ax + By + C = 0. Assuming (L) is not vertical, let H(x_{0}, y_{1}) be the point of intersection of P Q and (L). We notice that the points P and H have the same first coordinate x_{0} because P Q is perpendicular to the x–axis. Also, we observe that the coordinates of H satisfy the equation of the line (L), that is,

(1)  Ax_{0} + By_{1} + C = 0 or By_{1} = −Ax_{0} − C.

For the slope of (L) we can write the formulas

m = −\frac{A}{B} and m = tan θ,

where θ is the angle between the line and the x–axis. Therefore, tan θ = −A/B. Since P Q ⊥ Ox and P R ⊥ (L), then ^{}R̸P H = π − θ. Denote by d and c the lengths of P R and P H, respectively. From △RP H we have

d = c| cos(π − θ)| = |y_{0} − y_{1}| · | cos θ|.

From the trigonometric identity sec^{2} θ = tan^{2} θ + 1 we get

cos^{2}θ = \frac{1}{tan^{2} θ + 1} and | cos θ| = \frac{1}{\sqrt{tan^{2} θ + 1}}.

Hence,

\begin{aligned}d = \frac{|y_{0} − y_{1}|}{\sqrt{tan^{2} θ + 1}} & = \frac{|y_{0} − y_{1}|}{\sqrt{\frac{A^{2}}{B^{2}} + 1}} \\ & = \frac{|By_{0} − By_{1}|}{\sqrt{A^{2} + B^{2}}}, \end{aligned}

and it remains to substitute here By_{1} with its expression (1), to obtain the well known formula for the distance from a point to a line:

d = \frac{|Ax_{0} + By_{0} + C|}{\sqrt{A^{2} + B^{2}}}.

The simplicity of the trigonometric method is just one of its advantages. Its generality enables us to find, in the same manner, the distance formula from a point to a plane. To calculate the distance from the point P (x_{0}, y_{0}, z_{0}) to the plane Ax + By + Cz + D = 0, we draw from P a perpendicular P Q to the coordinate plane x0y and a perpendicular P R to the given plane. Assuming the given plane is not parallel to the z–axis, the point H where P Q crosses this plane has coordinates (x_{0}, y_{0}, z_{1}) that satisfy the equation

Ax_{0} + By_{0} + Cz_{1} + D = 0,

whence

(2)  Cz_{1} = −Ax_{0} − By_{0} − D.

The length of P H equals |z_{0} − z_{1}|, and from the right triangle RP H we find

d = |z_{0} − z_{1}| · | cos θ|,

where d is the length of P R and θ = ^{}R̸P H. Note that θ is the angle between P Q (which is parallel to the z–axis) and P R (which is perpendicular to the given plane.) Hence,

cos θ = \frac{c}{\sqrt{A^{2} + B^{2} + C^{2}}} ,

since A, B, and C are the components of a vector normal to the plane. By virtue of (2),

d = \frac{|Cz_{0} − Cz_{1}|}{\sqrt{A^{2} + B^{2} + C^{2}}} = \frac{|Ax_{0} + By_{0} + Cz_{0} + D|}{\sqrt{A^{2} + B^{2} + C^{2}}}.