# Dot product in 3D space

Given the 3D vectors ${\vec {u}},\ {\vec {v}}$, whose coordinates are given for a Cartesian coordinate system:
    ${\vec {u}}=(u_{x},\,u_{y},\,u_{z})$,
    ${\vec {v}}=(v_{x},\,v_{y},\,v_{z})$,
their dot product may be defined to be
    ${\vec {u}}\cdot {\vec {v}}=u_{x}v_{x}+u_{y}v_{y}+u_{z}v_{z}$
Let ${\vec {w}}={\vec {u}}\times {\vec {v}}$ be their cross product:
    ${\vec {w}}={\begin{vmatrix}{\hat {i}}&{\hat {j}}&{\hat {k}}\\u_{x}&u_{y}&u_{z}\\v_{x}&v_{y}&v_{z}\end{vmatrix}}$
       $=(u_{y}v_{z}-u_{s}zv_{y},\,u_{z}v_{x}-u_{x}v_{z},\,u_{x}v_{y}-u_{y}v_{x})$.
The cross product is perpendicular to both of factors, ${\vec {u}}$ and ${\vec {v}}$, as can be verified by taking dot products:
    ${\vec {u}}\cdot {\vec {w}}=u_{x}(u_{y}v_{z}-u_{z}v_{y})+u_{y}(u_{z}v_{x}-u_{x}v_{z})+u_{z}(u_{x}v_{y}-u_{y}v_{x})$
       $=u_{x}u_{y}v_{z}-u_{x}u_{z}v_{y}+u_{y}u_{z}v_{x}-u_{y}u_{x}v_{z}+u_{z}u_{x}v_{y}-u_{z}u_{y}v_{x}=0$
Assuming that both ${\vec {u}}$ and ${\vec {v}}$ are non-zero in length then the cosine of the angle between them yields 0; so the angle between them is a right angle; so ${\vec {u}}$ and ${\vec {w}}$ are perpendicular; i.e., ${\vec {u}}$ and ${\vec {u}}\times {\vec {v}}$ are perpendicular. [But the geometric interpretation for the 3D case has not been shown yet; would not this claim be circular then?]
Exercise: Show that ${\vec {v}}$ and ${\vec {w}}$ are perpendicular.
Let ${\hat {w}}$ be the normalized version of ${\vec {w}}$, i.e.
    ${\hat {w}}={{\vec {w}} \over {\sqrt {{\vec {w}}\cdot {\vec {w}}}}}$
so that ${\vec {w}}$ has unit length, because
    ${\hat {w}}\cdot {\hat {w}}={{\vec {w}}\cdot {\vec {w}} \over {\sqrt {{\vec {w}}\cdot {\vec {w}}}}^{2}}={{\vec {w}}\cdot {\vec {w}} \over {\vec {w}}\cdot {\vec {w}}}=1$
and ${\sqrt {{\hat {w}}\cdot {\hat {w}}}}={\sqrt {1}}=1$. [Again, this calculation has used the geometric interpretation of the dot product already.]
Let ${\vec {u}}_{\perp }={\hat {w}}\times {\vec {u}}$, then ${\vec {u}}_{\perp }$ has the same length as ${\vec {u}}$ but is perpendicular to both ${\hat {w}}$ and ${\vec {u}}$, so it is a rotation by 90° of ${\vec {u}}$ in the “$\perp \!{\hat {w}}$ plane” (the plane whose normal is ${\hat {w}}$).
Likewise let ${\vec {v}}_{\perp }={\hat {w}}\times {\vec {v}}$. Let
    ${\vec {u}}'=\cos \theta \,{\vec {u}}+\sin \theta \,{\vec {u}}_{\perp }$,
    ${\vec {v}}'=\cos \theta \,{\vec {v}}+\sin \theta \,{\vec {v}}_{\perp }$.
