11 Vectors

11.3 The Dot Product

The previous section introduced vectors and described how to add them together and how to multiply them by scalars. This section introduces a multiplication on vectors called the dot product.

Definition 11.3.1      Dot Product


  1. 1.

    Let u=u1,u2 and v=v1,v2 in 2. The dot product of u and v, denoted uv, is

    uv=u1v1+u2v2.
  2. 2.

    Let u=u1,u2,u3 and v=v1,v2,v3 in 3. The dot product of u and v, denoted uv, is

    uv=u1v1+u2v2+u3v3.

Note how this product of vectors returns a scalar, not another vector.

We practice evaluating a dot product in the following example, then we will discuss why this product is useful.

Example 11.3.1 Evaluating dot products


  1. 1.

    Let u=1,2, v=3,-1 in 2. Find uv.

  2. 2.

    Let x=2,-2,5 and y=-1,0,3 in 3. Find xy.

Solution

  1. 1.

    Using Definition 11.3.1, we have

    uv=1(3)+2(-1)=1.
  2. 2.

    Using the definition, we have

    xy=2(-1)-2(0)+5(3)=13.

The dot product, as shown by the preceding example, is very simple to evaluate. It is only the sum of products. While the definition gives no hint as to why we would care about this operation, there is an amazing connection between the dot product and angles formed by the vectors. Before stating this connection, we give a theorem stating some of the properties of the dot product.

Theorem 11.3.1      Properties of the Dot Product

Let u, v and w be vectors in 2 or 3 and let c be a scalar.

  1. 1.

    uv=vu

    Commutative Property

  2. 2.

    u(v+w)=uv+uw

    Distributive Property

  3. 3.

    c(uv)=(cu)v=u(cv)

  4. 4.

    0v=0

  5. 5.

    vv=v2

The last statement of the theorem makes a handy connection between the magnitude of a vector and the dot product with itself. Our definition and theorem give properties of the dot product, but we are still likely wondering “What does the dot product mean?” It is helpful to understand that the dot product of a vector with itself is connected to its magnitude.

The next theorem extends this understanding by connecting the dot product to magnitudes and angles. Given vectors u and v in the plane, an angle θ is clearly formed when u and v are drawn with the same initial point as illustrated in Figure 11.3.1(a). (We always take θ to be the angle in [0,π] as two angles are actually created.)

margin:

u

v

θ
(a) (b)
Figure 11.3.1: Illustrating the angle formed by two vectors with the same initial point.

The same is also true of 2 vectors in space: given u and v in 3 with the same initial point, there is a plane that contains both u and v. (When u and v are co-linear, there are infinite planes that contain both vectors.) In that plane, we can again find an angle θ between them (and again, 0θπ). This is illustrated in Figure 11.3.1(b).

The following theorem connects this angle θ to the dot product of u and v.

Theorem 11.3.2      The Dot Product and Angles

Let u and v be vectors in 2 or 3. Then

uv=uvcosθ,

where θ, 0θπ, is the angle between u and v.

When θ is an acute angle (i.e., 0θ<π/2), cosθ is positive; when θ=π/2, cosθ=0; when θ is an obtuse angle (π/2<θπ), cosθ is negative. Thus the sign of the dot product gives a general indication of the angle between the vectors, illustrated in Figure 11.3.2.

uv>0

u

v

θ

uv=0

u

v

θ=π/2

uv<0

u

v

θ
Figure 11.3.2: Illustrating the relationship between the angle between vectors and the sign of their dot product.

We can use Theorem 11.3.2 to compute the dot product, but generally this theorem is used to find the angle between known vectors (since the dot product is generally easy to compute). To this end, we rewrite the theorem’s equation as

cosθ=uvuvθ=cos-1(uvuv).

We practice using this theorem in the following example.

margin:

u

v

w

α

β

θ

-5

5

2

4

6

x

y
Figure 11.3.3: Vectors used in Example 11.3.2.
Example 11.3.2 Using the dot product to find angles

Let u=3,1, v=-2,6 and w=-4,3, as shown in Figure 11.3.3. Find the angles α, β and θ.

SolutionWe start by computing the magnitude of each vector.

u=10;v=210;w=5.

