Skip to main content

Section 2.3 The Dot Product (a.k.a. Scalar Product)

References.

Introduction.

There are two useful notions of a product of two vectors; in this section we meet the first of them:

Definition 2.3.1.

The dot product of two vectors in \(\mathbb{R}^3\) is
\begin{equation} \vecu \cdot \vecv = \vector{u_1, u_2, u_3}\cdot \vector{v_1, v_2, v_3}= u_1 v_1 + u_2 v_2 + u_3 v_3\tag{2.3.1} \end{equation}
with the obvious 2D version. This is also known as the scalar product (because the value is a scalar, not another vector) or the inner product.

Topics.

Subsection 2.3.1 Properties

From the formula (2.3.1) in this definition one can derive some familiar properties:
  1. \(\displaystyle \vecu \cdot \vecv = \vecv \cdot \vecu \qquad \text{Commutativity}\)
  2. \(\displaystyle \vecu \cdot (\vecv + \vecw)= \vecu \cdot \vecv + \vecu \cdot \vecw \qquad \text{Distributivity}\)
  3. \(\displaystyle (a \vecu) \cdot \vecv = \vecu \cdot (a \vecv) = a (\vecu \cdot \vecv) \qquad \text{Associativity with scalar multiplication}\)
  4. \(\displaystyle \vec{u} \cdot \vec{0} = 0\)
  5. \(\displaystyle \vecu \cdot \vecu = \|\vecu\|^2\)

Exercise 2.3.2.

Verify these.

Subsection 2.3.2 Geometric Characterization

Much of the importance of the dot product comes from its geometric properties; in fact the formula could be derived by requiring that
If \(\theta\) is the angle between the two vectors \(\vecu\) and \(\vecv\) then
\begin{equation} \vecu \cdot \vecv = \|\vecu\| \|\vecv\| \cos \theta.\tag{2.3.2} \end{equation}
along with some basic properties of a product:
  • \(\vecu \cdot (\vecv + \vecw)= \vecu \cdot \vecv + \vecu \cdot \vecw\text{:}\) (Distributive property)
  • \((a \vecu) \cdot \vecv = \vecu \cdot (a \vecv) = a (\vecu \cdot \vecv)\) (Associative property)
(In fact, Equation (2.3.2) could be used as an equivalent definition.)
The main step is working out what Equation (2.3.2) implies for the basic vectors \(\veci\text{,}\) \(\vecj\) and \(\veck\text{.}\)
Firstly,
\begin{equation*} \veci \cdot \veci = \vecj \cdot \vecj = \veck \cdot \veck = 1 \end{equation*}
because the angle is \(\theta = 0\) and the lengths are all 1.
Next,
\begin{equation*} \veci \cdot \vecj = \vecj \cdot \veci = \veci \cdot \veck = \veck \cdot \veci = \vecj \cdot \veck = \veck \cdot \veci = 0 \end{equation*}
because now all the angles are \(\pi/2\) so with zero cosine.
Finally
\begin{equation*} \begin{split} \vecu \cdot \vecv \amp= (u_1 \veci + u_2 \vecj + u_3 \veck) \cdot (v_1 \veci + v_2 \vecj + v_3 \veck) \\ \amp= (u_1 \veci) \cdot (v_1 \veci) + (u_2 \vecj) \cdot (v_2 \vecj) + (u_3 \veck) \cdot (v_3 \veck) + (u_1 \veci) \cdot (v_2 \vecj) + \cdots \\ \amp= u_1 v_1 \veci \cdot \veci + u_2 v_2 \vecj \cdot \vecj + u_3 v_3 \veck \cdot \veck + u_1 v_2 \veci \cdot \vecj + \cdots \\ \amp= u_1 v_1 + u_2 v_2 + u_3 v_3 \end{split} \end{equation*}
as all the remaining terms involve zero dot products.
Be careful: the above argument shows that the original definition in Equation (2.3.1) is the only possibility with the above disirable properties (commutativity, distributivity and associativity) along with the geometrical property (2.3.2), but does not quite show that it works!
The algebraic properties are already confirmed above; to verify the trigonometric connection, we can use the Law of Cosines: for a triangle with sides A, B and C of lengths a, b and c, with angle \(\theta\) between side A and B,
\begin{equation} c^2 = a^2 + b^2 - 2 a b \cos\theta\tag{2.3.3} \end{equation}
Now let the sides A and B be described by vectors \(\vecu\) and \(\vecv\) connected at their starting points where the angle \(\theta\) is. The third side C is thus described by their difference, \(\vecu - \vecv\text{,}\) and the Law of Cosines says that
\begin{equation*} \|\vecu - \vecv\|^2 - \|\vecu\|^2 - \|\vecv\|^2 = -2 \|\vecu\| \|\vecv\| \cos \theta \end{equation*}
On the other hand, using the property \(\vecu \cdot \vecu = \|\vecu\|^2\) for all three lengths gives
\begin{equation*} \|\vecu - \vecv\|^2 - \|\vecu\|^2 - \|\vecv\|^2 = (\vecu\cdot\vecu - 2\vecu\cdot\vecv + \vecv\cdot\vecv) - \vecu\cdot\vecu - \vecv\cdot\vecv = - 2\vecu\cdot\vecv \end{equation*}
and comparing the right-hand sides confirms Equation (2.3.2).

