# Clarification on the use of dot product in the formula for a plane's distance to origin

I decided to take on MIT Multivariable Calculus to get a review for next semester. Having some struggles with this question though and the solutions aren't really helping me out much, thinking I might be seeing this in a naíve way and am missing a step on how they got there.

Suppose a plane $ax+by+cz = d$

We are supposed to prove the formula $D = \frac{\mid d \mid}{\sqrt{a²+b²+c²}}$ where D is the distance to the origin.

I was having some troubles with the proof, checked the solution and slowly started to get a clue, but need to see if I'm getting this right.

So we suppose a $P_0 = (x_0,y_0,z_0)$ and know that the normal vector is $\vec{N} = (a,b,c)$.

The solution started like this $\vec{OP}.\frac{\vec{N}}{|\vec{N}|}$ and then by usual operations it got to the formula that we wanted.

So my question is, am I supposed to see the dot product as the projection of the vector that connects the origin to a certain point into the direction of the Normal vector? I'm getting that value that will be the minimal distance?

The intuition is to see the dot product as some kind of parser that finds the commonalities between 2 vectors and returns the vector that is composed by those commonalities?

Also finally, I understand that dividing by the length of the Normal vector gives us the "unitary" direction vector right? But I'm not seeing the implication of not doing that, how would it deform the resulting distance? Would it make larger or smaller depending on the length of the normal vector that we choose?

If these questions are basic I'm sorry, I never had much love for this class and hopefully will get better in these next few weeks as I watch this course.

I think you have it pretty much right. The dot product can be understood as a measure of alignment between two vectors. For example, if $\vec{u}$ and $\vec{v}$ are two unit vectors, then $$\vec{u}\cdot\vec{v} = \cos\theta$$ where $\theta$ is the angle between the two vectors. So in this case $\vec{u}\cdot\vec{v} = 1$ means the vectors point in the same direction (i.e. $\vec{u}=\vec{v}$), $\vec{u}\cdot\vec{v} = 0$ means the vectors are perpendicular, and $\vec{u}\cdot\vec{v} = -1$ means the vectors point in opposite directions (i.e. $\vec{u}=-\vec{v}$.)

In the more general case in which the vectors are not unit vectors, we have $$\vec{u}\cdot\vec{v} = |\vec{u}| |\vec{v}| \cos\theta$$ which means that $\vec{u}\cdot\vec{v}$ takes on its largest possible value, $|\vec{u}| |\vec{v}|$, when the vectors point in the same direction.

In the case where one of the vectors (say $\vec{v}$) is a unit vector, $\vec{u} \cdot \vec{v}$ measures the component of $\vec{u}$ in the $\vec{v}$ direction. If we introduce the notation $\hat{v}$ to stand for $\frac{\vec{v}}{|\vec{v}|}$, then $\hat{v}$ is a unit vector in the $\vec{v}$ direction, and we have that the component of $\vec{u}$ in the $\vec{v}$ direction is

$$\operatorname{comp}_{\vec{v}}\vec{u} = \vec{u} \cdot \hat{v} = \frac{\vec{u}\cdot\vec{v}}{|\vec{v}|}$$

It's important to realize that $\operatorname{comp}_\vec{v} \vec{u}$ is a scalar quantity, measuring the "size" of the component of $\vec{u}$ in the direction of $\vec{v}$. (I put "size" in quotes because this scalar also includes a sign, so it's not just a magnitude.) It's also useful to define a vector $\operatorname{proj}_\vec{v} \vec{u}$ as follows:

$$\operatorname{proj}_\vec{v} \vec{u} = \left( \operatorname{comp}_\vec{v} \vec{u} \right) \hat{v}$$

Notice that $\operatorname{proj}_\vec{v} \vec{u}$ points in (or opposite to) the $\vec{u}$ diction and has a length equal to $|\operatorname{comp}_\vec{v} \vec{u}|$. Unpacking this definition, we have the following equivalent forms:

$$\operatorname{proj}_\vec{v} \vec{u} = \left( \vec{u} \cdot \hat{v}\right) \hat{v}$$ $$\operatorname{proj}_\vec{v} \vec{u} = \left( \frac{\vec{u} \cdot \vec{v}}{|\vec{v}|}\right) \frac{\vec{v}}{|\vec{v}|}$$ $$\operatorname{proj}_\vec{v} \vec{u} = \left( \frac{\vec{u} \cdot \vec{v}}{|\vec{v}|^2}\right) \vec{v}$$