We now apply Theorem 11.3.2 to find the angles.

α =cos-1(uv(10)(210))
=cos-1(0)=π2=90.
β =cos-1(vw(210)(5))
=cos-1(261010)
0.605534.7.
θ =cos-1(uw(10)(5))
=cos-1(-9510)
2.1763124.7

We see from our computation that α+β=θ, as indicated by Figure 11.3.3. While we knew this should be the case, it is nice to see that this non-intuitive formula indeed returns the results we expected.

We do a similar example next in the context of vectors in space.

margin: Figure 11.3.4: Vectors used in Example 11.3.3.
Example 11.3.3 Using the dot product to find angles

Let u=1,1,1, v=-1,3,-2 and w=-5,1,4, as illustrated in Figure 11.3.4. Find the angle between each pair of vectors.

Solution

  1. 1.

    Between u and v:

    θ =cos-1(uvuv)
    =cos-1(0314)
    =π2.
  2. 2.

    Between u and w:

    θ =cos-1(uwuw)
    =cos-1(0342)
    =π2.
  3. 3.

    Between v and w:

    θ =cos-1(vwvw)
    =cos-1(01442)
    =π2.

While our work shows that each angle is π/2, i.e., 90, none of these angles looks to be a right angle in Figure 11.3.4. Such is the case when drawing three-dimensional objects on the page.

All three angles between these vectors was π/2, or 90. We know from geometry and everyday life that 90 angles are “nice” for a variety of reasons, so it should seem significant that these angles are all π/2. Notice the common feature in each calculation (and also the calculation of α in Example 11.3.2): the dot products of each pair of angles was 0. We use this as a basis for a definition of the term orthogonal, which is essentially synonymous to perpendicular.

Definition 11.3.2      Orthogonal

Vectors u and v are orthogonal if their dot product is 0.

margin: Note: The term perpendicular originally referred to lines. As mathematics progressed, the concept of “being at right angles to” was applied to other objects, such as vectors and planes, and the term orthogonal was introduced. It is especially used when discussing objects that are hard, or impossible, to visualize: two vectors in 5-dimensional space are orthogonal if their dot product is 0. It is not wrong to say they are perpendicular, but common convention gives preference to the word orthogonal.
Example 11.3.4 Finding orthogonal vectors

Let u=3,5 and v=1,2,3.

  1. 1.

    Find two vectors in 2 that are orthogonal to u.

  2. 2.

    Find two non-parallel vectors in 3 that are orthogonal to v.

Solution

  1. 1.

    Recall that a line perpendicular to a line with slope m has slope -1/m, the “opposite reciprocal slope.” We can think of the slope of u as 5/3, its “rise over run.” A vector orthogonal to u will have slope -3/5. There are many such choices, though all parallel:

    -5,3or5,-3or-10,6or15,-9,etc.
  2. 2.

    There are infinite directions in space orthogonal to any given direction, so there are an infinite number of non-parallel vectors orthogonal to v. Since there are so many, we have great leeway in finding some.

    One way is to arbitrarily pick values for the first two components, leaving the third unknown. For instance, let v1=2,7,z. If v1 is to be orthogonal to v, then v1v=0, so

    2+14+3z=0z=-163.

    So v1=2,7,-16/3 is orthogonal to v. We can apply a similar technique by leaving the first or second component unknown.

    Another method of finding a vector orthogonal to v mirrors what we did in part 1. Let v2=-2,1,0. Here we switched the first two components of v, changing the sign of one of them (similar to the “opposite reciprocal” concept before). Letting the third component be 0 effectively ignores the third component of v, and it is easy to see that

    v2v=-2,1,01,2,3=0.

    Clearly v1 and v2 are not parallel.

margin:

v

u

θ
(a)

v

u

w

z

θ
(b)
Figure 11.3.5: Developing the construction of the orthogonal projection.

An important construction is illustrated in Figure 11.3.5, where vectors u and v are sketched. In part (a), a dotted line is drawn from the tip of u to the line containing v, where the dotted line is orthogonal to v. In part (b), the dotted line is replaced with the vector z and w is formed, parallel to v. It is clear by the diagram that u=w+z. What is important about this construction is this: u is decomposed as the sum of two vectors, one of which is parallel to v and one that is perpendicular to v. It is hard to overstate the importance of this construction (as we’ll see in upcoming examples).