Note: ${\vec {u}}'$ is a rotation of ${\vec {u}}$ by an angle $\theta$ around axis ${\hat {w}}$. Likewise ${\vec {v}}'$ is a rotation of ${\vec {v}}$ by an angle $\theta$ around axis ${\hat {w}}$.
    ${\vec {u}}'\cdot {\vec {v}}'=(\cos \theta \,{\vec {u}}+\sin \theta \,{\vec {u}}_{\perp })\cdot (\cos \theta \,{\vec {v}}+\sin \theta \,{\vec {v}}_{\perp })$
       $=\cos ^{2}\theta \,{\vec {u}}\cdot {\vec {v}}+\cos \theta \sin \theta \,{\vec {u}}\cdot {\vec {v}}_{\perp }+\sin \theta \cos \theta \,{\vec {u}}_{\perp }\cdot {\vec {v}}+\sin ^{2}\theta \,{\vec {u}}_{\perp }\cdot {\vec {v}}_{\perp }$
       $=\cos ^{2}\theta \,{\vec {u}}\cdot {\vec {v}}+\sin ^{2}\theta \,({\hat {w}}\times {\vec {u}})\cdot ({\hat {w}}\times {\vec {v}})+\cos \theta \sin \theta \,({\vec {u}}\cdot {\hat {w}}\times {\vec {v}}+{\hat {w}}\times {\vec {u}}\cdot {\vec {v}})$
    ${\hat {u}}\cdot {\hat {w}}\times {\vec {v}}={\begin{vmatrix}u_{x}&u_{y}&u_{z}\\w_{x}&w_{y}&w_{z}\\v_{x}&v_{y}&v_{z}\end{vmatrix}}$
(${\hat {i}},\,{\hat {j}},\,{\hat {k}}$ get replaced by $u_{x},\,u_{y},\,u_{z}$ due to the dot product; this combination of dot and cross product forming a determinant is called a vector triple product).
    ${\hat {w}}\times {\vec {u}}\cdot {\vec {v}}={\vec {v}}\cdot {\hat {w}}\times {\vec {u}}$
because the dot product is commutative.
    ${\vec {v}}\cdot {\hat {w}}\times {\vec {u}}={\begin{vmatrix}v_{x}&v_{y}&v_{z}\\w_{x}&w_{y}&w_{z}\\u_{x}&u_{y}&u_{z}\end{vmatrix}}$
       $=-u\cdot {\hat {w}}\times {\vec {v}}$
because there is an interchange of rows one and three in the determinant; so swapping two factors of a vector triple product changes its sign.
So ${\vec {u}}\cdot {\hat {w}}\times {\vec {v}}+{\hat {w}}\times {\vec {u}}\cdot {\vec {v}}=0$,
    ${\vec {u}}'\cdot {\vec {v}}'=\cos ^{2}\theta \,{\vec {u}}\cdot {\vec {v}}+\sin ^{2}\theta \,{\vec {u}}_{\perp }\cdot {\vec {v}}_{\perp }$
Focusing on the last term (of the right-hand side (RHS)):
    $({\hat {w}}\times {\vec {u}})\cdot ({\hat {w}}\times {\vec {v}})=\left({{\vec {w}} \over w}\times {\vec {u}}\right)\cdot \left({{\vec {w}} \over w}\times {\vec {v}}\right)$
       $={1 \over w^{2}}({\vec {w}}\times {\vec {u}})\cdot ({\vec {w}}\times {\vec {v}})$
       $={1 \over w^{2}}(({\vec {u}}\times {\vec {v}})\times {\vec {u}})\cdot (({\vec {u}}\times {\vec {v}})\times {\vec {v}})$
Summary of the argument coming up ahead: ${\vec {u}}_{\perp }$ is a 90° (counterclockwise) rotation of ${\vec {u}}$ in the $\perp \!{\hat {w}}$ plane and ${\vec {v}}_{\perp }$ is a 90° (counterclockwise) rotation of ${\vec {v}}$ in the $\perp \!{\hat {w}}$ plane, so
    ${\vec {u}}_{\perp }\cdot {\vec {v}}_{\perp }={\vec {u}}\cdot {\vec {v}}$
thus ${\vec {u}}'\cdot {\vec {v}}'=\cos ^{2}\theta \,{\vec {u}}\cdot {\vec {v}}+\sin ^{2}\theta \,{\vec {u}}\cdot {\vec {v}}$
       $=(\cos ^{2}\theta +\sin ^{2}\theta )\,{\vec {u}}\cdot {\vec {v}}$
    ${\vec {u}}'\cdot {\vec {v}}'={\vec {u}}\cdot {\vec {v}}$ (End of summary.)