An alternate explanation uses the fact that $\langle a,b,c\rangle$ is a normal vector to the plane and is therefore normal to the vector connecting two points such as $(at,bt,ct)$ and $(x,y,z)$ lying in the plane where $P=(at,bt,ct)$ is the point of the plane nearest the origin

Thus \begin{eqnarray} \langle x-at,y-bt,z-ct\rangle\cdot\langle a,b,c\rangle&=&0\\ ax+by+cz&=&(a^2+b^2+c^2)t\\ d&=&(a^2+b^2+c^2)t\\ t&=&\frac{d}{a^2+b^2+c^2}\\ P&=&\frac{(a,b,c)d}{a^2+b^2+c^2}\\ |P|&=&\frac{|d|}{\sqrt{a^2+b^2+c^2}} \end{eqnarray}

• Thanks for your answer, I don't understand picking the point (at,bt,ct), what is the meaning of that? I understand that in the plane equation the a,b,c correspond to the normal vector, but what's the relation to this point you picked? Why is it the nearest one to the origin? – DTek Aug 17 '18 at 19:33
• A line drawn from the origin to the nearest point on the plane will intersect the plane at a right angle. So the vector from the origin to that point will be parallel to the normal vector $N=\langle a,b,c\rangle$. So there will be some real number $t$ such that the vector from the origin to the near point of the plane is $\langle a,b,c\rangle t$, so the near point will have coordinates $(at,bt,ct)$ for that value of $t$. – John Wayland Bales Aug 17 '18 at 21:20

So my question is, am I supposed to see the dot product as the projection of the vector that connects the origin to a certain point into the direction of the Normal vector?

You can think of the dot product as being the product of the lengths, scaled by how much they're pointing in the same direction. It's used in calculating the projection, but is not the projection itself.

I'm getting the that component and that will be the minimal distance?

You need to fix the typo here for me to be sure what you're saying.

The intuition is to see the dot product as some kind of parser that finds the commonalities between 2 vectors and returns the vector that is composed by those commonalities?

It returns a scalar, not a vector.

Also finally, I understand that dividing by the length of the Normal vector gives us the "unitary" direction vector right?

In some sense, there is no "the" normal vector. Given any vector n, if n is normal, then so is cn. If you scale n, then there are only two possible results that differ by a factor of -1 and correspond to different orientations of the plane (that is, what you consider the "top" of the plane).

But I'm not seeing the implication of not doing that, how would it deform the resulting distance?

It would mean that the size of the dot product would depend on which normal vector you choose.

It would help to see what the argument your book gives is, but one way of looking at is that if you have points $P_0$ and $P_1$ in the plane, then $P_1-P_0$ is also in the plane. Normal vectors are, by definition, perpendicular to every vector in the plane, and thus their dot product is zero. So $n \cdot (P_1-P_0) = 0$. Since the dot product is bilinear, we can rearrange this to be $n \cdot P_1 = n\cdot P_0$. This show that when we take the dot product of a normal vector with a point in the plane, the result does not depend on the point that we pick. Thus, if we want to take the point on the plane closest to the origin, and get its dot product with a normal vector, we will get the same answer if we take an arbitrary point and take its dot product with the normal vector.

One of the properties of the dot product is that the dot product of two parallel vectors is just the product of their lengths, so if we can show that the vector pointing from the origin to the closest point in the plane is perpendicular to the plane, then it follows that that vector is parallel to the normal vector, and thus we can take the dot product of any point in the plane with the normal vector and get the distance to the plane times the length of the normal vector. Since we just want the distance to the plane, we divide by the length of the normal vector, and that's our answer.

BTW, you should use \cdot to represent the dot product.

• FIrst of all thanks for the great explanation and latex tips! Regarding the typo I believe it was just a conclusion that the minimal distance would be this result of getting the vector components in the direction of the normal vector. The dot product is in general a quantifier of the projection? Scaling with the "compatibility" (lacking words but like being parallel instead of perpendicular). – DTek Aug 17 '18 at 19:29

You have explained most of the problem very clearly.

Note that $$OP.N = |OP||N|\cos \theta$$ where $\theta$ is the angle between $OP$ and $N$.

To find the shortest distance you only need $|OP| \cos \theta$.

Thus you need to divide $OP.N$ by |N| to get the shortest distance.
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}