The vectors w, z and u as shown in Figure 11.3.5 (b) form a right triangle, where the angle between v and u is labeled θ. We can find w in terms of v and u.

Using trigonometry, we can state that

w=ucosθ. (11.3)

We also know that w is parallel to to v ; that is, the direction of w is the direction of v, described by the unit vector 1vv. The vector w is the vector in the direction 1vv with magnitude ucosθ:

w =(ucosθ)1vv.
Replace cosθ using Theorem 11.3.2:
=(uuvuv)1vv
=uvv2v.
Now apply Theorem 11.3.1.
=uvvvv.

Since this construction is so important, it is given a special name.

Definition 11.3.3      Orthogonal Projection

Let u and v be given, where v0. The orthogonal projection of u onto v, denoted projvu, is

projvu=uvvvv.
margin:

u

v

projvu

-2

-1

1

2

3

1

2

-1

-2

x

y
(a) (b)
Figure 11.3.6: Graphing the vectors used in Example 11.3.5.
Example 11.3.5 Computing the orthogonal projection


  1. 1.

    Let u=-2,1 and v=3,1. Find projvu, and sketch all three vectors with initial points at the origin.

  2. 2.

    Let w=2,1,3 and x=1,1,1. Find projxw, and sketch all three vectors with initial points at the origin.

Solution

  1. 1.

    Applying Definition 11.3.3, we have

    projvu =uvvvv
    =-5103,1
    =-32,-12.

    Vectors u, v and projvu are sketched in Figure 11.3.6(a). Note how the projection is parallel to v; that is, it lies on the same line through the origin as v, although it points in the opposite direction. That is because the angle between u and v is obtuse (i.e., greater than 90).

  2. 2.

    Apply the definition:

    projxw =wxxxx
    =631,1,1
    =2,2,2.

    These vectors are sketched in Figure 11.3.6(b).

Consider Figure 11.3.7 where the concept of the orthogonal projection is again illustrated. It is clear that

u=projvu+z. (11.4)

As we know what u and projvu are, we can solve for z and state that

z=u-projvu.
margin:

v

u

projvu

z
Figure 11.3.7: Illustrating the orthogonal projection.

This leads us to rewrite Equation (11.4) in a seemingly silly way:

u=projvu+(u-projvu).

This is not nonsense, as pointed out in the following Key Idea. (Notation note: the expression “y ” means “is parallel to y.” We can use this notation to state “xy ” which means “x is parallel to y.” The expression “y ” means “is orthogonal to y,” and is used similarly.)

Key Idea 11.3.1      Orthogonal Decomposition of Vectors

Let u and v be given. Then u can be written as the sum of two vectors, one of which is parallel to v, and one of which is orthogonal to v:

u=projvuv+(u-projvuv).

We illustrate the use of this equality in the following example.

Example 11.3.6 Orthogonal decomposition of vectors


  1. 1.

    Let u=-2,1 and v=3,1 as in Example 11.3.5. Decompose u as the sum of a vector parallel to v and a vector orthogonal to v.

  2. 2.

    Let w=2,1,3 and x=1,1,1 as in Example 11.3.5. Decompose w as the sum of a vector parallel to x and a vector orthogonal to x.

Solution

  1. 1.

    In Example 11.3.5, we found that projvu=-1.5,-0.5. Let

    z=u-projvu=-2,1--1.5,-0.5=-0.5,1.5.

    Is z orthogonal to v ? (I.e, is zv ?) We check for orthogonality with the dot product:

    zv=-0.5,1.53,1=0.

    Since the dot product is 0, we know zv. Thus:

    u =projvu+(u-projvu)
    -2,1 =-1.5,-0.5v+-0.5,1.5v.
  2. 2.

    We found in Example 11.3.5 that projxw=2,2,2. Applying the Key Idea 11.3.1, we have:

    z=w-projxw=2,1,3-2,2,2=0,-1,1.

    We check to see if zx:

    zx=0,-1,11,1,1=0.

    Since the dot product is 0, we know the two vectors are orthogonal. We now write w as the sum of two vectors, one parallel and one orthogonal to x:

    w =projxw+(w-projxw)
    2,1,3 =2,2,2x+0,-1,1x

