Skip to main content
\(\require{cancel}\newcommand{\highlight}[1]{{\color{blue}{#1}}} \newcommand{\apex}{A\kern -1pt \lower -2pt\mbox{P}\kern -4pt \lower .7ex\mbox{E}\kern -1pt X} \newcommand{\colorlinecolor}{blue!95!black!30} \newcommand{\bwlinecolor}{black!30} \newcommand{\thelinecolor}{\colorlinecolor} \newcommand{\colornamesuffix}{} \newcommand{\linestyle}{[thick, \thelinecolor]} \newcommand{\bmx}[1]{\left[\hskip -3pt\begin{array}{#1} } \newcommand{\emx}{\end{array}\hskip -3pt\right]} \newcommand{\ds}{\displaystyle} \newcommand{\fp}{f'} \newcommand{\fpp}{f''} \newcommand{\lz}[2]{\frac{d#1}{d#2}} \newcommand{\lzn}[3]{\frac{d^{#1}#2}{d#3^{#1}}} \newcommand{\lzo}[1]{\frac{d}{d#1}} \newcommand{\lzoo}[2]{{\frac{d}{d#1}}{\left(#2\right)}} \newcommand{\lzon}[2]{\frac{d^{#1}}{d#2^{#1}}} \newcommand{\lzoa}[3]{\left.{\frac{d#1}{d#2}}\right|_{#3}} \newcommand{\plz}[2]{\frac{\partial#1}{\partial#2}} \newcommand{\plzoa}[3]{\left.{\frac{\partial#1}{\partial#2}}\right|_{#3}} \newcommand{\inflim}[1][n]{\lim\limits_{#1 \to \infty}} \newcommand{\infser}[1][1]{\sum_{n=#1}^\infty} \newcommand{\Fp}{F\primeskip'} \newcommand{\Fpp}{F\primeskip''} \newcommand{\yp}{y\primeskip'} \newcommand{\gp}{g\primeskip'} \newcommand{\dx}{\Delta x} \newcommand{\dy}{\Delta y} \newcommand{\ddz}{\Delta z} \newcommand{\thet}{\theta} \newcommand{\norm}[1]{\left\lVert#1\right\rVert} \newcommand{\vnorm}[1]{\left\lVert\vec #1\right\rVert} \newcommand{\snorm}[1]{\left|\left|\ #1\ \right|\right|} \newcommand{\la}{\left\langle} \newcommand{\ra}{\right\rangle} \newcommand{\dotp}[2]{\vec #1 \cdot \vec #2} \newcommand{\proj}[2]{\text{proj}_{\,\vec #2}{\,\vec #1}} \newcommand{\crossp}[2]{\vec #1 \times \vec #2} \newcommand{\veci}{\vec i} \newcommand{\vecj}{\vec j} \newcommand{\veck}{\vec k} \newcommand{\vecu}{\vec u} \newcommand{\vecv}{\vec v} \newcommand{\vecw}{\vec w} \newcommand{\vecx}{\vec x} \newcommand{\vecy}{\vec y} \newcommand{\vrp}{\vec r\, '} \newcommand{\vsp}{\vec s\, '} \newcommand{\vrt}{\vec r(t)} \newcommand{\vst}{\vec s(t)} \newcommand{\vvt}{\vec v(t)} \newcommand{\vat}{\vec a(t)} \newcommand{\px}{\partial x} \newcommand{\py}{\partial y} \newcommand{\pz}{\partial z} \newcommand{\pf}{\partial f} \newcommand{\mathN}{\mathbb{N}} \newcommand{\zerooverzero}{\ds \raisebox{8pt}{\text{``\ }}\frac{0}{0}\raisebox{8pt}{\textit{ ''}}} \newcommand{\deriv}[2]{\myds\frac{d}{dx}\left(#1\right)=#2} \newcommand{\myint}[2]{\myds\int #1\ dx= {\ds #2}} \DeclareMathOperator{\sech}{sech} \DeclareMathOperator{\csch}{csch} \newcommand{\primeskip}{\hskip.75pt} \newcommand{\plotlinecolor}{blue} \newcommand{\colorone}{blue} \newcommand{\colortwo}{red} \newcommand{\coloronefill}{blue!15!white} \newcommand{\colortwofill}{red!15!white} \newcommand{\abs}[1]{\left\lvert #1\right\rvert} \newcommand{\lt}{<} \newcommand{\gt}{>} \newcommand{\amp}{&} \)

Section10.3The Dot Product

The previous section introduced vectors and described how to add them together and how to multiply them by scalars. This section introduces a multiplication on vectors called the dot product.

Definition10.3.1Dot Product
  1. Let \(\vec u = \la u_1,u_2\ra\) and \(\vec v = \la v_1,v_2\ra\) in \(\mathbb{R}^2\text{.}\) The dot product of \(\vec u\) and \(\vec v\text{,}\) denoted \dotp uv, is \begin{equation*} \dotp uv = u_1v_1+u_2v_2. \end{equation*}

  2. Let \(\vec u = \la u_1,u_2,u_3\ra\) and \(\vec v = \la v_1,v_2,v_3\ra\) in \(\mathbb{R}^3\text{.}\) The dot product of \(\vec u\) and \(\vec v\text{,}\) denoted \dotp uv, is \begin{equation*} \dotp uv = u_1v_1+u_2v_2+u_3v_3. \end{equation*}

Note how this product of vectors returns a scalar, not another vector. We practice evaluating a dot product in the following example, then we will discuss why this product is useful.

Example10.3.2Evaluating dot products
  1. Let \(\vec u=\la 1,2\ra\text{,}\) \(\vec v=\la 3,-1\ra\) in \(\mathbb{R}^2\text{.}\) Find \dotp uv.

  2. Let \(\vec x = \la 2,-2,5\ra\) and \(\vec y = \la -1, 0, 3\ra\) in \(\mathbb{R}^3\text{.}\) Find \dotp xy.

Solution

The dot product, as shown by the preceding example, is very simple to evaluate. It is only the sum of products. While the definition gives no hint as to why we would care about this operation, there is an amazing connection between the dot product and angles formed by the vectors. Before stating this connection, we give a theorem stating some of the properties of the dot product.

The last statement of the theorem makes a handy connection between the magnitude of a vector and the dot product with itself. Our definition and theorem give properties of the dot product, but we are still likely wondering “What does the dot product mean?” It is helpful to understand that the dot product of a vector with itself is connected to its magnitude.

The next theorem extends this understanding by connecting the dot product to magnitudes and angles. Given vectors \(\vec u\) and \(\vec v\) in the plane, an angle \(\theta\) is clearly formed when \(\vec u\) and \(\vec v\) are drawn with the same initial point as illustrated in Figure 10.3.4(a). (We always take \(\theta\) to be the angle in \([0,\pi]\) as two angles are actually created.)

<<SVG image is unavailable, or your browser cannot render it>>

<<SVG image is unavailable, or your browser cannot render it>>

Figure10.3.5(a)
Figure10.3.6(b)
Figure10.3.4Illustrating the angle formed by two vectors with the same initial point.

The same is also true of 2 vectors in space: given \(\vec u\) and \(\vec v\) in \(\mathbb{R}^3\) with the same initial point, there is a plane that contains both \(\vec u\) and \(\vec v\text{.}\) (When \(\vec u\) and \(\vec v\) are co-linear, there are infinite planes that contain both vectors.) In that plane, we can again find an angle \(\theta\) between them (and again, \(0\leq \theta\leq \pi\)). This is illustrated in Figure 10.3.4(b).

The following theorem connects this angle \(\theta\) to the dot product of \(\vec u\) and \(\vec v\text{.}\)

When \(\theta\) is an acute angle (i.e., \(0\leq \theta \lt \pi/2\)), \(\cos(\theta)\) is positive; when \(\theta = \pi/2\text{,}\) \(\cos(\theta) = 0\text{;}\) when \(\theta\) is an obtuse angle (\(\pi/2\lt \theta \leq \pi\)), \(\cos(\theta)\) is negative. Thus the sign of the dot product gives a general indication of the angle between the vectors, illustrated in <<Unresolved xref, reference "fig_dotpsign"; check spelling or use "provisional" attribute>>.

<<SVG image is unavailable, or your browser cannot render it>>

\captionof{figure}{Illustrating the relationship between the angle between vectors and the sign of their dot product.} We can use Theorem 10.3.7 to compute the dot product, but generally this theorem is used to find the angle between known vectors (since the dot product is generally easy to compute). To this end, we rewrite the theorem's equation as \begin{equation*} \cos(\theta) = \frac{\dotp uv}{\norm{\vec u}\norm{\vec v}} \Leftrightarrow \theta = \cos^{-1}\left(\frac{\dotp uv}{\norm{\vec u}\norm{\vec v}}\right). \end{equation*}

We practice using this theorem in the following example.

<<SVG image is unavailable, or your browser cannot render it>>

Figure10.3.8Vectors used in Example 10.3.9.
Example10.3.9Using the dot product to find angles

Let \(\vec u = \la 3,1\ra\text{,}\) \(\vec v = \la -2,6\ra\) and \(\vec w = \la -4,3\ra\text{,}\) as shown in Figure 10.3.8. Find the angles \(\alpha\text{,}\) \(\beta\) and \(\theta\text{.}\)

Solution

We see from our computation that \(\alpha + \beta = \theta\text{,}\) as indicated by Figure 10.3.8. While we knew this should be the case, it is nice to see that this non-intuitive formula indeed returns the results we expected.

We do a similar example next in the context of vectors in space.

<<SVG image is unavailable, or your browser cannot render it>>

Figure10.3.10Vectors used in Example 10.3.11.
Example10.3.11Using the dot product to find angles

Let \(\vec u = \la 1,1,1\ra\text{,}\) \(\vec v = \la -1,3,-2\ra\) and \(\vec w = \la -5,1,4\ra\text{,}\) as illustrated in Figure 10.3.10. Find the angle between each pair of vectors.

Solution

All three angles between these vectors was \(\pi/2\text{,}\) or \(90^\circ\text{.}\) We know from geometry and everyday life that \(90^\circ\) angles are “nice” for a variety of reasons, so it should seem significant that these angles are all \(\pi/2\text{.}\) Notice the common feature in each calculation (and also the calculation of \(\alpha\) in Example 10.3.9): the dot products of each pair of angles was 0. We use this as a basis for a definition of the term orthogonal, which is essentially synonymous to perpendicular.

Definition10.3.12Orthogonal

Vectors \(\vec u\) and \(\vec v\) are orthogonal if their dot product is 0.

The term perpendicular originally referred to lines. As mathematics progressed, the concept of “being at right angles to” was applied to other objects, such as vectors and planes, and the term orthogonal was introduced. It is especially used when discussing objects that are hard, or impossible, to visualize: two vectors in 5-dimensional space are orthogonal if their dot product is 0. It is not wrong to say they are perpendicular, but common convention gives preference to the word orthogonal.

Example10.3.13Finding orthogonal vectors

Let \(\vec u = \la 3,5\ra\) and \(\vec v = \la 1,2,3\ra\text{.}\)

  1. Find two vectors in \(\mathbb{R}^2\) that are orthogonal to \(\vec u\text{.}\)

  2. Find two non–parallel vectors in \(\mathbb{R}^3\) that are orthogonal to \(\vec v\text{.}\)

Solution

An important construction is illustrated in Figure 10.3.14, where vectors \(\vec u\) and \(\vec v\) are sketched. In part (a), a dotted line is drawn from the tip of \(\vec u\) to the line containing \(\vec v\text{,}\) where the dotted line is orthogonal to \(\vec v\text{.}\) In part (b), the dotted line is replaced with the vector \(\vec z\) and \(\vec w\) is formed, parallel to \(\vec v\text{.}\) It is clear by the diagram that \(\vec u = \vec w+\vec z\text{.}\) What is important about this construction is this: \(\vec u\) is decomposed as the sum of two vectors, one of which is parallel to \(\vec v\) and one that is perpendicular to \(\vec v\text{.}\) It is hard to overstate the importance of this construction (as we'll see in upcoming examples).

The vectors \(\vec w\text{,}\) \(\vec z\) and \(\vec u\) as shown in Figure 10.3.14 (b) form a right triangle, where the angle between \(\vec v\) and \(\vec u\) is labeled \(\theta\text{.}\) We can find \(\vec w\) in terms of \(\vec v\) and \(\vec u\text{.}\)

Using trigonometry, we can state that \begin{equation} \norm{\vec w} = \norm{\vec u}\cos(\theta) . \label{eq_proj1}\tag{10.3.1} \end{equation}

<<SVG image is unavailable, or your browser cannot render it>>

<<SVG image is unavailable, or your browser cannot render it>>

Figure10.3.15(a)
Figure10.3.16(b)
Figure10.3.14Developing the construction of the orthogonal projection.

We also know that \(\vec w\) is parallel to to \(\vec v\) ; that is, the direction of \(\vec w\) is the direction of \(\vec v\text{,}\) described by the unit vector \(\frac{1}{\norm{\vec v}}\vec v\text{.}\) The vector \(\vec w\) is the vector in the direction \(\frac{1}{\norm{\vec v}}\vec v\) with magnitude \(\norm{\vec u}\cos(\theta)\text{:}\) \begin{align*} \vec w \amp = \Big(\norm{\vec u}\cos(\theta) \Big)\frac{1}{\norm{\vec v}}\vec v.\\ \end{align*} Replace \(\cos(\theta)\) using Theorem 10.3.7: \begin{align*} \amp = \left(\norm{\vec u}\frac{\dotp uv}{\norm{\vec u}\norm{\vec v}}\right)\frac{1}{\norm{\vec v}} \vec v\\ \amp = \frac{\dotp uv}{\norm{\vec v}^2}\vec v.\\ \end{align*} Now apply Theorem 10.3.3. \begin{align*} \amp = \frac{\dotp uv}{\dotp vv}\vec v. \end{align*}

Since this construction is so important, it is given a special name.

Definition10.3.17Orthogonal Projection

Let \(\vec u\) and \(\vec v\) be given. The orthogonal projection of \(\vec u\) onto \(\vec v\), denoted \(\proj uv\text{,}\) is \begin{equation*} \proj uv = \frac{\dotp uv}{\dotp vv}\vec v. \end{equation*}

Example10.3.18Computing the orthogonal projection
  1. Let \(\vec u= \la -2,1\ra\) and \(\vec v=\la 3,1\ra\text{.}\) Find \(\proj uv\text{,}\) and sketch all three vectors with initial points at the origin.

  2. Let \(\vec w = \la 2,1,3\ra\) and \(\vec x = \la 1,1,1\ra\text{.}\) Find \(\proj wx\text{,}\) and sketch all three vectors with initial points at the origin.

Solution

<<SVG image is unavailable, or your browser cannot render it>>

Figure10.3.20Illustrating the orthogonal projection.

Consider Figure 10.3.20 where the concept of the orthogonal projection is again illustrated. It is clear that \begin{equation} \vec u = \proj uv + \vec z. \label{eq_orthogproj}\tag{10.3.2} \end{equation}

As we know what \(\vec u\) and \(\proj uv\) are, we can solve for \(\vec z\) and state that \begin{equation*} \vec z = \vec u - \proj uv. \end{equation*}

This leads us to rewrite Equation (10.3.2) in a seemingly silly way: \begin{equation*} \vec u = \proj uv + (\vec u - \proj uv). \end{equation*}

This is not nonsense, as pointed out in the following Key Idea. (Notation note: the expression “\(\parallel \vec y\)” means “is parallel to \(\vec y\text{.}\)” We can use this notation to state “\(\vec x\parallel\vec y\)” which means “\(\vec x\) is parallel to \(\vec y\text{.}\)” The expression “\(\perp \vec y\)” means “is orthogonal to \(\vec y\text{,}\)” and is used similarly.)

Key Idea10.3.21Orthogonal Decomposition of Vectors

Let \(\vec u\) and \(\vec v\) be given. Then \(\vec u\) can be written as the sum of two vectors, one of which is parallel to \(\vec v\text{,}\) and one of which is orthogonal to \(\vec v\text{:}\) \begin{equation*} \vec u = \underbrace{\proj uv}_{\parallel\ \vec v}\ +\ (\underbrace{\vec u-\proj uv}_{\perp\ \vec v}). \end{equation*}

We illustrate the use of this equality in the following example.

Example10.3.22Orthogonal decomposition of vectors
  1. Let \(\vec u = \la -2,1\ra\) and \(\vec v = \la 3,1\ra\) as in Example 10.3.18. Decompose \(\vec u\) as the sum of a vector parallel to \(\vec v\) and a vector orthogonal to \(\vec v\text{.}\)

  2. Let \(\vec w =\la 2,1,3\ra\) and \(\vec x =\la 1,1,1\ra\) as in Example 10.3.18. Decompose \(\vec w\) as the sum of a vector parallel to \(\vec x\) and a vector orthogonal to \(\vec x\text{.}\)

Solution

We give an example of where this decomposition is useful.

Example10.3.23Orthogonally decomposing a force vector

Consider Figure 10.3.24(a), showing a box weighing 50lb on a ramp that rises 5ft over a span of 20ft. Find the components of force, and their magnitudes, acting on the box (as sketched in part (b) of the figure):

<<SVG image is unavailable, or your browser cannot render it>>

<<SVG image is unavailable, or your browser cannot render it>>

Figure10.3.25(a)
Figure10.3.26(b)
Figure10.3.24Sketching the ramp and box in Example 10.3.23. Note: The vectors are not drawn to scale.
  1. in the direction of the ramp, and

  2. orthogonal to the ramp.

Solution

Subsection10.3.1Application to Work

In physics, the application of a force \(F\) to move an object in a straight line a distance \(d\) produces work; the amount of work \(W\) is \(W=Fd\text{,}\) (where \(F\) is in the direction of travel). The orthogonal projection allows us to compute work when the force is not in the direction of travel.

<<SVG image is unavailable, or your browser cannot render it>>

Figure10.3.27Finding work when the force and direction of travel are given as vectors.

Consider Figure 10.3.27, where a force \(\vec F\) is being applied to an object moving in the direction of \(\vec d\text{.}\) (The distance the object travels is the magnitude of \(\vec d\text{.}\)) The work done is the amount of force in the direction of \(\vec d\text{,}\) \(\norm{\proj Fd}\text{,}\) times \(\vnorm d\text{:}\) \begin{align*} \norm{\proj Fd}\cdot\vnorm d \amp = \snorm{\frac{\dotp Fd}{\dotp dd}\vec d}\cdot \vnorm d\\ \amp = \abs{\frac{\dotp Fd}{\vnorm d^2}}\cdot \vnorm d\cdot\vnorm d\\ \amp = \frac{\abs{\dotp Fd}}{\vnorm d^2}\vnorm d^2\\ \amp = \abs{\dotp Fd}. \end{align*}

The expression \(\dotp Fd\) will be positive if the angle between \(\vec F\) and \(\vec d\) is acute; when the angle is obtuse (hence \(\dotp Fd\) is negative), the force is causing motion in the opposite direction of \(\vec d\text{,}\) resulting in “negative work.” We want to capture this sign, so we drop the absolute value and find that \(W = \dotp Fd\text{.}\)

Definition10.3.28Work

Let \(\vec F\) be a constant force that moves an object in a straight line from point \(P\) to point \(Q\text{.}\) Let \(\vec d = \vv{PQ}\text{.}\) The work \(W\) done by \(\vec F\) along \(\vec d\) is \(W = \dotp Fd\text{.}\)

Example10.3.29Computing work

A man slides a box along a ramp that rises 3ft over a distance of 15ft by applying 50lb of force as shown in Figure 10.3.30. Compute the work done.

Solution

The dot product is a powerful way of evaluating computations that depend on angles without actually using angles. The next section explores another “product” on vectors, the cross product. Once again, angles play an important role, though in a much different way.

Subsection10.3.2Exercises

In the following exercises, find the dot product of the given vectors.

In the following exercises, find the measure of the angle between the two vectors in both radians and degrees.

In the following exercises, a vector \(\vec v\) is given. Give two vectors that are orthogonal to \(\vec v\text{.}\)

In the following exercises, vectors \(\vec u\) and \(\vec v\) are given. Find \(\proj uv\text{,}\) the orthogonal projection of \(\vec u\) onto \(\vec v\text{,}\) and sketch all three vectors on the same axes.

In the following exercises, vectors \(\vec u\) and \(\vec v\) are given. Write \(\vec u\) as the sum of two vectors, one of which is parallel to \(\vec v\) (or is zero) and one of which is orthogonal to \(\vec v\text{.}\) Note: these are the same pairs of vectors as found in Exercises 10.3.2.2110.3.2.26.