**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 =_{h}u1, 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=_{h}3,4_{i}, findu_{·}u. How is this related to|u_{|}?

(d) On the axes in Figure9.34, plot the vectorsu = _{h}1,3_{i}andv = _{h−}3,1_{i}. 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=_{h}3,2_{i}.
• v=_{h}3,0_{i}.
• v=_{h}3,_{−}1_{i}.
• 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=_{h}u1, u2, . . . , uniandv=hv1, v2, . . . , vni, we define their

dot product6_{as}

u_{·}v=u1v1+u2v2+. . .+unvn.

For instance, we find that

h3,0,1_{i · h−}2,1,4_{i}= 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,_{−}3_{i · h}4,_{−}2,0_{i}.
(b) h0,3,_{−}2,1_{i · h}5,_{−}6,0,4_{i}

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=_{h}u1, 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π.

6_{As 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=_{h}1,2,_{−}3_{i}using the dot product.

(b) The angle between the vectors u = _{h}1,2_{i} and v = _{h}4,_{−}1_{i} to the nearest tenth of a
degree.

9.3. THE DOT PRODUCT 35
(c) The angle between the vectorsy=_{h}1,2,_{−}3_{i}andz=_{h−}2,1,1_{i}to 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_{⊥v}u

Figure 9.42: proj_{v}uwhenθ > π_{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=proj_{v}u+proj_{⊥}_{v}u, (9.4)

where proj_{v}uis parallel tovand proj_{⊥}_{v}uis orthogonal tov. We call the vector proj_{v}utheprojection

ofuontov.

To find the vector proj_{v}u, we will dot both sides of Equation (9.4) with the vectorv, to find that

u_{·}v = (proj_{v}u+proj_{⊥}_{v}u)_{·}v

= (proj_{v}u)_{·}v+ (proj_{⊥}_{v}u)_{·}v

= (proj_{v}u)·v.

Notice that (proj_{⊥}_{v}u) _{·}v = 0 since proj_{⊥}_{v}u is orthogonal to v. Also, proj_{v}u must be a scalar
multiple ofvsince it is parallel tov, so we will write proj_{v}u=sv. It follows that

u_{·}v= (proj_{v}u)_{·}v=sv_{·}v,
which means that

s= u·v
v·v
and hence
proj_{v}u= u·v
v_{·}vv=
u·v
|v_{|}2 v

It is sometimes useful to write proj_{v}uas a scalar times a unit vector in the direction ofv. We
call this scalar thecomponent ofualongvand denote it as comp_{v}u. We therefore have

proj_{v}u= u·v
|v_{|}2 v=
u_{·}v
|v_{|}
v
|v_{|} =compvu
v
|v_{|},

so that

comp_{v}u= u·v

|v| .

Letuandvbe vectors inRn. The component ofuin the direction ofvis the scalar

comp_{v}u= u·v

|v| ,

and the projection ofuontovis the vector

proj_{v}u= u·v
v_{·}vv.
Moreover, since
u=proj_{v}u+proj_{⊥}_{v}u,
it follows that
proj_{⊥}_{v}u=u−proj_{v}u.

This shows that once we have computed proj_{v}u, we can find proj_{⊥}_{v}u simply by calculating the
difference of two known vectors.

**Activity 9.15.**

Let u = h2,6i and v = h4,−8i. Find comp_{v}u, proj_{v}u and proj_{⊥}_{v}u, 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
proj_{v}u= u·v

9.3. THE DOT PRODUCT 39

**Exercises**

**1.** Letv=_{h−}2,5_{i}inR2, and lety=h0,3,−2iinR3.
(a) Ish2,_{−}1_{i}perpendicular 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,_{−}2_{i}perpendicular 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 proj_{b}a, and proj_{⊥}_{b}a.

ii. Explain why proj_{⊥}_{b}acan 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) θ