The products $({\vec {u}}\times {\vec {v}})\times {\vec {u}}$ and $({\vec {u}}\times {\vec {v}})\times {\vec {v}}$ have the general form $({\vec {b}}\times {\vec {c}})\times {\vec {a}}$. We will now derive a formula for ${\vec {a}}\times ({\vec {b}}\times {\vec {c}})$.
The double cross product ${\vec {a}}\times ({\vec {b}}\times {\vec {c}})$ has to be perpendicular to ${\vec {b}}\times {\vec {c}}$, so it must be in the plane of both ${\vec {b}}$ and ${\vec {c}}$; it must be a linear combination of ${\vec {b}}$ and ${\vec {c}}$.
    ${\vec {b}}\times {\vec {c}}={\begin{vmatrix}{\hat {i}}&{\hat {j}}&{\hat {k}}\\b_{x}&b_{y}&b_{z}\\c_{x}&c_{y}&c_{z}\end{vmatrix}}$
       $=(b_{y}c_{z}-b_{z}c_{y},\,b_{z}c_{x}-b_{x}c_{z},\,b_{x}c_{y}-b_{y}c_{x})$
    ${\vec {a}}\times ({\vec {b}}\times {\vec {c}})={\begin{vmatrix}{\hat {i}}&{\hat {j}}&{\hat {k}}\\a_{x}&a_{y}&a_{z}\\b_{y}c_{z}-b_{z}c_{y}&b_{z}c_{x}-b_{x}c_{z}&b_{x}c_{y}-b_{y}c_{x}\end{vmatrix}}$
       $=(a_{y}b_{x}c_{y}-a_{y}b_{y}c_{x}-a_{z}b_{z}c_{x}+a_{z}b_{x}c_{z},$
          $a_{z}b_{y}c_{z}-a_{z}b_{z}c_{y}-a_{x}b_{x}c_{y}+a_{x}b_{y}c_{x},$
          $a_{x}b_{z}c_{x}-a_{x}b_{x}c_{z}-a_{y}b_{y}c_{z}+a_{y}b_{z}c_{y})$
       $=(b_{x}a_{y}c_{y}+b_{x}a_{z}c_{z}-c_{x}a_{y}b_{y}-c_{x}a_{z}b_{z},$
          $b_{y}a_{x}c_{x}+b_{y}a_{z}c_{z}-c_{y}a_{x}b_{x}-c_{y}a_{z}b_{z},$
          $b_{z}a_{x}c_{x}+b_{z}a_{y}c_{y}-c_{z}a_{x}b_{x}-c_{z}a_{y}b_{y})$
       $=(b_{x}(a_{y}c_{y}+a_{z}c_{z})-c_{x}(a_{y}b_{y}+a_{z}b_{z}),$
          $b_{y}(a_{x}c_{x}+a_{z}c_{z})-c_{y}(a_{x}b_{x}+a_{z}b_{z}),$
          $b_{z}(a_{x}c_{x}+a_{y}c_{y})-c_{z}(a_{x}b_{x}+a_{y}b_{y}))$
       $=(b_{x}({\underline {a_{x}c_{x}}}+a_{y}c_{y}+a_{z}c_{z})-c_{x}({\underline {a_{x}b_{x}}}+a_{y}b_{y}+a_{z}b_{z}),$
          $b_{y}(a_{x}c_{x}+{\underline {a_{y}c_{y}}}+a_{z}c_{z})-c_{y}(a_{x}b_{x}+{\underline {a_{y}b_{y}}}+a_{z}b_{z}),$
          $b_{z}(a_{x}c_{x}+a_{y}c_{y}+{\underline {a_{z}c_{z}}})-c_{z}(a_{x}b_{x}+a_{y}b_{y}+{\underline {a_{z}c_{z}}}))$
       $=(b_{x}\,{\vec {a}}\cdot {\vec {c}}-c_{x}\,{\vec {a}}\cdot {\vec {b}},$
          $b_{y}\,{\vec {a}}\cdot {\vec {c}}-c_{y}\,{\vec {a}}\cdot {\vec {b}},$
          $b_{z}\,{\vec {a}}\cdot {\vec {c}}-c_{z}\,{\vec {a}}\cdot {\vec {b}})$
       $=(b_{x}\,{\vec {a}}\cdot {\vec {c}},\,b_{y}\,{\vec {a}}\cdot {\vec {c}},\,b_{z}\,{\vec {a}}\cdot {\vec {c}})-(c_{x}\,{\vec {a}}\cdot {\vec {b}},\,c_{y}\,{\vec {a}}\cdot {\vec {b}},\,c_{z}\,{\vec {a}}\cdot {\vec {b}})$
       $={\vec {a}}\cdot {\vec {c}}\,(b_{x},\,b_{y},\,b_{z})-{\vec {a}}\cdot {\vec {b}}\,(c_{x},\,c_{y},\,c_{z})$
       $=({\vec {a}}\cdot {\vec {c}}){\vec {b}}-({\vec {a}}\cdot {\vec {b}}){\vec {c}}={\vec {a}}\times ({\vec {b}}\times {\vec {c}})$.
