9.3
The Dot Product
Motivating Questions
In this section, we strive to understand the ideas generated by the following important questions: • How is the dot product of two vectors defined and what geometric information does it tell
us?
• How can we tell if two vectors inRnare perpendicular?
• How do we find the projection of one vector onto another?
Introduction
In the last section, we considered vector addition and scalar multiplication and found that each operation had a natural geometric interpretation. In this section, we will introduce a means of multiplying vectors.
Preview Activity 9.3. For two-dimensional vectorsu =hu1, u2iandv=hv1, v2i, the dot product
is simply the scalar obtained by
u·v=u1v1+u2v2.
(a) Ifu=h3,4iandv=h−2,1i, find the dot productu·v. (b) Findi·iandi·j.
(c) Ifu=h3,4i, findu·u. How is this related to|u|?
(d) On the axes in Figure9.34, plot the vectorsu = h1,3iandv = h−3,1i. Then, find u·v. What is the angle between these vectors?
-4 -2 2 4 -4 -2 2 4 x y
-4 -2 2 4 -4 -2 2 4 x y
Figure 9.35: For part (e)
(e) On the axes in Figure9.35, plot the vectoru=h1,3i.
For each of the following vectorsv, plot the vector on Figure 9.35and then compute the dot productu·v. • v=h3,2i. • v=h3,0i. • v=h3,−1i. • v=h3,−2i. • v=h3,−4i.
(f) Based upon the previous part of this activity, what do you think is the sign of the dot product in the following three cases shown in Figure9.36?
v u v u v u
Figure 9.36: For part (f)
9.3. THE DOT PRODUCT 33
The Dot Product
If we have twon-dimensional vectorsu=hu1, u2, . . . , uniandv=hv1, v2, . . . , vni, we define their
dot product6as
u·v=u1v1+u2v2+. . .+unvn.
For instance, we find that
h3,0,1i · h−2,1,4i= 3·(−2) + 0·1 + 1·4 =−6 + 0 + 4 =−2.
Notice that the resulting quantity is a scalar. Our work in Preview Activity 9.3 examined dot products of two-dimensional vectors.
Activity 9.12.
Determine each of the following. (a) h1,2,−3i · h4,−2,0i. (b) h0,3,−2,1i · h5,−6,0,4i
C The dot product is a natural way to define a product of two vectors. In addition, it behaves in ways that are similar to the product of, say, real numbers.
Letu,v, andwbe vectors inRn. Then
(a) u·v=v·u(the dot product iscommutative), and
(b) ifcis a scalar, then(cu+v)·w=c(u·w) +v·w(the dot product isbilinear),
Moreover, the dot product gives us valuable geometric information about the vectors and their relative orientation. For instance, let’s consider what happens when we dot a vector with itself:
u·u=hu1, u2, . . . , uni · hu1, u2, . . . , uni=u21+u22+. . .+u2n=|u|2.
In other words, the dot product of a vector with itself gives the square of the length of the vector:
u·u=|u|2.
The angle between vectors
The dot product can help us understand the angle between two vectors. For instance, if we are given two vectorsu andv, there are two angles that these vectors create, as depicted in Figure
9.37. We will call θ, the smaller of these angles, theangle between these vectors. Notice thatθ lies between 0 andπ.
6As we will see shortly, the dot product arises in physics to calculate the work done by a vector force in a given direc-
tion. It might be more natural to define the dot product in this context, but it is more convenient from a mathematical perspective to define the dot product algebraically and then view work as an application of this definition.
u v
θ
2π−θ
Figure 9.37: The angle between vectorsu
andv.
v u
θ
u−v
Figure 9.38: The triangle formed byu,v, and
u−v.
To determine this angle, we may apply the Law of Cosines to the triangle shown in Figure9.38. Using the fact that the dot product of a vector with itself gives us the square of its length, together with the bilinearity of the dot product, we find:
|u−v|2 = |u|2+|v|2−2|u||v|cos(θ) (u−v)·(u−v) = u·u+v·v−2|u||v|cos(θ) u·(u−v)−v·(u−v) = u·u+v·v−2|u||v|cos(θ) u·u−2u·v+v·v = u·u+v·v−2|u||v|cos(θ) −2u·v = −2|u||v|cos(θ) u·v = |u||v|cos(θ). To summarize, we have the important relationship
u·v=u1v1+u2v2+. . .+unvn=|u||v|cos(θ). (9.3)
It is sometimes useful to think of Equation (9.3) as giving us an expression for the angle be- tween two vectors:
θ= cos−1 u·v |u||v| .
The real beauty of this expression is this: the dot product is a very simple algebraic operation to perform yet it provides us with important geometric information – namely the angle between the vectors – that would be difficult to determine otherwise.
Activity 9.13.
Determine each of the following.
(a) The length of the vectoru=h1,2,−3iusing the dot product.
(b) The angle between the vectors u = h1,2i and v = h4,−1i to the nearest tenth of a degree.
9.3. THE DOT PRODUCT 35 (c) The angle between the vectorsy=h1,2,−3iandz=h−2,1,1ito the nearest tenth of a
degree.
(d) If the angle between the vectors u and v is a right angle, what does the expression
u·v=|u||v|cosθsay about their dot product?
(e) If the angle between the vectorsuandvis acute—that is, less thanπ/2—what does the expressionu·v=|u||v|cosθsay about their dot product?
(f) If the angle between the vectorsuandvis obtuse—that is, greater thanπ/2—what does the expressionu·v=|u||v|cosθsay about their dot product?
C
The Dot Product and Orthogonality
When the angle between two vectors is a right angle, it is frequently the case that something important is happening. In this case, we say the vectors areorthogonal. For instance, orthogonality often plays a role in optimization problems; to determine the shortest path from a point inR3to a given plane, we move along a line orthogonal to the plane.
As Activity9.13indicates, the dot product provides a simple means to determine whether two vectors are orthogonal to one another. In this case, u·v = |u||v|cos(π/2) = 0, so we make the following important observation.
Two vectorsuandvinRnare orthogonal to each other ifu·v= 0.
More generally, the sign of the dot product gives us useful information about the relative ori- entation of the vectors. If we remember that
cos(θ)>0 ifθis an acute angle,
cos(θ) = 0 ifθis a right angle,
andcos(θ)<0 ifθis an obtuse angle, we see that
u·v>0 ifθis an acute angle,
u·v= 0 ifθis a right angle, andu·v<0 ifθis an obtuse angle. This is illustrated in Figure9.39.
v u u·v>0 v u u·v= 0 v u u·v<0
Figure 9.39: The orientation of vectors
Work, Force, and Displacement
In physics, work is a measure of the energy required to apply a force to an object through a dis- placement. For instance, Figure9.40shows a forceFdisplacing an object from pointAto pointB. The displacement is then represented by the vector−−→AB.
|F|cosθ
A θ B
F
Figure 9.40: A forceFdisplacing an object.
It turns out that the work required to displace the object is W =F·−−→AB=|F||−−→AB|cos(θ).
This means that the work is determined only by the magnitude of the force applied parallel to the displacement. Consequently, if we are given two vectorsu andv, we would like to writeu as a sum of two vectors, one of which is parallel tovand one of which is orthogonal tov. We take up this task after the next activity.
Activity 9.14.
Determine the work done by a 25 pound force acting at a 30◦ angle to the direction of the object’s motion, if the object is pulled 10 feet. In addition, is more work or less work done if the angle to the direction of the object’s motion is60◦?
9.3. THE DOT PRODUCT 37 Projections v u θ projvu proj⊥vu
Figure 9.41: The projection ofuontov.
v u
θ
projvu
proj⊥vu
Figure 9.42: projvuwhenθ > π2.
Suppose we are given two vectorsuandvas shown in Figure9.41. Motivated by our discus- sion of work, we would like to writeuas a sum of two vectors, one of which is parallel tovand one of which is orthogonal. That is, we would like to write
u=projvu+proj⊥vu, (9.4)
where projvuis parallel tovand proj⊥vuis orthogonal tov. We call the vector projvutheprojection
ofuontov.
To find the vector projvu, we will dot both sides of Equation (9.4) with the vectorv, to find that
u·v = (projvu+proj⊥vu)·v
= (projvu)·v+ (proj⊥vu)·v
= (projvu)·v.
Notice that (proj⊥vu) ·v = 0 since proj⊥vu is orthogonal to v. Also, projvu must be a scalar multiple ofvsince it is parallel tov, so we will write projvu=sv. It follows that
u·v= (projvu)·v=sv·v, which means that
s= u·v v·v and hence projvu= u·v v·vv= u·v |v|2 v
It is sometimes useful to write projvuas a scalar times a unit vector in the direction ofv. We call this scalar thecomponent ofualongvand denote it as compvu. We therefore have
projvu= u·v |v|2 v= u·v |v| v |v| =compvu v |v|,
so that
compvu= u·v
|v| .
Letuandvbe vectors inRn. The component ofuin the direction ofvis the scalar
compvu= u·v
|v| ,
and the projection ofuontovis the vector
projvu= u·v v·vv. Moreover, since u=projvu+proj⊥vu, it follows that proj⊥vu=u−projvu.
This shows that once we have computed projvu, we can find proj⊥vu simply by calculating the difference of two known vectors.
Activity 9.15.
Let u = h2,6i and v = h4,−8i. Find compvu, projvu and proj⊥vu, and draw a picture to illustrate. Finally, expressuas the sum of two vectors where one is parallel tovand the other is perpendicular tov.
C
Summary
• The dot product of two vectors inRn,u=hu1, u2, . . . , uniandv=hv1, v2, . . . , vni, is the scalar
u·v=u1v1+u2v2+· · ·+unvn. • The dot product is related to the length of a vector sinceu·u=|u|2.
• The dot product provides us with information about the angle between the vectors since
u·v=|u| |v|cos(θ), whereθis the angle betweenuandv.
• Two vectors are orthogonal if the angle between them isπ/2. In terms of the dot product, the vectorsuandvare orthogonal if and only ifu·v= 0.
• The projection of a vectoruinRnonto a vectorvinRnis the vector projvu= u·v
9.3. THE DOT PRODUCT 39
Exercises
1. Letv=h−2,5iinR2, and lety=h0,3,−2iinR3. (a) Ish2,−1iperpendicular tov? Why or why not?
(b) Find a unit vectoru inR2 such thatu is perpendicular tov. How many such vectors are there?
(c) Ish2,−1,−2iperpendicular toy? Why or why not?
(d) Find a unit vectorwinR3 such thatwis perpendicular toy. How many such vectors are there?
(e) Letz=h2,1,0i. Find a unit vectorrinR3 such thatris perpendicular to bothyandz. How many such vectors are there?
2. Consider the triangle inR3given byP(3,2,−1),Q(1,−2,4), andR(4,4,0).
(a) Find the measure of each of the three angles in the triangle, accurate to0.01degrees. (b) Choose two sides of the triangle, and call the vectors that form the sides (emanating
from a common point)aandb. i. Compute projba, and proj⊥ba.
ii. Explain why proj⊥bacan be considered a height of triangleP QR. iii. Find the area of the given triangle.
3. Letuandvbe vectors inR5withu·v=−1,|u|= 2,|v|= 3, andθthe angle betweenuandv. Use the properties of the dot product to find each of the following.
(a) u·2v (b) (u+v)·v (c) (2u+ 4v)·(u−7v) (d) v·v (e) |u||v|cos(θ) (f) θ