We give an example of where this decomposition is useful.

Example 11.3.7 Orthogonally decomposing a force vector

Consider Figure 11.3.8(a), showing a box weighing 50 lb on a ramp that rises 5 ft over a span of 20 ft. Find the components of force, and their magnitudes, acting on the box (as sketched in part (b) of the figure):

  1. 1.

    in the direction of the ramp, and

  2. 2.

    orthogonal to the ramp.

margin:

5

20

r

g
(a)

5

20

r

g

z

projrg
(b)
Figure 11.3.8: Sketching the ramp and box in Example 11.3.7. Note: The vectors are not drawn to scale.

SolutionAs the ramp rises 5 ft over a horizontal distance of 20 ft, we can represent the direction of the ramp with the vector r=20,5. Gravity pulls down with a force of 50 lb, which we represent with g=0,-50.

  1. 1.

    To find the force of gravity in the direction of the ramp, we compute projrg:

    projrg =grrrr
    =-25042520,5
    =-20017,-5017.

    The magnitude of projrg is projrg=50/1712.13 lb. Though the box weighs 50 lb, a force of about 12 lb is enough to keep the box from sliding down the ramp.

  2. 2.

    To find the component z of gravity orthogonal to the ramp, we use Key Idea 11.3.1.

    z =g-projrg
    =20017,-80017.

    The magnitude of this force is z=200/17 lb. In physics and engineering, knowing this force is important when computing things like static frictional force. (For instance, we could easily compute if the static frictional force alone was enough to keep the box from sliding down the ramp.)

Application to Work

In physics, the application of a force F to move an object in a straight line a distance d produces work; the amount of work W is W=Fd, (where F is in the direction of travel). The orthogonal projection allows us to compute work when the force is not in the direction of travel.

Consider Figure 11.3.9, where a force F is being applied to an object moving in the direction of d. (The distance the object travels is the magnitude of d.) The work done is the amount of force in the direction of d, projdF, times d:

margin:

d

F

projdF
Figure 11.3.9: Finding work when the force and direction of travel are given as vectors.
projdFd =Fddddd
=|Fdd2|dd
=|Fd|d2d2
=|Fd|.

The expression Fd will be positive if the angle between F and d is acute; when the angle is obtuse (hence Fd is negative), the force is causing motion in the opposite direction of d, resulting in “negative work.” We want to capture this sign, so we drop the absolute value and find that W=Fd.

Definition 11.3.4      Work

Let F be a constant force that moves an object in a straight line from point P to point Q. Let d=PQ. The work W done by F along d is W=Fd.

margin:

15

3

F

30
Figure 11.3.10: Computing work when sliding a box up a ramp in Example 11.3.8.
Example 11.3.8 Computing work

A man slides a box along a ramp that rises 3 ft over a distance of 15 ft by applying 50 lb of force as shown in Figure 11.3.10. Compute the work done.

SolutionThe figure indicates that the force applied makes a 30 angle with the horizontal, so F=50cos30,sin30253,25. The ramp is represented by d=15,3. The work done is simply

Fd=253,2515,3=3753+75 ft-lb.

Note how we did not actually compute the distance the object traveled, nor the magnitude of the force in the direction of travel; this is all inherently computed by the dot product!

The dot product is a powerful way of evaluating computations that depend on angles without actually using angles. The next section explores another “product” on vectors, the cross product. Once again, angles play an important role, though in a much different way.

Exercises 11.3

 

Terms and Concepts

  1. 1.

    The dot product of two vectors is a             , not a vector.

  2. 2.

    How are the concepts of the dot product and vector magnitude related?

  3. 3.

    How can one quickly tell if the angle between two vectors is acute or obtuse?

  4. 4.

    Give a synonym for “orthogonal.”

Problems