Subsection 2.3.3 Direction Angles and Direction Cosines

The direction angles of a non-zero vector \(\vecu\) are the angles that it makes with the three coordinate axes, typically called \(\alpha\text{,}\) \(\beta\) and \(\gamma\text{.}\) That is, the angles that the vector makes with the three standard basic vectors \(\veci\text{,}\) \(\vecj\) and \(\hat{k}\text{.}\) The cosines of these are the direction cosines.
\begin{equation*} \cos \alpha = \frac{\vecu \cdot \veci}{\| \vecu \| \|\veci\ \|}, = \frac{u_1}{\| \vecu \|}, %\text{ (so } \alpha =\arccos\left(\frac{u_1}{|\vecu|}\right) ), \qquad \cos \beta = \frac{u_2}{\|\vecu\|}, \qquad \cos \gamma = \frac{u_3}{\|\vecu\|} \end{equation*}
Since the angles are always in \([0, \pi]\text{,}\) they are unambiguously determined by their cosines; thus it is usually enough to know the direction cosines. It can be checked that
\begin{equation*} \cos^2 \alpha + \cos^2 \beta + \cos^2 \gamma=1, \quad \vecu = \|\vecu\| \vector{\cos \alpha, \cos \beta, \cos \gamma} \end{equation*}
so the vector \(\hat{u}=\vector{\cos \alpha, \cos \beta, \cos \gamma}\) of direction cosines is the unit vector in the direction of \(\vecu\text{.}\)

Subsection 2.3.4 Projections

The vector projection (or just projection) of \(\vecv\) onto \(\vecu\) is the vector that is parallel to \(\vecu\) (a scalar multiple of \(\vecu\)) and with the difference between it and \(\vecv\) being perpendicular to \(\vecu\text{.}\) Calling this vector \(\vec{p}\text{,}\) these conditions are that \(\vec{p} = c \vecu\) and \((\vecv-\vec{p}) \cdot \vecu=0\text{.}\)
These conditions have a unique solution, denoted \(\mbox{proj}_{\vecu} \vecv\text{:}\)
\begin{equation*} \text{proj}_{\vecu} \vecv = \frac{\vecu \cdot \vecv}{\|\vecu\|^2} \vecu \end{equation*}
The scalar projection of \(\vecv\) onto \(\vecu\) is the "signed magnitude" of this: the magnitude with sign plus or minus according to whether the projection goes in the same or opposite direction as \(\vecu\text{.}\) This is also called the component of \(\vecv\) in direction \(\vecu\), and denoted
\begin{equation*} \text{comp}_{\vecu} \vecv = \pm \|\text{proj}_{\vecu} \vecv\| = \frac{\vecu \cdot \vecv}{\|\vecu\|} = \|\vecv\|\cos \theta, \quad \theta\text{ the angle between }\vecu\text{ and }\vecv. \end{equation*}

Study Guide.

Study Section 2.3 of Calculus Volume 3
 6 
openstax.org/books/calculus-volume-3/pages/2-3-the-dot-product
; in particular:
  • The Definitions and Theorems.
  • Examples 2.21–2.25, 2.27 and 2.28, and the Checkpoints following each. (Examples 2.29 and 2.30 also show connections to Physics.)
  • One or several exercises from each of the following ranges: One or several exercises from each of the ranges 123–126, 131–134, 135–140, 141–144, 147–148, 149–150, 161–164, 167–170, 171–172.