Skip to main content

Section 3 The Dot Product

In this section we will take a look at the dot product. The dot product is a product between two vectors that results in a scalar. The resultant scalar can be used to help determine information on the angle between the two vectors.

The result of the dot product is a _________.

Solution
The result of the dot product is a scalar.

To explore this product we will break it down into three parts. First we will look at the technical definition that will allow us to perform the product. Then we will look at what this result means, and then finally we will use the dot product to find the angle between vectors.

Subsection 3.1 Technical Definition of the Dot Product

Definition 3.2.
Let \(\mathbf{u} = \langle a,b \rangle \) and let \(\mathbf{v} = \langle c,d \rangle \text{.}\) The dot product, denoted \(\mathbf{u} \cdot \mathbf{v} \text{,}\) is a binary operation of vectors defined to be,
\begin{equation*} \mathbf{u} \cdot \mathbf{v} = \langle a,b \rangle \cdot \langle c,d \rangle = (a)(c) + (b)(d) \end{equation*}

Subsection 3.2 The Dot Product and the Angle between Vectors

In this section we will start to look at how we can use the dot product to find the angle between two vectors. This will also give us some context for what the dot product is as well as some of what it can tell us. To start we should quickly review the unit circle and some of the important angles that we will be needing here.

Figure 3.6. A figure generated with TikZ in

When we are thinking about vectors one of the ways that we can evaluate them in terms of one another is the angle between them. There are three main destinctions that we are going to consider; between \(0^{\circ}\) and \(90^{\circ} \text{,}\) exactly \(90^{\circ} \) and between \(90^{\circ} \) and \(180^{\circ} \text{.}\) To encode these different categories we are going to need to take a look at cosine.

Looking at the unit circle above, recall that the cosine of an angle gives us the \(x \) value of the point on the unit circle associated with that angle. So \(\cos(30^{\circ}) = \frac{\sqrt{3}}{2} \) and \(\cos(120^{\circ}) = \frac{-1}{2} \) and finally \(\cos(90^{\circ}) = 0 \text{.}\) Try a few of these to get the hang of reading the unit circle.

Now what we want to reflect on from the last few questions is the sign on each of the answers that you gave. When the angle that was being evaluated was between \(0 \) and \(90^{\circ} \text{,}\) the cosine reported a positive value. When it was between \(90^{\circ} \) and \(180^{\circ} \) the cosine reported a negative number. And finally, \(\cos(90^{\circ}) = 0 \text{.}\) It is this observation that we are going to use to destinguish some information about the angle between vectors.

We are going to need one additional tool to build the "Angle Between Vectors" equation.

The Law of Cosines.

Let \(a \text{,}\) \(b \) and \(c \) be sides of a triangle and let \(C \) be the angle across from side \(c \text{.}\) Then,

\begin{equation*} c^2 = a^2 + b^2 -2ab\cos(C) \end{equation*}

Subsubsection 3.2.1 The Math of the Angle Between Vectors

In this subsection we are going to look at how we can use the law of cosines to build an equation that relates the dot product and angle between vectors. Let's start at the end and take a look at the equation.

Angle Between Vectors.

Let \(\mathbf{v} \) and \(\mathbf{u} \) be vectors and let \(\theta \) be the angle between the vectors.

\begin{equation*} \cos(\theta) = \frac{\mathbf{v} \cdot \mathbf{u}}{|\mathbf{v}||\mathbf{u}|} \end{equation*}

Recall that \(|\mathbf{u}| \) is the magnitude of \(\mathbf{u} \text{.}\)

Let's work through the math of where this comes from.

Let \(\mathbf{u} = \langle u_1, u_2 \rangle \) and \(\mathbf{v} = \langle v_1, v_2 \rangle \) be vectors, and let \(\theta \) be the angle between the vectors. Consider, the figure below. For this proof, we are going to think about the vectors as sides of a triangle, the the angle, \(\theta \) , between them.

Figure 3.12. A figure generated with TikZ in

We will start by writing the law of cosines using the vectors that we have. So,

\begin{equation*} (|\mathbf{u} - \mathbf{v}|)^2 = |\mathbf{u}|^2 + |\mathbf{v}|^2 - 2|\mathbf{u}||\mathbf{v}|\cos(\theta) \end{equation*}

Now we will rewrite this using the components,

\begin{equation*} (|\langle u_1 , u_2 \rangle - \langle v_1, v_2 \rangle |)^2 = |\langle u_1, u_2 \rangle|^2 + |\langle v_1, v_2 \rangle|^2 - 2|\mathbf{u}||\mathbf{v}|\cos(\theta) \end{equation*}
\begin{equation*} (|\langle u_1 - v_1, u_2 - v_2 \rangle |)^2 = u_1^2 + u_2^2 + v_1^2 + v_2^2 - 2|\mathbf{u}||\mathbf{v}|\cos(\theta) \end{equation*}
\begin{equation*} (u_1 - v_1)^2 + (u_2 - v_2)^2 = u_1^2 + u_2^2 + v_1^2 + v_2^2 - 2|\mathbf{u}||\mathbf{v}|\cos(\theta) \end{equation*}
\begin{equation*} u_1^2 -2u_1v_1 + v_1^2 + u_2^2 -2u_2v_2 + v_2^2 = u_1^2 + u_2^2 + v_1^2 + v_2^2 - 2|\mathbf{u}||\mathbf{v}|\cos(\theta) \end{equation*}
\begin{equation*} u_1v_1 + u_2v_2 = |\mathbf{u}||\mathbf{v}|\cos(\theta) \end{equation*}
\begin{equation*} \mathbf{u} \cdot \mathbf{v} = |\mathbf{u}||\mathbf{v}|\cos(\theta) \end{equation*}

If we rearrange this last line we get,

\begin{equation*} \frac{\mathbf{u} \cdot \mathbf{v}}{|\mathbf{u}||\mathbf{v}|} = \cos(\theta) \end{equation*}

Let's try a few of these. The steps for the following will be,

  1. Find the dot product of the vectors.
  2. Find the length of the two vectors.
  3. Divide the dot product from (1) by the product of the two lengths.
  4. To find \(\theta \) apply inverse cosine to the result from (3).

Use the above steps to find the angle between the given vectors in the next few problems.

Subsubsection 3.2.2 Orthogonal Vectors

Definition 3.16.

Two vectors, \(\mathbf{u} \) and \(\mathbf{v} \) are orthogonal if and only if \(\mathbf{u} \cdot \mathbf{v} = 0 \text{.}\)

From above we can see that the dot product between two vectors will be zero when the angle between them is \(90^{\circ} \text{,}\) so when two vectors are orthogonal, we are saying that they are perpendicular.

Let \(\mathbf{u} = \langle 2 , 3 \rangle \) and \(\mathbf{v} = \langle -3 , 2 \rangle \text{.}\) Are \(\mathbf{u} \) and \(\mathbf{v} \) orthogonal?

We can use the above definition and the dot product to check and if the give vectors are orthogonal.

\begin{equation*} \mathbf{u} \cdot \mathbf{v} = \langle 2 , 3 \rangle \cdot \langle -3 , 2 \rangle = (2)(-3) + (3)(2) = -6 + 6 = 0 \end{equation*}

Since the dot product of the two vectors was \(0 \) we know that the vectors are orthogonal.

At this point we have defined the dot product, taken a look at a few properties, used the operation to find the angle between vectors, and established a helpful tool to determine if vectors are perpendicular. While there are more topic to explore concerning the dot product, let's leave it for now and start taking a look at the cross product.