In Exercises 5–10, find the dot product of the given vectors.

  1. 5.

    u=2,-4, v=3,7

  2. 6.

    u=5,3, v=6,1

  3. 7.

    u=1,-1,2, v=2,5,3

  4. 8.

    u=3,5,-1, v=4,-1,7

  5. 9.

    u=1,1, v=1,2,3

  6. 10.

    u=1,2,3, v=0,0,0

  7. 11.

    Create your own vectors u, v and w in 2 and show that u(v+w)=uv+uw.

  8. 12.

    Create your own vectors u and v in 3 and scalar c and show that c(uv)=u(cv).

In Exercises 13–16, find the measure of the angle between the two vectors in both radians and degrees.

  1. 13.

    u=1,1, v=1,2

  2. 14.

    u=-2,1, v=3,5

  3. 15.

    u=8,1,-4, v=2,2,0

  4. 16.

    u=1,7,2, v=4,-2,5

In Exercises 17–20, a vector v is given. Give two vectors that are orthogonal to v.

  1. 17.

    v=4,7

  2. 18.

    v=-3,5

  3. 19.

    v=1,1,1

  4. 20.

    v=1,-2,3

In Exercises 21–26, vectors u and v are given. Find projvu, the orthogonal projection of u onto v, and sketch all three vectors on the same axes.

  1. 21.

    u=1,2, v=-1,3

  2. 22.

    u=5,5, v=1,3

  3. 23.

    u=-3,2, v=1,1

  4. 24.

    u=-3,2, v=2,3

  5. 25.

    u=1,5,1, v=1,2,3

  6. 26.

    u=3,-1,2, v=2,2,1

In Exercises 27–32, vectors u and v are given. Write u as the sum of two vectors, one of which is parallel to v and one of which is perpendicular to v. Note: these are the same pairs of vectors as found in Exercises 2126.

  1. 27.

    u=1,2, v=-1,3

  2. 28.

    u=5,5, v=1,3

  3. 29.

    u=-3,2, v=1,1

  4. 30.

    u=-3,2, v=2,3

  5. 31.

    u=1,5,1, v=1,2,3

  6. 32.

    u=3,-1,2, v=2,2,1

  7. 33.

    A 10lb box sits on a ramp that rises 4ft over a distance of 20ft. How much force is required to keep the box from sliding down the ramp?

  8. 34.

    A 10lb box sits on a 15ft ramp that makes a 30 angle with the horizontal. How much force is required to keep the box from sliding down the ramp?

  9. 35.

    How much work is performed in moving a box horizontally 10ft with a force of 20lb applied at an angle of 45 to the horizontal?

  10. 36.

    How much work is performed in moving a box horizontally 10ft with a force of 20lb applied at an angle of 10 to the horizontal?

  11. 37.

    How much work is performed in moving a box up the length of a ramp that rises 2ft over a distance of 10ft, with a force of 50lb applied horizontally?

  12. 38.

    How much work is performed in moving a box up the length of a ramp that rises 2ft over a distance of 10ft, with a force of 50lb applied at an angle of 45 to the horizontal?

  13. 39.

    How much work is performed in moving a box up the length of a 10ft ramp that makes a 5 angle with the horizontal, with 50lb of force applied in the direction of the ramp?

  14. 40.
    For any two vectors u and v use the properties of the dot product to show that u±v2=u2+v2±2(uv).
  15. 41.
    For any two vectors u and v show that u+v2+u-v2=2u2+2v2. Interpret this as a statement about parallelograms.
  16. 42.
    Consider two nonzero vectors u and v and the angle between them θ. The vectors u, v, and u-v form the triangle as follows.

    θ

    u

    v

    u-v
    (a) Use the Law of Cosines to show that u-v2=u2+v2-2uvcosθ. (b) Use (a) and the previous problem to conclude the formula uv=uvcosθ.
  17. 43.
    Suppose we know that u=5, v=4, and the angle between u and v is θ=π/3. Determine the following. (a) u+v. (b) uv. (c) 12u+3v. (d) u-v.
  18. 44.

    Show that the two diagonals of a parallelogram intersect in right angles if and only if all four sides of the parallelogram have the same length.

  19. 45.
    Show that for any two vectors u and v we have |uv|uv. This is called the Cauchy-Schwarz inequality.
  20. 46.
    Show that for any two vectors u and v we have u+vu+v. This is called the triangle inequality. Explain the name.
Modern Campus CMS