### Vector calculus in plane and space: Distances, Angles and Inner Product

### Dot product

The two quantities that define a vector are length and direction. We use angles to determine the direction. The cosine of the angle made by two vectors can be found in the following definition of the dot product.

the dot product

The **dot product** of two vectors #\vec{u}# and #\vec{v}#, is a number, which is noted as #\dotprod{\vec{u}}{\vec{v}}# and defined as

\[

\dotprod{\vec{u}}{\vec{v}}= \parallel\vec{u}\parallel\cdot \parallel\vec{v}\parallel \cdot \cos(\varphi )

\]

where #\varphi# is the *angle* made by the two vectors #\vec{u}# and #\vec{v}# when #\vec{u}# and #\vec{v}# are not equal to the zero vector. If one of the two vectors is the zero vector, the dot product is by definition equal to #0#.

The *angle* #\varphi# is the short angle made by #\vec{u}# and #\vec{v}#; more precisely: the two representatives made by these vectors with the same starting point. In particular, the following applies: #0^\circ\leq\varphi\leq180^\circ#. The *oriented angle*, defined in the plane by the "counterclockwise"orientation, is not determined in the space: after all, we cannot properly determine whether we are viewing a plane from above or from below; we can, therefore, not agree on the orientation.

Example: if the vectors #\vec{u}# and #\vec{v}# both have a length of#4#, and the angle between the two vectors is equal to #60^{\circ}#, then

\[\dotprod{\vec{u}}{\vec{v}}= 4\cdot 4\cdot \cos\left( 60^{\circ}\right) = 4\cdot 4\cdot \frac{1}{2} = 8

\]

The dot product is #-8# for an angle of #120^{\circ}#. The dot product can, in fact, be negative.

The literature also contains other notations such as #\left(\vec{u},\vec{v}\right)# or #\langle\vec{u},\vec{v}\rangle#.

The dot product is also referred to as **dot product** or **scalar product.**

If you know the dot product of two vectors (both unequal to #\vec{0}#) and their lengths, you can calculate the cosine of the angle between the vectors:

\[\cos (\varphi) = \frac{\vec{u}\cdot \vec{v}}{\parallel\vec{u}\parallel\cdot \parallel\vec{v}\parallel}\tiny.\] Once we have expressed the *dot product in coordinates* and find a formula to calculate the dot product, this can be a very useful method of calculation. Here is another helpful rule for calculating the dot product.

The dot product as the product of two lengths

Let #\vec{u}# and #\vec{v}# be two vectors, so that #\vec{u}# is not the zero vector, let #\ell# be a line with the directional vector #\vec{u}#, and let #A# and #B# be two points in the space, so that #\vec{AB}# is a representative of #\vec{v}#. If #P# and #Q# are the *perpendicular projections* of #A# and #B#, respectively, on #\ell#, the following holds \[ \vec{PQ}=\frac{\vec{u}\cdot\vec{v}}{\parallel\vec{u}\parallel^2} \cdot\vec{u}\] This vector does not depend on where #\vec{v}# or #\ell# are placed in space, and the dot product #\dotprod{\vec{u}}{\vec{v}} # can be determined as follows:

- #\left|\dotprod{\vec{u}}{\vec{v}} \right|=\parallel\vec{PQ}\parallel\cdot\parallel\vec{u}\parallel#;
- the sign of #\vec{u}\cdot\vec{v}# is not negative if #\vec{u}# and #\vec{PQ}# point in the same direction, and it is negative otherwise.

First, suppose that #A# is on #\ell#. In that case #A=P#, and #\triangle ABQ# is a right-angled triangle. Let #\varphi# be the angle between the vectors #\vec{v}=\vec{AB}# and #\vec{u}#. In that case \[\vec{PQ}=\varepsilon \cdot \frac{\parallel \vec{PQ}\parallel}{\parallel \vec{u}\parallel}\vec{u}\] where #\varepsilon=1# if #\vec{PQ}# and #\vec{u}# point in the same direction, and #-1# if they point in a different one. Inspection of the triangle #\triangle ABQ# shows that \[\cos(\varphi)=\varepsilon\cdot\frac{\parallel \vec{PQ}\parallel}{\parallel \vec{v}\parallel}\tiny.\] If #\vec{v}=\vec{0}#, then both sides of the equality we are trying to prove, are the zero vector. In that case, we can assume that #\vec{v}# is not the zero vector, so #\parallel\vec{v}\parallel\ne0#. From here, we conclude that

\[\begin{array}{rcll}\vec{PQ}&=&\varepsilon \cdot \frac{\parallel \vec{PQ}\parallel}{\parallel \vec{u}\parallel}\cdot\vec{u}&\phantom{xxx}\color{blue}{\text{the formula above for }\vec{PQ}}\\ &=&\varepsilon\cdot\frac{\parallel \vec{PQ}\parallel}{\parallel \vec{v}\parallel}\cdot \frac{\parallel \vec{v}\parallel}{\parallel\vec{u}\parallel}\cdot\vec{u}&\phantom{xxx}\color{blue}{\text{scalar rewritten }}\\&=&\cos(\varphi)\cdot \frac{\parallel \vec{v}\parallel}{\parallel \vec{u}\parallel}\cdot\vec{u}&\phantom{xxx}\color{blue}{\text{formula above for }\cos(\varphi)}\\ &=& \dfrac{\vec{u}\cdot\vec{v}}{\parallel\vec{u}\parallel\cdot\parallel\vec{v}\parallel} \cdot\frac{\parallel \vec{v}\parallel}{\parallel \vec{u}\parallel}\cdot\vec{u}&\phantom{xxx}\color{blue}{\text{the dot product in terms of lengths}}\\&=& \dfrac{\vec{u}\cdot\vec{v}}{\parallel\vec{u}\parallel^2} \cdot\vec{u}&\phantom{xxx}\color{blue}{\text{simplified}}\end{array}\] This is the formula if #A# is on #\ell#. If this is not the case, then we can compare the initial situation with the situation in which the vector #\vec{v}# has shifted over #\vec{PA}#. The projection of the starting point of the new representative of #\vec{v}# must then be #P#, and the projection of the end point of the new representative of #\vec{v}# must then be #Q#, because #\vec{v}#, and therefore #B#, is displaced in a direction perpendicular to #\ell#. The left and right sides of the formula we are trying to prove in the new situation, do not differ from the old situation. But the equality is proven in the new situation, and must therefore also apply in the old situation. This is the completed proof of the formula.

The independence of the vector #\vec{PQ}# from the placement of #\vec{v}# will be used *later*.

This formula gives us an option to calculate the dot product of two vectors, by determining the scalar that occurs when one of the two vectors on the line is projected onto the other one.

After all, if #\varphi# is the angle between the vectors #\vec{u}# and #\vec{v}#, the following applies \[\begin{array}{rcl}\vec{u}\cdot \vec{v} &=& \parallel\vec{u}\parallel\cdot \parallel\vec{v}\parallel \cdot \cos(\varphi )\\

&=& 2 \cdot 5 \cdot\cos\left(330^{\circ}\right)\\

&=& 10 \cdot \frac{1}{2}\sqrt{3}\\

&=& 5\sqrt{3}\\

\end{array}\]

**Pass Your Math**independent of your university. See pricing and more.

Or visit omptest.org if jou are taking an OMPT exam.