Skip to main content

Section 1.3 The Dot Product

Subsection 1.3.1 Basic Concepts

Definition 1.3.1.

Let \(\vec{u}, \vec{v}, \vec{w}\) be vectors in either \(\R^2\) or \(\R^3\text{,}\) the dot product of \(\vec{u}\) and \(\vec{v}\) is defined as
\begin{equation*} \begin{array}{cclr} \vec{u} \cdot \vec{v} \amp=\amp u_1\,v_1 + u_2\, v_2 \hspace{1cm} \amp \text{ if } \vec{u}, \vec{v} \in \R^2\\ \amp \amp \amp\\ \amp = \amp u_1\,v_1 + u_2\, v_2 + u_3\,v_3 \hspace{1cm} \amp \text{ if } \vec{u}, \vec{v} \in \R^3 \end{array} \end{equation*}

Insight 1.3.2.

  • The dot product is also called the inner product
  • The dot product \(\vec{u} \cdot \vec{v} \) is also denoted by \(\langle \vec{u}, \vec{v} \rangle\)
  • The dot product is always a scalar.
Properties of the dot product \(\begin{array}{l} \text{Let } \vec{u}, \vec{v} \text{ and } \vec{w} \text{ be vectors in either } \R^2 \text{ or } \R^3 \text{ and } c \text{ a scalar, }\amp\\ \end{array}\)
\begin{equation*} \begin{array}{clcl} \bullet \amp \vec{u} \cdot \vec{v} = \vec{v} \cdot \vec{u} \amp \hspace{0.4cm} \amp \text{(Commutative)}\\ \bullet \amp \left(\vec{u}+ \vec{v} \right) \cdot \vec{w} = \vec{u} \cdot \vec{w}+ \vec{v} \cdot \vec{w} \amp \hspace{0.4cm} \amp \text{(Distributive 1)}\\ \bullet \amp c\, \vec{u} \cdot \vec{v} = c\,\left(\vec{u} \cdot \vec{v} \right) = \vec{u} \cdot c\,\vec{v} \amp \hspace{0.4cm} \amp \text{(Distributive 2)}\\ \bullet \amp \vec{u} \cdot \vec{u} \gt 0 \hspace{0.5cm} \text{ if } \vec{u} \ne \vec{0} \amp \amp \\ \amp \vec{u} \cdot \vec{u} = 0 \hspace{0.5cm} \text{ if } \vec{u} = \vec{0} \amp \amp \\ \end{array} \end{equation*}
If \(\vec{u} = \left[ 5,2,4\right]^{\T}\) and \(\vec{v} = \left[ 3,-1,1\right]^{\T}\) , then
\begin{equation*} \vec{u} \cdot \vec{v} = 5 \times 3 + 2 \times (-1) + 4 \times 1 = 15 - 2 + 4 = 17. \end{equation*}
Find \(\vec{u} \cdot \vec{v} \text{,}\) where \(\vec{u} = \left[ {-2}, {-5} , {-5} \right]^{\T}\) and \(\vec{v} = \left[ {-2}, {4} , {-1} \right]^{\T}\)
\(\vec{u} \cdot \vec{v} =\)
Answer.
\(-11\)
Solution.
\begin{equation*} \vec{u}\cdot \vec{v} = \left[\begin{array}{c} {-2}\\ {-5} \\ {-5} \end{array}\right] \cdot \left[ \begin{array}{c} {-2}\\ {4} \\ {-1}\end{array} \right] = \left({-2}\times {-2}\right) + \left({-5}\times {4}\right) + \left({-5}\times {-1}\right) = {-11} \end{equation*}

Subsection 1.3.2 Magnitude of a Vector

Definition 1.3.5. Norm of a vector in \(\R^2\).

