Distance from a point to a plane explained

In Euclidean space, the distance from a point to a plane is the distance between a given point and its orthogonal projection on the plane, the perpendicular distance to the nearest point on the plane.

ax+by+cz=d

that is closest to the origin. The resulting point has Cartesian coordinates

(x,y,z)

:

\displaystylex=

ad
{a2+b2+c2
}, \quad \quad \displaystyle y = \frac, \quad \quad \displaystyle z = \frac .The distance between the origin and the point

(x,y,z)

is

\sqrt{x2+y2+z2}

.

Converting general problem to distance-from-origin problem

Suppose we wish to find the nearest point on a plane to the point (

X0,Y0,Z0

), where the plane is given by

aX+bY+cZ=D

. We define

x=X-X0

,

y=Y-Y0

,

z=Z-Z0

, and

d=D-aX0-bY0-cZ0

, to obtain

ax+by+cz=d

as the plane expressed in terms of the transformed variables. Now the problem has become one of finding the nearest point on this plane to the origin, and its distance from the origin. The point on the plane in terms of the original coordinates can be found from this point using the above relationships between

x

and

X

, between

y

and

Y

, and between

z

and

Z

; the distance in terms of the original coordinates is the same as the distance in terms of the revised coordinates.

Restatement using linear algebra

The formula for the closest point to the origin may be expressed more succinctly using notation from linear algebra. The expression

ax+by+cz

in the definition of a plane is a dot product

(a,b,c)(x,y,z)

, and the expression

a2+b2+c2

appearing in the solution is the squared norm

|(a,b,c)|2

. Thus, if

v=(a,b,c)

is a given vector, the plane may be described as the set of vectors

w

for which

vw=d

and the closest point on this plane to the origin is the vector
p=vd
|v|2
.[1] [2]

The Euclidean distance from the origin to the plane is the norm of this point,

|d|
|v|

=

|d|
\sqrt{a2+b2+c2
}.

Why this is the closest point

In either the coordinate or vector formulations, one may verify that the given point lies on the given plane by plugging the point into the equation of the plane.

To see that it is the closest point to the origin on the plane, observe that

p

is a scalar multiple of the vector

v

defining the plane, and is therefore orthogonal to the plane.Thus, if

q

is any point on the plane other than

p

itself, then the line segments from the origin to

p

and from

p

to

q

form a right triangle, and by the Pythagorean theorem the distance from the origin to

q

is

\sqrt{|p|2+|p-q|2}

.Since

|p-q|2

must be a positive number, this distance is greater than

|p|

, the distance from the origin to

p

.[2]

Alternatively, it is possible to rewrite the equation of the plane using dot products with

p

in place of the original dot product with

v

(because these two vectors are scalar multiples of each other) after which the fact that

p

is the closest point becomes an immediate consequence of the Cauchy–Schwarz inequality.[1]

Closest point and distance for a hyperplane and arbitrary point

The vector equation for a hyperplane in

n

-dimensional Euclidean space

Rn

through a point

p

with normal vector

a\ne0

is

(x-p)a=0

or

xa=d

where

d=pa

.[3] The corresponding Cartesian form is

a1x1+a2x2+ … +anxn=d

where

d=pa=a1p1+a2p2+ … anpn

.[3]

The closest point on this hyperplane to an arbitrary point

y

is

x=y-\left[\dfrac{(y-p)a

}\right]\mathbf=\mathbf-\left[\dfrac{\mathbf{y}\cdot\mathbf{a}-d}{\mathbf{a}\cdot\mathbf{a}}\right]\mathbfand the distance from

y

to the hyperplane is

\left\|x-y\right\|=\left\|\left[\dfrac{(y-p)a

}\right]\mathbf\right\|=\dfrac=\dfrac.[3]

Written in Cartesian form, the closest point is given by

xi=yi-kai

for

1\lei\len

where

k=\dfrac{ya-d}{aa

}=\dfrac,and the distance from

y

to the hyperplane is

\dfrac{\left|a1y1+a2y2+ … anyn-d\right|}{\sqrt{a

2+ …
2
2}}
a
n
.

Thus in

R3

the point on a plane

ax+by+cz=d

closest to an arbitrary point

(x1,y1,z1)

is

(x,y,z)

given by

\left.\begin{array}{l}x=x1-ka\\y=y1-kb\\z=z1-kc\end{array}\right\}

where

k=\dfrac{ax1+by1+cz

2+b
1+d}{a

2+c2}

,and the distance from the point to the plane is

\dfrac{\left|ax1+by1+cz

2+b
1+d\right|}{\sqrt{a

2+c2}}

.

See also

Notes and References

  1. .
  2. .
  3. Book: Cheney. Ward. Kincaid. David. Linear Algebra: Theory and Applications. 2010. Jones & Bartlett Publishers. 9781449613525. 450, 451.