If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

# Point distance to plane

Distance between a point and a plane in three dimensions. Created by Sal Khan.

## Want to join the conversation?

• Where can I practice? I feel like the materials I absorbed previously faded away after a new lesson
• how come there can be no negative distance i mean is it possible or would the answer end up just being no solution or zero? @-@ (confused face)
• distance should be seen in absolute terms there is no direction to it
it can be measured in some direction but itself has no direction in particular
• At ,It is said that the angle between vector f and d is same as that of vector f and normal vector n.How?
• d is the smallest distance between the point (x0,y0,z0) and the plane. to have the shortest distance between a plane and a point off the plane, you can use the vector tool. This vector will be perpendicular to the plane, as the normal vector n. So you can see here thar vector n and pseudovector d have the same direction but not necessary the same magnitude, because n could have all the magnitude, on the contrary, the magnitude of d is fixed by the magnitude and the dircetion of f. So given that d and n have same directions, and n is not FIXED (it's a vector), the angle is the same, sorry for my English, hope it will help you
• Since the method for deriving this formula takes advantage of the dot product (as opposed to the cross product), does that imply this point distance to plane formula can be generalized to N-dimensions?

The plane formula Ax + By +Cz +D = 0 only works in R3.
But the parameter form of a plane works in all Rn dimensions.

Similarly, The form of a line: ax +by + c = 0 only works for R2.
But the parameter form of a line works in all Rn.
• Why is the cross product defined only for R3?
• Can anyone point out why this formula is very similar to the point-line distance formula: | ax+by+c | / Sqrt(a^2 + b^2) ?
• The equation of a line in R^2 is the equation of a plane in R^3. Namely `mx+b = y` is a plane in R^3 since z isn't constrained by that equation.
• At around the 3.5 minute mark (around ), Sal writes magnitude as "|f|". This pattern continues and later on at , he does something similar when depicting the magnitude of the normal vector. Should it not have a double pipe on both sides as in "||f||"? This is how it was described in earlier videos.
• Yeah, he probably should have, if only to be consistent with his notation. But, to be honest, there's no reason I know of that the || v || notation for vector magnitude should be different from the | x | notation for absolute value. Actually, when I learned it, my professor told us to use the single bar notation throughout unless we were working with someone who would be fussy over unimportant details, so he probably didn't know a good reason either. ^_^
• is normal vector a kinda position vector?
• Normal vector is really a direction vector (as it specifies the direction from a location), not a position vector.
• Sal starts using the vector notation x = a(i hat) + b(j hat) + c(k hat) rather than the big bracket vertical notation used in the previous videos. Is there a video where he explains this new notation?
• There is. It seems to be brand new (didn't exist when you asked the question). It's at Linear Algebra -> Vectors and Spaces -> Vectors -> Unit vector notation
(1 vote)
• I got the same formula using another way that seemed more straightforward to me:

1. Vector p0 is the position of an arbitrary point in R3.

3. Nonzero vector n and scalar D define a plane formed by all position vectors p such that n*p=D (this is equivalent to ax+by+cz=D if you do the dot-multiplication of n=[a,b,c] and p=[x,y,z]).

4. p1 is the position vector of the closest point on the plane to p0.

5. d is the vector that goes from p1 to p0.

6. Because of 4 and 5, we know that d must be parallel to n.

7. Because of 6, d=kn for some scalar k.

8. From 7, take length of each side: |d|=k|n|. !This is what we're looking for!

9. Because of 5, d=p0-p1.

10. Substitute 7 into 9: kn=p0-p1

11. From 10, add (p1-kn) to each side: p1=p0-kn.

12. 4 tells us that p1 is on the plane defined in 3, so n*p1=D.

13. Substitute 11 into 12: n*(p0-kn)=D.

14. From 13, distribute: n*p0-kn*n=D.

15. Any vector dot itself is its length squared, so 14 becomes n*p0-k|n|^2=D.

16. From 15, add (k|n|^2-D) to each side: n*p0-D=k|n|^2.

17. From 16, divide each side by |n|: (n*p0-D)/|n|=k|n|.

18. Substitute 8 into 17: (n*p0-D)/|n|=|d|.

And that's it! We've solved for the shortest distance between an arbitrary point and an arbitrary plane.

If you like, you can expand the convert all the vectors to scalars to get exactly Sal's formula:

n=[a,b,c]
p0=[x0,y0,z0]
([a,b,c)]*[x0,y0,z0]-D)/|(a,b,c)|=|d|
(ax0+by0+cz0-D)/sqrt(a^2+b^2+c^2)=|d|