Back to the focused-on equation:
    $({\vec {u}}\times {\vec {v}})\times {\vec {u}}=-{\vec {u}}\times ({\vec {u}}\times {\vec {v}})$
       $=-[({\vec {u}}\cdot {\vec {v}}){\vec {u}}-({\vec {u}}\cdot {\vec {u}}){\vec {v}}]$
       $=u^{2}{\vec {v}}-({\vec {u}}\cdot {\vec {v}}){\vec {u}}$
    $({\vec {u}}\times {\vec {v}})\times {\vec {v}}=-{\vec {v}}\times ({\vec {u}}\times {\vec {v}})$
       $=-[({\vec {v}}\cdot {\vec {v}}){\vec {u}}-({\vec {v}}\cdot {\vec {u}}){\vec {v}}]$
       $=({\vec {v}}\cdot {\vec {u}}){\vec {v}}-v^{2}{\vec {u}}$
Thus
    ${\vec {u}}'\cdot {\vec {v}}'={1 \over w^{2}}(({\vec {u}}\times {\vec {v}})\times u)\cdot (({\vec {u}}\times {\vec {v}})\times {\vec {v}})$
       $={1 \over w^{2}}\left\{(u^{2}{\vec {v}}-({\vec {u}}\cdot {\vec {v}}){\vec {u}})\cdot (({\vec {u}}\cdot {\vec {v}}){\vec {v}}-v^{2}{\vec {u}})\right\}$
       $={1 \over w^{2}}\left\{u^{2}({\vec {u}}\cdot {\vec {v}})v^{2}-u^{2}v^{2}({\vec {u}}\cdot {\vec {v}})-({\vec {u}}\cdot {\vec {v}})^{2}({\vec {u}}\cdot {\vec {v}})+({\vec {u}}\cdot {\vec {v}})v^{2}u^{2}\right\}$
       $={1 \over w^{2}}\left\{u^{2}v^{2}({\vec {u}}\cdot {\vec {v}})-({\vec {u}}\cdot {\vec {v}})^{3}\right\}$
       $={{\vec {u}}\cdot {\vec {v}} \over w^{2}}\left\{u^{2}v^{2}-({\vec {u}}\cdot {\vec {v}})^{2}\right\}$
    $w^{2}={\vec {w}}\cdot {\vec {w}}=({\vec {u}}\times {\vec {v}})\cdot ({\vec {u}}\times {\vec {v}})$
Now the first cross and the dot in the RHS may be swapped, because the product is a vector triple product:
    $w^{2}={\vec {u}}\cdot {\vec {v}}\times ({\vec {u}}\times {\vec {v}})$
and now there is a double cross product at the end of the RHS, so the formula can be applied:
    $w^{2}={\vec {u}}\cdot [({\vec {v}}\cdot {\vec {v}}){\vec {u}}-({\vec {v}}\cdot {\vec {u}}){\vec {v}}]$
       $={\vec {u}}\cdot [v^{2}{\vec {u}}-({\vec {v}}\cdot {\vec {u}}){\vec {v}}]$
       $=[v^{2}u^{2}-({\vec {v}}\cdot {\vec {u}})^{2}]$
Thus
    ${{\vec {u}}\cdot {\vec {v}} \over w^{2}}(u^{2}v^{2}-({\vec {u}}\cdot {\vec {v}})^{2})={\vec {u}}\cdot {\vec {v}}$
    ∴ ${\vec {u}}_{\perp }\cdot {\vec {v}}_{\perp }={\vec {u}}\cdot {\vec {v}}$
    ∴ ${\vec {u}}'\cdot {\vec {v}}'={\vec {u}}\cdot {\vec {v}}$.