The norm (length or magnitude) of a vector \(\vec{u} = \left[ u_1,u_2\right]^{\T}\) is
\begin{equation*} \Vert \vec{u} \Vert = \sqrt{\vec{u} \cdot \vec{u}} = \sqrt{(u_1)^2+(u_2)^2} \end{equation*}
Find the Magnitude of the given vectors
  • \(\vec{u} = \left[ \begin{array}{r} 2\\2\end{array}\right] \)
    \begin{equation*} \Vert \vec{u} \Vert = \sqrt{2^2 + 2^2} = \sqrt{4+4} = \sqrt{8} = 2\sqrt{2}. \end{equation*}
  • \(\vec{u} = \left[ \begin{array}{r}4\\4 \end{array}\right] \)
    \begin{equation*} \Vert \vec{u} \Vert = \sqrt{4^2 + 4^2} = \sqrt{16+16} = \sqrt{32} = 4\sqrt{2}. \end{equation*}
  • \(\vec{u} = \left[ \begin{array}{r}-1\\1 \end{array}\right] \)
    \begin{equation*} \Vert \vec{u} \Vert = \sqrt{1^2 + 1^2} = \sqrt{1+1} = \sqrt{2}. \end{equation*}
  • \(\vec{u} = \left[ \begin{array}{r} -3\\-3\end{array}\right] \)
    \begin{equation*} \Vert \vec{u} \Vert = \sqrt{(-3)^2 + 3^2} = \sqrt{9+9} = \sqrt{18} = 3\sqrt{2}. \end{equation*}
  • \(\vec{u} = \left[ \begin{array}{r} 4\\-4 \end{array}\right] \)
    \begin{equation*} \Vert \vec{u} \Vert = \sqrt{(-4)^2 + 4^2} = \sqrt{16+16} = \sqrt{32} = 4\sqrt{2}. \end{equation*}
Find \(\Vert \vec{u} \Vert\) and \(\Vert \vec{v} \Vert \text{,}\) where \(\vec{u} = \left[\begin{array}{c} {-1} \\ {2} \\ {-1} \end{array}\right]\) and \(\vec{v} = \left[\begin{array}{c} {-5} \\ {4} \\ {4} \end{array}\right]\)
\(\Vert \vec{u} \Vert =\)
\(\Vert \vec{v} \Vert =\)
Answer 1.
\(2.44949\)
Answer 2.
\(7.54983\)
Solution.
\begin{equation*} \Vert \vec{u} \Vert= \sqrt{ \vec{u}\cdot \vec{u}} = \sqrt{\left({-1}\times {-1}\right) + \left({2}\times {2}\right) + \left({-1}\times {-1}\right) } = \sqrt{{6}} = {2.44949}. \end{equation*}
\begin{equation*} \Vert \vec{v} \Vert= \sqrt{ \vec{v}\cdot \vec{v}} = \sqrt{\left({-5}\times {-5}\right) + \left({4}\times {4}\right) + \left({4}\times {4}\right) } = \sqrt{{57}}= {7.54983}. \end{equation*}

Definition 1.3.8. Norm of a vector in \(\R^3\).

The norm (length or magnitude) of a vector \(\vec{u} = \left[ u_1,u_2,u_3\right]^{\T}\) is
\begin{equation*} \Vert \vec{u} \Vert = \sqrt{\vec{u} \cdot \vec{u}} = \sqrt{(u_1)^2+(u_2)^2+(u_3)^2} \end{equation*}

Subsubsection 1.3.2.1 Properties of the norm

\(\begin{array}{l} \text{Let } \vec{u} \text{ and } \vec{v} \text{ be vectors in either } \R^2 \text{ or } \R^3 \text{ and } c \text{ a scalar, }\amp\\ \end{array}\)
\begin{equation*} \begin{array}{cl} \bullet \amp \vec{u} \cdot \vec{u} = \Vert \vec{u}\Vert^2, \\ \bullet \amp \Vert \vec{u} \Vert \gt 0 \hspace{0.5cm} \text{iff } \vec{u} \ne \vec{0},\\ \bullet \amp \Vert \vec{u} \Vert = 0 \hspace{0.5cm} \text{iff } \vec{u} = \vec{0},\\ \bullet \amp \Vert c \vec{u} \Vert = |c| \Vert \vec{u} \Vert, \hspace{0.5cm} \text{ where } |c| \text{ is the absolute value of } c,\\ \bullet \amp \text{Triangle inequality: } \Vert \vec{u} + \vec{v} \Vert \le \Vert \vec{u} \Vert + \Vert \vec{v} \Vert. \end{array} \end{equation*}

