Learning Objectives
- Calculate the dot product of two given vectors.
- Determine whether two given vectors are perpendicular.
- Find the direction cosines of a given vector.
The Dot Product and Its Properties
We have already learned how to add and subtract vectors. In this chapter, we investigate two types of vector multiplication. The first type of vector multiplication is called the dot product, based on the notation we use for it, and it is defined as follows:
definition
The dot product of vectors [latex]\mathbf{u} = \langle u_1, u_2, u_3 \rangle[/latex] and [latex]\mathbf{v} =\langle v_1, v_2, v_3 \rangle[/latex] is given by the sum of the products of the components
Note that if [latex]\mathbf u[/latex] and [latex]\mathbf v[/latex] are two-dimensional vectors, we calculate the dot product in a similar fashion. Thus, if [latex]\mathbf{u} = \langle u_1, u_2\rangle[/latex] and [latex]\mathbf{v} =\langle v_1, v_2 \rangle[/latex], then
When two vectors are combined under addition or subtraction, the result is a vector. When two vectors are combined using the dot product, the result is a scalar. For this reason, the dot product is often called the scalar product. It may also be called the inner product.
Example: calculating dot products
- Find the dot product of [latex]\mathbf{u} = \langle 3,5,2 \rangle[/latex] and [latex]\mathbf{v} =\langle -1,3,0 \rangle[/latex].
- Find the scalar product of [latex]\mathbf{p} = 10\mathbf{i} - 4\mathbf{j} +7 \mathbf{k}[/latex] and [latex]\mathbf{q} = -2\mathbf{i} + \mathbf{j} + 6\mathbf{k}[/latex].
try it
Find [latex]\mathbf{u \cdot v}[/latex], where [latex]\mathbf{u} = \langle 2,9,-1 \rangle[/latex] and [latex]\mathbf{v} =\langle -3,1,-4 \rangle[/latex].
Watch the following video to see the worked solution to the above Try IT.
Try It
Like vector addition and subtraction, the dot product has several algebraic properties. We prove three of these properties and leave the rest as exercises.
theorem: properties of the dot product
Let [latex]\textbf u[/latex], [latex]\textbf v[/latex], and [latex]\textbf w[/latex] be vectors, and let [latex]c[/latex] be a scalar.
\[ \begin{array}{lrl}
\mbox{i.} & \mathbf{u \cdot v} &= \mathbf{v \cdot u} & \mbox{Commutative property} \\
\mbox{ii.} & \mathbf{u} \cdot (\mathbf{v} + \textbf{w}) &= \mathbf{u \cdot v} + \mathbf{u \cdot w} & \mbox{Distributive property} \\
\mbox{iii.} & c(\mathbf{u \cdot v}) &= (c\mathbf{u}) \cdot \mathbf{v} = \mathbf{u} \cdot (c\mathbf{v}) & \mbox{Associative property} \\
\mbox{iv.} & \mathbf{v} \cdot \mathbf{v} &= ||\mathbf{v}||^2 & \mbox{Property of magnitude} \\
\end{array}\]
Proof
Let [latex]\mathbf{u} = \langle u_1, u_2, u_3 \rangle[/latex] and [latex]\mathbf{v} =\langle v_1, v_2, v_3 \rangle[/latex]. Then
The associative property looks like the associative property for real-number multiplication, but pay close attention to the difference between scalar and vector objects:
The proof that [latex]c (\mathbf{u \cdot v}) = \mathbf{u}\cdot (c\mathbf{v})[/latex] is similar.
The fourth property shows the relationship between the magnitude of a vector and its dot product with itself:
[latex]_\blacksquare[/latex]
Note that the definition of the dot product yields [latex]\mathbf{0} \cdot \mathbf{v} = \mathbf{0}[/latex]. By property iv., if [latex]\mathbf{v} \cdot \mathbf{v} = 0[/latex], then [latex]\mathbf{v} = \mathbf{0}[/latex].
Example: using properties of the dot product
Let [latex]\mathbf{a} = \langle 1,2,-3 \rangle[/latex], [latex]\mathbf{b} = \langle 0,2,4 \rangle[/latex], and [latex]\mathbf{c} = \langle 5,-1,3 \rangle[/latex]. Find each of the following products.
- [latex](\mathbf{a} \cdot \mathbf{b})\mathbf{c}[/latex]
- [latex]\mathbf{a}\cdot (2\mathbf{c} )[/latex]
- [latex]||\mathbf{b}||^2[/latex]
try it
Find the following products for [latex]\mathbf{p} = \langle 7,0,2 \rangle[/latex], [latex]\mathbf{q} = \langle -2,2,-2 \rangle[/latex], and [latex]\mathbf{r} = \langle 0,2,-3 \rangle[/latex].
- [latex](\mathbf{r} \cdot \mathbf{p})\mathbf{q}[/latex]
- [latex]||\mathbf{p}||^2[/latex]
Using the Dot Product to Find the Angle between Two Vectors
When two nonzero vectors are placed in standard position, whether in two dimensions or three dimensions, they form an angle between them (Figure 1). The dot product provides a way to find the measure of this angle. This property is a result of the fact that we can express the dot product in terms of the cosine of the angle formed by two vectors.
theorem: evaluating a dot product
The dot product of two vectors is the product of the magnitude of each vector and the cosine of the angle between them:
Proof
Place vectors [latex]\mathbf{u}[/latex] and [latex]\mathbf{v}[/latex] in standard position and consider the vector [latex]\mathbf{v} - \mathbf{u}[/latex] (Figure 2). These three vectors form a triangle with side lengths [latex]||\mathbf{u}||[/latex], [latex]||\mathbf{v}||[/latex], and [latex]||\mathbf{v} - \mathbf{u}||[/latex].
cosines describes the relationship among the side lengths of the triangle and the angle [latex]\theta[/latex]. Applying the law of cosines here gives
The dot product provides a way to rewrite the left side of this equation:
Substituting into the law of cosines yields
[latex]_\blacksquare[/latex]
We can use this form of the dot product to find the measure of the angle between two nonzero vectors. The following equation rearranges the Dot Product to solve for the cosine of the angle:
Using this equation, we can find the cosine of the angle between two nonzero vectors. Since we are considering the smallest angle between the vectors, we assume [latex]0^\circ \leq \theta \leq 180^\circ[/latex] (or [latex]0 \leq \theta \leq \pi[/latex] if we are working in radians). The inverse cosine is unique over this range, so we are then able to determine the measure of the angle [latex]\theta[/latex].
Example: finding the angle between two vectors
Find the measure of the angle between each pair of vectors.
- [latex]\mathbf{i} + \mathbf{j} + \mathbf{k}[/latex] and [latex]2\mathbf{i} - \mathbf{j} - 3\mathbf{k}[/latex]
- [latex]\langle 2,5,6 \rangle[/latex] and [latex]\langle -2,-4,4 \rangle[/latex]
try it
Find the measure of the angle, in radians, formed by vectors [latex]\mathbf{a} = \langle 1,2,0 \rangle[/latex] and [latex]\mathbf{b} = \langle 2,4,1 \rangle[/latex]. Round to the nearest hundredth.
The angle between two vectors can be acute [latex](0 < \cos{\theta} < 1)[/latex], obtuse [latex](-1 < \cos{\theta} < 0)[/latex], or straight [latex](\cos{\theta} = -1)[/latex]. If [latex]\cos{\theta} = 1[/latex], then both vectors have the same direction. If [latex]\cos{\theta} = 0[/latex], then the vectors, when placed in standard position, form a right angle (Figure 3). We can formalize this result into a theorem regarding orthogonal (perpendicular) vectors.
theorem: orthogonal vectors
The nonzero vectors [latex]\mathbf{u}[/latex] and [latex]\mathbf{v}[/latex] are orthogonal vectors if and only if [latex]\mathbf{u} \cdot \mathbf{v} = 0[/latex].
Proof
Let [latex]\mathbf{u}[/latex] and [latex]\mathbf{v}[/latex] be nonzero vectors, and let [latex]\theta[/latex] denote the angle between them. First, assume [latex]\mathbf{u} \cdot \mathbf{v} = 0[/latex]. Then
However, [latex]||\mathbf{u}|| \neq 0[/latex] and [latex]||\mathbf{v}|| \neq 0[/latex], so we must have [latex]\cos{\theta} = 0[/latex]. Hence, [latex]\theta = 90^\circ[/latex], and the vectors are orthogonal.
Now assume [latex]\mathbf{u}[/latex] and [latex]\mathbf{v}[/latex] are orthogonal. Then [latex]\theta = 90^\circ[/latex] and we have
[latex]_\blacksquare[/latex]
The terms orthogonal, perpendicular, and normal each indicate that mathematical objects are intersecting at right angles. The use of each term is determined mainly by its context. We say that vectors are orthogonal and lines are perpendicular. The term normal is used most often when measuring the angle made with a plane or other surface.
Example: identifying orthagonal vectors
Determine whether [latex]\mathbf{p} = \langle 1,0,5 \rangle[/latex] and [latex]\mathbf{q} = \langle 10,3,-2 \rangle[/latex] are orthogonal vectors.
try it
For which value of [latex]x[/latex] is [latex]\mathbf{p} = \langle 2,8,-1 \rangle[/latex] orthogonal to [latex]\mathbf{q} = \langle x,-1,2 \rangle[/latex]?
Example: measuring the angle formed by two vectors
Let [latex]\mathbf{v} = \langle 2,3,3 \rangle[/latex]. Find the measures of the angles formed by the following vectors.
- [latex]\mathbf{v}[/latex] and [latex]\mathbf{i}[/latex]
- [latex]\mathbf{v}[/latex] and [latex]\mathbf{j}[/latex]
- [latex]\mathbf{v}[/latex] and [latex]\mathbf{k}[/latex]
try it
Let [latex]\mathbf{v} = \langle 3,-5,1 \rangle[/latex]. Find the measure of the angles formed by each pair of vectors.
- [latex]\mathbf{v}[/latex] and [latex]\mathbf{i}[/latex]
- [latex]\mathbf{v}[/latex] and [latex]\mathbf{j}[/latex]
- [latex]\mathbf{v}[/latex] and [latex]\mathbf{k}[/latex]
The angle a vector makes with each of the coordinate axes, called a direction angle, is very important in practical computations, especially in a field such as engineering. For example, in astronautical engineering, the angle at which a rocket is launched must be determined very precisely. A very small error in the angle can lead to the rocket going hundreds of miles off course. Direction angles are often calculated by using the dot product and the cosines of the angles, called the direction cosines. Therefore, we define both these angles and their cosines.
DEFINITION
The angles formed by a nonzero vector and the coordinate axes are called the direction angles for the vector (Figure 5). The cosines for these angles are called the direction cosines.
In Example: Measuring the Angle Formed by Two Vectors, the direction cosines of [latex]\mathbf{v} = \langle 2,3,3 \rangle[/latex] are [latex]\cos{\alpha} = \frac{2}{\sqrt{22}}[/latex], [latex]\cos{\beta} = \frac{3}{\sqrt{22}}[/latex], and [latex]\cos{\gamma} = \frac{3}{\sqrt{22}}[/latex]. The direction angles of [latex]\mathbf{v}[/latex] are [latex]\alpha = 1.130[/latex] rad, [latex]\beta = 0.877[/latex] rad, and [latex]\gamma = 0.877[/latex] rad.
So far, we have focused mainly on vectors related to force, movement, and position in three-dimensional physical space. However, vectors are often used in more abstract ways. For example, suppose a fruit vendor sells apples, bananas, and oranges. On a given day, he sells 30 apples, 12 bananas, and 18 oranges. He might use a quantity vector, [latex]\mathbf{q} = \langle 30,12,18 \rangle[/latex], to represent the quantity of fruit he sold that day. Similarly, he might want to use a price vector, [latex]\mathbf{p} = \langle 0.50,0.25,1 \rangle[/latex], to indicate that he sells his apples for 50¢ each, bananas for 25¢ each, and oranges for $1 apiece. In this example, although we could still graph these vectors, we do not interpret them as literal representations of position in the physical world. We are simply using vectors to keep track of particular pieces of information about apples, bananas, and oranges.
This idea might seem a little strange, but if we simply regard vectors as a way to order and store data, we find they can be quite a powerful tool. Going back to the fruit vendor, let’s think about the dot product, [latex]\mathbf{q} \cdot \mathbf{p}[/latex]. We compute it by multiplying the number of apples sold (30) by the price per apple (50¢), the number of bananas sold by the price per banana, and the number of oranges sold by the price per orange. We then add all these values together. So, in this example, the dot product tells us how much money the fruit vendor had in sales on that particular day.
When we use vectors in this more general way, there is no reason to limit the number of components to three. What if the fruit vendor decides to start selling grapefruit? In that case, he would want to use four-dimensional quantity and price vectors to represent the number of apples, bananas, oranges, and grapefruit sold, and their unit prices. As you might expect, to calculate the dot product of four-dimensional vectors, we simply add the products of the components as before, but the sum has four terms instead of three.
Example: using vectors in an economic context
AAA Party Supply Store sells invitations, party favors, decorations, and food service items such as paper plates and napkins. When AAA buys its inventory, it pays 25¢ per package for invitations and party favors. Decorations cost AAA 50¢ each, and food service items cost 20¢ per package. AAA sells invitations for $2.50 per package and party favors for $1.50 per package. Decorations sell for $4.50 each and food service items for $1.25 per package.
During the month of May, AAA Party Supply Store sells 1258 invitations, 342 party favors, 2426 decorations, and 1354 food service items. Use vectors and dot products to calculate how much money AAA made in sales during the month of May. How much did the store make in profit?
try it
On June 1, AAA Party Supply Store decided to increase the price they charge for party favors to $2 per package. They also changed suppliers for their invitations, and are now able to purchase invitations for only 10¢ per package. All their other costs and prices remain the same. If AAA sells 1408 invitations, 147 party favors, 2112 decorations, and 1894 food service items in the month of June, use vectors and dot products to calculate their total sales and profit for June.
Watch the following video to see the worked solution to the above Try IT.
Candela Citations
- CP 2.21. Authored by: Ryan Melton. License: CC BY: Attribution
- CP 2.26. Authored by: Ryan Melton. License: CC BY: Attribution
- Calculus Volume 3. Authored by: Gilbert Strang, Edwin (Jed) Herman. Provided by: OpenStax. Located at: https://openstax.org/books/calculus-volume-3/pages/1-introduction. License: CC BY-NC-SA: Attribution-NonCommercial-ShareAlike. License Terms: Access for free at https://openstax.org/books/calculus-volume-3/pages/1-introduction