So rotating 3D vectors ${\vec {u}}$ and ${\vec {v}}$ by the same angle along their common plane leaves their dot product preserved.
Given a pair of 3D vectors ${\vec {u}}$ and ${\vec {v}}$, what happens to the dot product ${\vec {u}}\cdot {\vec {v}}$ if ${\vec {v}}$ is rotated around the axis ${\vec {u}}$ so that the angle between ${\vec {u}}$ and ${\vec {v}}$ is preserved?
Firstly we will derive the Rodrigues formula in order to perform such a rotation. Vector ${\vec {v}}$ must be analyzed into parts that are parallel and perpendicular to ${\vec {u}}$: call them ${\vec {v}}_{\|}$ and ${\vec {v}}_{\perp }$. Firstly consider the normalized version of ${\vec {u}}$:
    ${\hat {u}}={{\vec {u}} \over u}={{\vec {u}} \over {\sqrt {{\vec {u}}\cdot {\vec {u}}}}}$.
The projection of ${\vec {v}}$ onto the ${\hat {u}}$ axis is:
    ${\vec {v}}_{\|}=({\vec {v}}\cdot {\hat {u}}){\hat {u}}$
Now subtract ${\vec {v}}_{\|}$ from ${\vec {v}}$ to obtain its perpendicular part:
    ${\vec {v}}_{\perp }={\vec {v}}-{\vec {v}}_{\|}$
What is ${\vec {v}}_{\perp }\cdot {\hat {u}}$?
    ${\vec {v}}_{\perp }\cdot {\hat {u}}=({\vec {v}}-{\vec {v}}_{\|})\cdot {\hat {u}}$
       $=({\vec {v}}-{\hat {u}}({\vec {v}}\cdot {\hat {u}}))\cdot {\hat {u}}$
       $={\vec {v}}\cdot {\hat {u}}-({\hat {u}}\cdot {\hat {u}})({\vec {v}}\cdot {\hat {u}})$
Since ${\hat {u}}$ is a unit vector then ${\hat {u}}\cdot {\hat {u}}=1$, so
    ${\vec {v}}_{\perp }\cdot {\hat {u}}={\vec {v}}\cdot {\hat {u}}-{\vec {v}}\cdot {\hat {u}}=0$
which proves that ${\vec {v}}_{\perp }$ is perpendicular to ${\hat {u}}$, as expected. [Or does it? Has the geometric interpretation of the dot product been established yet? Is not the argument a bit circular?]
    ${\vec {v}}_{\perp }'={\hat {u}}\times {\vec {v}}_{\perp }$
    ${\vec {v}}'={\vec {v}}_{\|}+\cos \theta \,{\vec {v}}_{\perp }+\sin \theta \,{\vec {v}}'_{\perp }$
where $\theta$ is the angle of rotation.
    ${\vec {v}}'={\vec {v}}_{\|}+\cos \theta ({\vec {v}}-{\vec {v}}_{\|})+\sin \theta \,{\hat {u}}\times ({\vec {v}}-{\vec {v}}_{\|})$
       $({\vec {v}}\cdot {\hat {u}}){\hat {u}}+\cos \theta ({\vec {v}}-({\vec {v}}\cdot {\hat {u}}){\hat {u}})+\sin \theta \,{\hat {u}}\times ({\vec {v}}-({\vec {v}}\cdot {\hat {u}}){\hat {u}})$
       $({\vec {v}}\cdot {\hat {u}}){\hat {u}}+\cos \theta \,({\vec {v}}-({\vec {v}}\cdot {\hat {u}}){\hat {u}})+\sin \theta \,{\hat {u}}\times {\vec {v}}$