Subsubsection 1.3.2.2 Unit vectors

Definition 1.3.9. Unit vector.
A unit vector is a vector whose norm or magnitude is equal to one.
The vector \(\vec{u} = \left[ \frac{1}{\sqrt{2}}, \frac{1}{\sqrt{2}} \right]^{\T}\) is a unit vector since,
\begin{equation*} \Vert \vec{u} \Vert = \sqrt{\frac{1}{2} + \frac{1}{2}} = \sqrt{1} = 1. \end{equation*}
Find the unit vector in the direction of the given vector,
\begin{equation*} \vec{u} = \left[\begin{array}{c} {1}\\ {-1}\\ {4} \end{array}\right]. \end{equation*}
The magnitude of the vector is, \(\Vert \vec{u} \Vert =\)
The unit vector is, \(\hat{u} =\) [ , , ]\(^{\T}\)
Answer 1.
\(4.24264\)
Answer 2.
\(0.235702\)
Answer 3.
\(-0.235702\)
Answer 4.
\(0.942809\)
Solution.
\begin{equation*} \Vert \vec{u} \Vert = \sqrt{{1}^2 + {-1}^2 + {4}^2} = {4.24264}. \end{equation*}
\begin{equation*} \hat{u} = \left[\begin{array}{c} \frac{{1}}{{4.24264}}\\ \frac{{-1}}{{4.24264}}\\ \frac{{4}}{{4.24264}} \end{array}\right]= \left[\begin{array}{c} {0.235702}\\{-0.235702}\\{0.942809} \end{array}\right]. \end{equation*}
Insight 1.3.12.
Sometimes a vector is defined in terms of the unit vectors in the \(x\text{,}\) \(y\text{,}\) and \(z\) directions; usually denoted \(\hat{i}\text{,}\) \(\hat{j}\) and \(\hat{k}\text{,}\) respectively.
\begin{equation*} \text{The vector } \vec{u} = \left[\begin{array}{c} 2\\3\\6 \end{array}\right], \text{ can also be written as } \vec{u} = 2 \hat{i} + 3 \hat{j} + 6 \hat{k}. \end{equation*}

Subsection 1.3.3 Angle between two vectors

Definition 1.3.13. Angle between two vectors.

