Skip to main content Contents
Prev Up Next \(\newcommand{\avec}{{\mathbf a}}
\newcommand{\bvec}{{\mathbf b}}
\newcommand{\cvec}{{\mathbf c}}
\newcommand{\dvec}{{\mathbf d}}
\newcommand{\dtil}{\widetilde{\mathbf d}}
\newcommand{\evec}{{\mathbf e}}
\newcommand{\fvec}{{\mathbf f}}
\newcommand{\nvec}{{\mathbf n}}
\newcommand{\pvec}{{\mathbf p}}
\newcommand{\qvec}{{\mathbf q}}
\newcommand{\svec}{{\mathbf s}}
\newcommand{\tvec}{{\mathbf t}}
\newcommand{\uvec}{{\mathbf u}}
\newcommand{\vvec}{{\mathbf v}}
\newcommand{\wvec}{{\mathbf w}}
\newcommand{\xvec}{{\mathbf x}}
\newcommand{\yvec}{{\mathbf y}}
\newcommand{\zvec}{{\mathbf z}}
\newcommand{\rvec}{{\mathbf r}}
\newcommand{\mvec}{{\mathbf m}}
\newcommand{\zerovec}{{\mathbf 0}}
\newcommand{\onevec}{{\mathbf 1}}
\newcommand{\real}{{\mathbb R}}
\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2
\end{array}\right]}
\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2
\end{array}\right]}
\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3
\end{array}\right]}
\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3
\end{array}\right]}
\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4
\end{array}\right]}
\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4
\end{array}\right]}
\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\
#4 \\ #5 \\ \end{array}\right]}
\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\
#4 \\ #5 \\ \end{array}\right]}
\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}
\newcommand{\laspan}[1]{\text{Span}\{#1\}}
\newcommand{\bcal}{{\cal B}}
\newcommand{\ccal}{{\cal C}}
\newcommand{\scal}{{\cal S}}
\newcommand{\wcal}{{\cal W}}
\newcommand{\ecal}{{\cal E}}
\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}
\newcommand{\gray}[1]{\color{gray}{#1}}
\newcommand{\lgray}[1]{\color{lightgray}{#1}}
\newcommand{\rank}{\operatorname{rank}}
\newcommand{\row}{\text{Row}}
\newcommand{\col}{\text{Col}}
\renewcommand{\row}{\text{Row}}
\newcommand{\nul}{\text{Nul}}
\newcommand{\var}{\text{Var}}
\newcommand{\corr}{\text{corr}}
\newcommand{\len}[1]{\left|#1\right|}
\newcommand{\bbar}{\overline{\bvec}}
\newcommand{\bhat}{\widehat{\bvec}}
\newcommand{\bperp}{\bvec^\perp}
\newcommand{\xhat}{\widehat{\xvec}}
\newcommand{\vhat}{\widehat{\vvec}}
\newcommand{\uhat}{\widehat{\uvec}}
\newcommand{\what}{\widehat{\wvec}}
\newcommand{\Sighat}{\widehat{\Sigma}}
\newcommand{\lt}{<}
\newcommand{\gt}{>}
\newcommand{\amp}{&}
\definecolor{fillinmathshade}{gray}{0.9}
\newcommand{\fillinmath}[1]{\mathchoice{\colorbox{fillinmathshade}{$\displaystyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\textstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptscriptstyle\phantom{\,#1\,}$}}}
\)
Section 1.3 The dot product
In this section, we introduce a simple algebraic operation, known as the dot product , that helps us measure the length of vectors and the angle formed by a pair of vectors. For two-dimensional vectors \(\vvec\) and \(\wvec\text{,}\) their dot product \(\vvec\cdot\wvec\) is the scalar defined to be
\begin{equation*}
\vvec\cdot\wvec = \twovec{v_1}{v_2}\cdot\twovec{w_1}{w_2} =
v_1w_1 + v_2w_2\text{.}
\end{equation*}
For instance,
\begin{equation*}
\twovec{2}{-3}\cdot\twovec{4}{1} = 2\cdot 4 + (-3)\cdot 1 = 5.
\end{equation*}
Exploration 1.3.1 .
Compute the dot product
\begin{equation*}
\twovec{3}{4}\cdot\twovec{2}{-2}\text{.}
\end{equation*}
Sketch the vector
\(\vvec=\twovec{3}{4}\) below. Then use the Pythagorean theorem to find the length of
\(\vvec\text{.}\)
Figure 1.3.1. Sketch the vector \(\vvec\) and find its length.
Compute the dot product \(\vvec\cdot\vvec\text{.}\) How is the dot product related to the length of \(\vvec\text{?}\)
Solution .
\(\twovec34\cdot\twovec2{-2} = 3\cdot2+4\cdot(-2) =
-2\text{.}\)
The length of \(\vvec\) is 5.
\(\vvec\cdot\vvec = 25\text{,}\) which is the square of the length of \(\vvec\text{.}\)
\(\displaystyle \wvec=\twovec{-4}3\)
\(\vvec\cdot\wvec=0\text{.}\)
\(\vvec\cdot\wvec=0\text{.}\)
The dot product should be zero.
Subsection 1.3.1 The geometry of the dot product
The dot product is defined, more generally, for any two \(m\) -dimensional vectors:
\begin{equation*}
\vvec\cdot\wvec =
\left[
\begin{array}{c}
v_1 \\ v_2 \\ \vdots \\ v_m \\
\end{array}
\right]
\cdot
\left[
\begin{array}{c}
w_1 \\ w_2 \\ \vdots \\ w_m \\
\end{array}
\right]
= v_1w_1 + v_2w_2 + \ldots + v_mw_m\text{.}
\end{equation*}
The important thing to remember is that the dot product will produce a scalar. In other words, the two vectors are combined in such a way as to create a number, and, as we’ll see, this number conveys useful geometric information.
Example 1.3.2 .
We compute the dot product between two four-dimensional vectors as
\begin{equation*}
\left[
\begin{array}{c}
2 \\ 0 \\ -3 \\ 1 \\
\end{array}
\right]
\cdot
\left[
\begin{array}{c}
-1 \\ 3 \\ 1 \\ 2 \\
\end{array}
\right]
= 2(-1) + 0(3) + (-3)(1) + 1(2) = -3\text{.}
\end{equation*}
Properties of dot products.
As with ordinary multiplication, the dot product enjoys some familiar algebraic properties, such as commutativity and distributivity. More specifically, it doesn’t matter in which order we compute the dot product of two vectors:
\begin{equation*}
\vvec\cdot\wvec = \wvec\cdot\vvec\text{.}
\end{equation*}
If \(s\) is a scalar, we have
\begin{equation*}
(s\vvec)\cdot\wvec = s(\vvec\cdot\wvec)\text{.}
\end{equation*}
We may also distribute the dot product across linear combinations:
\begin{equation*}
(c_1\vvec_1+c_2\vvec_2)\cdot\wvec = c_1\vvec_1\cdot\wvec +
c_2\vvec_2\cdot\wvec\text{.}
\end{equation*}
Example 1.3.3 .
Suppose that \(\vvec_1\cdot\wvec = 4\) and \(\vvec_2\cdot\wvec = -7\text{.}\) Then
\begin{equation*}
\begin{aligned}
(2\vvec_1)\cdot\wvec \amp {}={} 2(\vvec_1\cdot\wvec) =
2(4) = 8 \\
(-3\vvec_1+ 2\vvec_2)\cdot\wvec \amp {}={}
-3(\vvec_1\cdot\wvec) + 2(\vvec_2\cdot\wvec) = -3(4)+2(-7) =
-26\text{.}
\end{aligned}
\end{equation*}
The most important property of the dot product, and the real reason for our interest in it, is that it gives us geometric information about vectors and their relationship to one another. Let’s first think about the length of a vector by looking at the vector
\(\vvec = \twovec32\) as shown in
Figure 1.3.4
Figure 1.3.4. The vector \(\vvec=\twovec32\text{.}\)
We may find the length of this vector using the Pythagorean theorem since the vector forms the hypotenuse of a right triangle having a horizontal leg of length 3 and a vertical leg of length 2. The length of \(\vvec\text{,}\) which we denote as \(\len{\vvec}\text{,}\) is therefore \(\len{\vvec} = \sqrt{3^2 +
2^2} = \sqrt{13}\text{.}\) Now notice that the dot product of \(\vvec\) with itself is
\begin{equation*}
\vvec\cdot\vvec = 3(3) + 2(2) = 13 = \len{\vvec}^2\text{.}
\end{equation*}
This is true in general; that is, we have
\begin{equation*}
\vvec\cdot\vvec = \len{\vvec}^2\text{.}
\end{equation*}