so a Rodrigues rotation of vector ${\vec {v}}$ around vector ${\vec {u}}$ by an angle $\theta$ is
    $R_{{\vec {u}},\,\theta }({\vec {v}}')=(1-\cos \theta )({\vec {v}}\cdot {\hat {u}}){\hat {u}}+\cos \theta \,{\vec {v}}+\sin \theta \,{\hat {u}}\times {\vec {v}}$
Dot-multiplying the just-above by ${\vec {u}}$ yields
    ${\vec {u}}\cdot R_{{\vec {u}},\,\theta }({\vec {v}}')=(1-\cos \theta )({\vec {v}}\cdot {\hat {u}})({\vec {u}}\cdot {\hat {u}})+\cos \theta \,{\vec {v}}\cdot {\vec {u}}+\sin \theta \,{\vec {u}}\cdot {\hat {u}}\times {\vec {v}}$
    ${\vec {u}}\cdot {\hat {u}}={\vec {u}}\cdot {{\vec {u}} \over u}={u^{2} \over u}=u$
    ${\vec {u}}\cdot {\hat {u}}\times {\vec {v}}={\vec {u}}\times {\hat {u}}\cdot {\vec {v}}={1 \over u}{\vec {u}}\times {\vec {u}}\cdot {\vec {v}}=0$
because ${\vec {u}}\times {\vec {u}}=0$ for any ${\vec {u}}$.
    ${\vec {u}}\cdot {\vec {v}}'=(1-\cos \theta )({\vec {v}}\cdot {\hat {u}})u+\cos \theta \,{\vec {v}}\cdot {\vec {u}}$
       $=(1-\cos \theta )({\vec {v}}\cdot {\hat {u}}u)+\cos \theta \,{\vec {v}}\cdot {\vec {u}}$
       $=(1-\cos \theta )({\vec {v}}\cdot {\vec {u}})+\cos \theta \,{\vec {v}}\cdot {\vec {u}}$
       $={\vec {v}}\cdot {\vec {u}}={\vec {u}}\cdot {\vec {v}}$
as claimed.
Any other rotations of a pair of vectors which leave the angle between them unchanged may be composed of these two kinds of rotation already considered: (1) Rodrigues rotation of one vector around the axis of the other vector, which also rotates the plane containing both vectors; and (2) a dual, “isoangular”, simultaneous pair of rotations of both vectors along their common plane, which leaves it fixed.
Both of these kinds of rotations have been shown to preserve the dot product between the two vectors; therefore any angle preserving (and magnitude preserving; but that should be implicit in the term “rotation”) rotational movement of the two vectors also preserves their dot product.
Homogeneity. Multiplying the lengths of ${\vec {u}}$ and ${\vec {v}}$. Let ${\vec {u}}'=\lambda {\vec {u}}$, ${\vec {v}}'=\mu {\vec {v}}$, i.e.,
    ${\vec {u}}'=(\lambda u_{x},\,\lambda u_{y},\,\lambda u_{z})$
    ${\vec {v}}'=(\mu v_{x},\,\mu v_{y},\,\mu v_{z})$,
then
    ${\vec {u}}'\cdot {\vec {v}}'=\lambda \mu u_{x}v_{x}+\lambda \mu u_{y}v_{y}+\lambda \mu u_{z}v_{z}$
       $=\lambda \mu \,{\vec {u}}\cdot {\vec {v}}$.
Multiplying the length of ${\vec {u}}$ or ${\vec {v}}$ also multiplies the length of their dot product by the same factor.
What happens when both ${\vec {u}}$ and ${\vec {v}}$ are unit vectors? Rotate them in an angle-preserving way so as to place ${\vec {u}}$ along the x-axis. Then
    ${\vec {u}}'=(1,\,0,\,0)$.
Rotate ${\vec {v}}$ around ${\vec {u}}$ until ${\vec {v}}$ is contained by the xy-plane. Then
    ${\vec {v}}'=(v_{x}',\,v_{y}',\,0)=(\cos \phi ,\,\sin \phi ,\,0)$
for some angle $\phi$. The angle $\phi$ is now contained within the xy-plane:
    ${\vec {u}}'\cdot {\vec {v}}'=v_{x}'=\cos \phi$.
    $\cos \phi ={\vec {u}}\cdot {\vec {v}}$
because the rotation was also dot-product preserving.
For non-unit vectors ${\vec {u}},\,{\vec {v}}$:
    ${\vec {u}}=u{\hat {u}}$,
    ${\vec {v}}=v{\hat {v}}$
where $u={\sqrt {{\vec {u}}\cdot {\vec {u}}}}$, $v={\sqrt {{\vec {v}}\cdot {\vec {v}}}}$.
    ${\vec {u}}\cdot {\vec {v}}=u{\hat {u}}\cdot v{\hat {v}}=uv\,{\hat {u}}\cdot {\hat {v}}$
but ${\hat {u}}\cdot {\hat {v}}=\cos \phi$ so
    ${\vec {u}}\cdot {\vec {v}}=uv\,\cos \phi$
where u and v are the magnitudes of ${\vec {u}},\,{\vec {v}}$ respectively; and $\phi$ is the angle between them. This is the geometric interpretation of the dot product (in 3D; it looks the same as that for the plane).