Let \(\vec{u} \) and \(\vec{v} \) be two vectors in either \(\R^2\) or \(\R^3\text{,}\) and let \(\theta\) be the angle between \(\vec{u} \) and \(\vec{v} \text{.}\) Then the following holds
\begin{equation*} \cos \theta = \frac{\vec{u} \cdot \vec{v}}{\Vert \vec{u} \Vert \Vert \vec{v} \Vert}. \end{equation*}
Let \(\vec{u} = \left[ 1,-1\right]^{\T}\) and \(\vec{v} = \left[ 2,0\right]^{\T}\text{.}\) Find the angle between \(\vec{u} \) and \(\vec{v}\text{.}\)
To find the angle we need the magnitude of both vectors and their dot product:
\begin{equation*} \begin{array}{lcl} \Vert \vec{u}\Vert \amp = \amp \sqrt{\vec{u} \cdot \vec{u}} = \sqrt{1^2 + (-1)^2} = \sqrt{2}\\ \Vert \vec{v}\Vert \amp = \amp \sqrt{\vec{v} \cdot \vec{v}} = \sqrt{2^2 + 0^2} = \sqrt{4} = 2\\ \vec{u} \cdot \vec{v} \amp = \amp 1 \times 2 + -1 \times 0 = 2 \end{array} \end{equation*}
Next we calculate the cosine of the angle,
\begin{equation*} \cos \theta = \frac{\vec{u} \cdot \vec{v}}{\Vert \vec{u} \Vert \Vert \vec{v} \Vert} = \frac{2}{\sqrt{2} \times 2} = \frac{1}{\sqrt{2}} = \frac{\sqrt{2}}{2} \end{equation*}
Finally, we find the angle using the inverse cosine,
\begin{equation*} \theta = \cos^{-1} \left(\frac{\sqrt{2}}{2}\right) = \frac{\pi}{4}. \end{equation*}
Two vectors are said to be orthogonal if the angle between them is equal to 90 degrees \(\left(\cos \frac{\pi}{2} = 0\right)\text{.}\) Similarly, two vectors are parallel if the angle between them is equal to zero \(\left(\cos 0 = 1\right)\text{.}\)
Determine whether the two given vectors are orthogonal, parallel, or neither.
  •  
    \begin{equation*} \vec{u} = \left[ {1}, {-1} \right]^{\T}, \hspace{1cm} \vec{v} = \left[ {1}, {-1} \right]^{\T} \end{equation*}
    • Orthogonal
    • Parallel
    • Neither
  •  
    \begin{equation*} \vec{u} = \left[ {-4}, {3} \right]^{\T}, \hspace{1cm} \vec{v} = \left[ {-3}, {-4} \right]^{\T} \end{equation*}
    • Orthogonal
    • Parallel
    • Neither
  •  
    \begin{equation*} \vec{u} = \left[ {3}, {-5} \right]^{\T}, \hspace{1cm} \vec{v} = \left[ {-4}, {4} \right]^{\T} \end{equation*}
    • Orthogonal
    • Parallel
    • Neither
Answer 1.
\(\text{Parallel}\)
Answer 2.
\(\text{Orthogonal}\)
Answer 3.
\(\text{Neither}\)
Solution.
  •  
    \begin{equation*} \begin{array}{ccc} \vec{u} \cdot \vec{v} \amp=\amp \left( {1} \cdot {1}\right) + \left( {-1} \cdot {-1}\right) = {2}\\ \Vert \vec{u} \Vert \amp = \amp \left( {1} \cdot {1}\right) + \left( {-1} \cdot {-1}\right)= {1.41421}\\ \Vert \vec{v} \Vert \amp = \amp \left( {1} \cdot {1}\right) + \left( {-1} \cdot {-1}\right) = {1.41421}\\ \cos \theta \amp = \amp \frac{{2}}{{1.41421} \cdot {1.41421}} = {1}. \end{array} \end{equation*}
  •  
    \begin{equation*} \begin{array}{ccc} \vec{u} \cdot \vec{v} \amp=\amp \left( {-4} \cdot {-3}\right) + \left( {3} \cdot {-4}\right) = {0}\\ \Vert \vec{u} \Vert \amp = \amp \left( {-4} \cdot {-4}\right) + \left( {3} \cdot {3}\right)= {5}\\ \Vert \vec{v} \Vert \amp = \amp \left( {-3} \cdot {-3}\right) + \left( {-4} \cdot {-4}\right) = {5}\\ \cos \theta \amp = \amp \frac{{0}}{{5} \cdot {5}} = {0}. \end{array} \end{equation*}
  •  
    \begin{equation*} \begin{array}{ccc} \vec{u} \cdot \vec{v} \amp=\amp \left( {3} \cdot {-4}\right) + \left( {-5} \cdot {4}\right) = {-32}\\ \Vert \vec{u} \Vert \amp = \amp \left( {3} \cdot {3}\right) + \left( {-5} \cdot {-5}\right)= {5.83095}\\ \Vert \vec{v} \Vert \amp = \amp \left( {-4} \cdot {-4}\right) + \left( {4} \cdot {4}\right) = {5.65685}\\ \cos \theta \amp = \amp \frac{{-32}}{{5.83095} \cdot {5.65685}} = {-0.970143}. \end{array} \end{equation*}