PrecalculusXYZ Homework Edition

⇩ Download ▾

11.9 The Dot Product and Projection

In Section 11.8, we learned how add and subtract vectors and how to multiply vectors by scalars. In this section, we define a product of vectors. We begin with the following definition.

Interactive figureThe dot product builds the shadow: proj_w(v) = (v·w / w·w) wDrag the 4 sliders below the figure.
Two arrows leave the origin, a navy one and a green one, and a shorter rust arrow lies along the green one ending where a dashed segment dropped from the tip of the navy arrow meets the green arrow's line at a right angle, with four sliders setting the two components of each arrow. Swinging the navy arrow toward the green one lengthens the rust arrow until it matches the navy arrow, turning them perpendicular shrinks the rust arrow to nothing at the origin, and opening the angle further makes the rust arrow point in the opposite direction from the green one. Adjustable parameters: v: horizontal component a (a) = 1, v: vertical component b (b) = 3, w: horizontal component c (c) = 3.5, w: vertical component d (d) = 1. Viewing window: x from -9 to 10, y from -4.87 to 6.88.
XYZ Graph · viewer build 5edf91b
Two vectors v = (a, b) and w = (c, d) start at the origin. The rust vector is the projection of v onto w, whose length and direction come entirely from two dot products: proj_w(v) = ((v·w)/(w·w)) w. The dashed segment from the tip of v to the tip of the projection is perpendicular to w, which is the defining property of a projection. Slide the components of either vector: when v and w point the same way the projection is all of v, when they are perpendicular it collapses to the origin, and when the angle between them is obtuse the projection points backwards along w.

For example, let v = 3 , 4 and w = 1 , 2 . Then v w = 3 , 4 1 , 2 = ( 3 ) ( 1 ) + ( 4 ) ( 2 ) = 5 . Note that the dot product takes two vectors and produces a scalar. For that reason, the quantity v w is often called the scalar product of v and w . The dot product enjoys the following properties.

Like most of the theorems involving vectors, the proof of Theorem 11.22 amounts to using the definition of the dot product and properties of real number arithmetic. To show the commutative property for instance, let v = v 1 , v 2 and w = w 1 , w 2 . Then

v w = v 1 , v 2 w 1 , w 2 = v 1 w 1 + v 2 w 2 Definition of Dot Product = w 1 v 1 + w 2 v 2 Commutativity of Real Number Multiplication = w 1 , w 2 v 1 , v 2 Definition of Dot Product = w v

The distributive property is proved similarly and is left as an exercise.

For the scalar property, assume that v = v 1 , v 2 and w = w 1 , w 2 and k is a scalar. Then

( k v ) w = ( k v 1 , v 2 ) w 1 , w 2 = k v 1 , k v 2 w 1 , w 2 Definition of Scalar Multiplication = ( k v 1 ) ( w 1 ) + ( k v 2 ) ( w 2 ) Definition of Dot Product = k ( v 1 w 1 ) + k ( v 2 w 2 ) Associativity of Real Number Multiplication = k ( v 1 w 1 + v 2 w 2 ) Distributive Law of Real Numbers = k v 1 , v 2 w 1 , w 2 Definition of Dot Product = k ( v w )

We leave the proof of k ( v w ) = v ( k w ) as an exercise.

For the last property, we note that if v = v 1 , v 2 , then v v = v 1 , v 2 v 1 , v 2 = v 1 2 + v 2 2 = v 2 , where the last equality comes courtesy of Definition 11.8.

The following example puts Theorem 11.22 to good use. As in Example 11.8.3, we work out the problem in great detail and encourage the reader to supply the justification for each step.

If we take a step back from the pedantry in Example 11.9.1, we see that the bulk of the work is needed to show that ( v w ) ( v w ) = v v 2 ( v w ) + w w . If this looks familiar, it should. Since the dot product enjoys many of the same properties enjoyed by real numbers, the machinations required to expand ( v w ) ( v w ) for vectors v and w match those required to expand ( v w ) ( v w ) for real numbers v and w , and hence we get similar looking results. The identity verified in Example 11.9.1 plays a large role in the development of the geometric properties of the dot product, which we now explore.

Suppose v and w are two nonzero vectors. If we draw v and w with the same initial point, we define the angle between v and w to be the angle θ determined by the rays containing the vectors v and w , as illustrated below. We require 0 θ π . (Think about why this is needed in the definition.)

Coordinate-plane figure.
Figure 11.278
Coordinate-plane figure.
Figure 11.279
Coordinate-plane figure.
Figure 11.280

θ = 0

0 < θ < π

θ = π

The following theorem gives us some insight into the geometric role the dot product plays.

We prove Theorem 11.23 in cases. If θ = 0 , then v and w have the same direction. It follows1 that there is a real number k > 0 so that w = k v . Hence, v w = v ( k v ) = k ( v v ) = k v 2 = k v v . Since k > 0 , k = | k | , so k v = | k | v = k v by Theorem 11.20. Hence, k v v = v ( k v ) = v k v = v w . Since cos ( 0 ) = 1 , we get v w = k v v = v w = v w cos ( 0 ) , proving that the formula holds for θ = 0 . If θ = π , we repeat the argument with the difference being w = k v where k < 0 . In this case, | k | = k , so k v = | k | v = k v = w . Since cos ( π ) = 1 , we get v w = v w = v w cos ( π ) , as required. Next, if 0 < θ < π , the vectors v , w and v w determine a triangle with side lengths v , w and v w , respectively, as seen below.

Coordinate-plane figure.
Figure 11.281
Coordinate-plane figure.
Figure 11.282

The Law of Cosines yields v w 2 = v 2 + w 2 2 v w cos ( θ ) . From Example 11.9.1, we know v w 2 = v 2 2 ( v w ) + w 2 . Equating these two expressions for v w 2 gives v 2 + w 2 2 v w cos ( θ ) = v 2 2 ( v w ) + w 2 which reduces to 2 v w cos ( θ ) = 2 ( v w ) , or v w = v w cos ( θ ) , as required. An immediate consequence of Theorem 11.23 is the following.

We obtain the formula in Theorem 11.24 by solving the equation given in Theorem 11.23 for θ . Since v and w are nonzero, so are v and w . Hence, we may divide both sides of v w = v w cos ( θ ) by v w to get cos ( θ ) = v w v w . Since 0 θ π by definition, the values of θ exactly match the range of the arccosine function. Hence, θ = arccos ( v w v w ) . Using Theorem 11.22, we can rewrite v w v w = ( 1 v v ) ( 1 w w ) = v ^ w ^ , giving us the alternative formula θ = arccos ( v ^ w ^ ) .

We are overdue for an example.

The vectors v = 2 , 2 , and w = 5 , 5 in Example 11.9.2 are called orthogonal and we write v w , because the angle between them is π 2  radians = 90 . Geometrically, when orthogonal vectors are sketched with the same initial point, the lines containing the vectors are perpendicular.

Coordinate-plane figure.
Figure 11.283

v and w are orthogonal, v w

We state the relationship between orthogonal vectors and their dot product in the following theorem.

To prove Theorem 11.25, we first assume v and w are nonzero vectors with v w . By definition, the angle between v and w is π 2 . By Theorem 11.23, v w = v w cos ( π 2 ) = 0 . Conversely, if v and w are nonzero vectors and v w = 0 , then Theorem 11.24 gives θ = arccos ( v w v w ) = arccos ( 0 v w ) = arccos ( 0 ) = π 2 , so v w . We can use Theorem 11.25 in the following example to provide a different proof about the relationship between the slopes of perpendicular lines.3

While Theorem 11.25 certainly gives us some insight into what the dot product means geometrically, there is more to the story of the dot product. Consider the two nonzero vectors v and w drawn with a common initial point O below. For the moment, assume that the angle between v and w , which we'll denote θ , is acute. We wish to develop a formula for the vector p , indicated below, which is called the orthogonal projection of v onto w . The vector p is obtained geometrically as follows: drop a perpendicular from the terminal point T of v to the vector w and call the point of intersection R . The vector p is then defined as p = O R . Like any vector, p is determined by its magnitude p and its direction p ^ according to the formula p = p p ^ . Since we want p ^ to have the same direction as w , we have p ^ = w ^ . To determine p , we make use of Theorem 10.4 as applied to the right triangle O R T . We find cos ( θ ) = p v , or p = v cos ( θ ) . To get things in terms of just v and w , we use Theorem 11.23 to get p = v cos ( θ ) = v w cos ( θ ) w = v w w . Using Theorem 11.22, we rewrite v w w = v ( 1 w w ) = v w ^ . Hence, p = v w ^ , and since p ^ = w ^ , we now have a formula for p completely in terms of v and w , namely p = p p ^ = ( v w ^ ) w ^ .

Coordinate-plane figure.
Figure 11.284
Coordinate-plane figure.
Figure 11.285
Coordinate-plane figure.
Figure 11.286

Now suppose that the angle θ between v and w is obtuse, and consider the diagram below. In this case, we see that p ^ = w ^ and using the triangle O R T , we find p = v cos ( θ ) . Since θ + θ = π , it follows that cos ( θ ) = cos ( θ ) , which means p = v cos ( θ ) = v cos ( θ ) . Rewriting this last equation in terms of v and w as before, we get p = ( v w ^ ) . Putting this together with p ^ = w ^ , we get p = p p ^ = ( v w ^ ) ( w ^ ) = ( v w ^ ) w ^ in this case as well.

Coordinate-plane figure.
Figure 11.287

If the angle between v and w is π 2 then it is easy to show4 that p = 0 . Since v w in this case, v w = 0 . It follows that v w ^ = 0 and p = 0 = 0 w ^ = ( v w ^ ) w ^ in this case, too. This gives us

Definition 11.12 gives us a good idea what the dot product does. The scalar v w ^ is a measure of how much of the vector v is in the direction of the vector w and is thus called the scalar projection of v onto w . While the formula given in Definition 11.12 is theoretically appealing, because of the presence of the normalized unit vector w ^ , computing the projection using the formula proj w ( v ) = ( v w ^ ) w ^ can be messy. We present two other formulas that are often used in practice.

The proof of Theorem 11.26, which we leave to the reader as an exercise, amounts to using the formula w ^ = ( 1 w ) w and properties of the dot product. It is time for an example.

Suppose we wanted to verify that our answer p in Example 11.9.4 is indeed the orthogonal projection of v onto w . We first note that since p is a scalar multiple of w , it has the correct direction, so what remains to check is the orthogonality condition. Consider the vector q whose initial point is the terminal point of p and whose terminal point is the terminal point of v .

Coordinate-plane figure.
Figure 11.289

From the definition of vector arithmetic, p + q = v , so that q = v p . In the case of Example 11.9.4, v = 1 , 8 and p = 3 , 6 , so q = 1 , 8 3 , 6 = 4 , 2 . Then q w = 4 , 2 1 , 2 = ( 4 ) + 4 = 0 , which shows q w , as required. This result is generalized in the following theorem.

Note that if the vectors p and q in Theorem 11.27 are nonzero, then we can say p is parallel 5 to w and q is orthogonal to w . In this case, the vector p is sometimes called the `vector component of v parallel to w ' and q is called the `vector component of v orthogonal to w .' To prove Theorem 11.27, we take p = proj w ( v ) and q = v p . Then p is, by definition, a scalar multiple of w . Next, we compute q w .

q w = ( v p ) w Definition of  q . = v w p w Properties of Dot Product = v w ( v w w w w ) w Since  p = proj w ( v ) . = v w ( v w w w ) ( w w ) Properties of Dot Product. = v w v w = 0

Hence, q w = 0 , as required. At this point, we have shown that the vectors p and q guaranteed by Theorem 11.27 exist. Now we need to show that they are unique. Suppose v = p + q = p + q where the vectors p and q satisfy the same properties described in Theorem 11.27 as p and q . Then p p = q q , so w ( p p ) = w ( q q ) = w q w q = 0 0 = 0 . Hence, w ( p p ) = 0 . Now there are scalars k and k so that p = k w and p = k w . This means w ( p p ) = w ( k w k w ) = w ( [ k k ] w ) = ( k k ) ( w w ) = ( k k ) w 2 . Since w 0 , w 2 0 , which means the only way w ( p p ) = ( k k ) w 2 = 0 is for k k = 0 , or k = k . This means p = k w = k w = p . With q q = p p = p p = 0 , it must be that q = q as well. Hence, we have shown there is only one way to write v as a sum of vectors as described in Theorem 11.27.

We close this section with an application of the dot product. In Physics, if a constant force F is exerted over a distance d , the work W done by the force is given by W = F d . Here, we assume the force is being applied in the direction of the motion. If the force applied is not in the direction of the motion, we can use the dot product to find the work done. Consider the scenario below where the constant force F is applied to move an object from the point P to the point Q .

Coordinate-plane figure.
Figure 11.290

To find the work W done in this scenario, we need to find how much of the force F is in the direction of the motion P Q . This is precisely what the dot product F P Q ^ represents. Since the distance the object travels is P Q , we get W = ( F P Q ^ ) P Q . Since P Q = P Q P Q ^ , W = ( F P Q ^ ) P Q = F ( P Q P Q ^ ) = F P Q = F P Q cos ( θ ) , where θ is the angle between the applied force F and the trajectory of the motion P Q . We have proved the following.

Exercises

In Exercises -, use the pair of vectors v and w to find the following quantities.

  • v w
  • The angle θ (in degrees) between v and w
  • proj w ( v )
  • q = v proj w ( v ) (Show that q w = 0 .)
  1. v = 2 , 7 and w = 5 , 9
  2. v = 6 , 5 and w = 10 , 12
  3. v = 1 , 3 and w = 1 , 3
  4. v = 3 , 4 and w = 6 , 8
  5. v = 2 , 1 and w = 3 , 6
  6. v = 3 3 , 3 and w = 3 , 1
  7. v = 1 , 17 and w = 1 , 0
  8. v = 3 , 4 and w = 5 , 12
  9. v = 4 , 2 and w = 1 , 5
  10. v = 5 , 6 and w = 4 , 7
  11. v = 8 , 3 and w = 2 , 6
  12. v = 34 , 91 and w = 0 , 1
  13. v = 3 ı ^ ȷ ^ and w = 4 ȷ ^
  14. v = 24 ı ^ + 7 ȷ ^ and w = 2 ı ^
  15. v = 3 2 ı ^ + 3 2 ȷ ^ and w = ı ^ ȷ ^
  16. v = 5 ı ^ + 12 ȷ ^ and w = 3 ı ^ + 4 ȷ ^
  17. v = 1 2 , 3 2 and w = 2 2 , 2 2
  18. v = 2 2 , 2 2 and w = 1 2 , 3 2
  19. v = 3 2 , 1 2 and w = 2 2 , 2 2
  20. v = 1 2 , 3 2 and w = 2 2 , 2 2
  21. A force of 1500 pounds is required to tow a trailer. Find the work done towing the trailer along a flat stretch of road 300 feet. Assume the force is applied in the direction of the motion.
  22. Find the work done lifting a 10 pound book 3 feet straight up into the air. Assume the force of gravity is acting straight downwards.
  23. Suppose Taylor fills her wagon with rocks and must exert a force of 13 pounds to pull her wagon across the yard. If she maintains a 15 angle between the handle of the wagon and the horizontal, compute how much work Taylor does pulling her wagon 25 feet. Round your answer to two decimal places.
  24. In Exercise in Section 11.8, two drunken college students have filled an empty beer keg with rocks which they drag down the street by pulling on two attached ropes. The stronger of the two students pulls with a force of 100 pounds on a rope which makes a 13 angle with the direction of motion. (In this case, the keg was being pulled due east and the student's heading was N 77 E.) Find the work done by this student if the keg is dragged 42 feet.
  25. Find the work done pushing a 200 pound barrel 10 feet up a 12.5 incline. Ignore all forces acting on the barrel except gravity, which acts downwards. Round your answer to two decimal places.

    HINT: Since you are working to overcome gravity only, the force being applied acts directly upwards. This means that the angle between the applied force in this case and the motion of the object is not the 12.5 of the incline!

  26. Prove the distributive property of the dot product in Theorem 11.22.
  27. Finish the proof of the scalar property of the dot product in Theorem 11.22.
  28. Use the identity in Example 11.9.1 to prove the Parallelogram Law

    v 2 + w 2 = 1 2 [ v + w 2 + v w 2 ]

  29. We know that | x + y | | x | + | y | for all real numbers x and y by the Triangle Inequality established in Exercise in Section 2.2. We can now establish a Triangle Inequality for vectors. In this exercise, we prove that u + v u + v for all pairs of vectors u and v .

    1. (Step 1) Show that u + v 2 = u 2 + 2 u v + v 2 .
    2. (Step 2) Show that | u v | u v . This is the celebrated Cauchy-Schwarz Inequality.6 (Hint: To show this inequality, start with the fact that | u v | = | u v cos ( θ ) | and use the fact that | cos ( θ ) | 1 for all θ .)
    3. (Step 3) Show that u + v 2 = u 2 + 2 u v + v 2 u 2 + 2 | u v | + v 2 u 2 + 2 u v + v 2 = ( u + v ) 2 .
    4. (Step 4) Use Step 3 to show that u + v u + v for all pairs of vectors u and v .
    5. As an added bonus, we can now show that the Triangle Inequality | z + w | | z | + | w | holds for all complex numbers z and w as well. Identify the complex number z = a + b i with the vector u = a , b and identify the complex number w = c + d i with the vector v = c , d and just follow your nose!

Answers

  1. v = 2 , 7 and w = 5 , 9

    v w = 53

    θ = 45

    proj w ( v ) = 5 2 , 9 2

    q = 9 2 , 5 2

  2. v = 6 , 5 and w = 10 , 12

    v w = 0

    θ = 90

    proj w ( v ) = 0 , 0

    q = 6 , 5

  3. v = 1 , 3 and w = 1 , 3

    v w = 2

    θ = 120

    proj w ( v ) = 1 2 , 3 2

    q = 3 2 , 3 2

  4. v = 3 , 4 and w = 6 , 8

    v w = 50

    θ = 180

    proj w ( v ) = 3 , 4

    q = 0 , 0

  5. v = 2 , 1 and w = 3 , 6

    v w = 0

    θ = 90

    proj w ( v ) = 0 , 0

    q = 2 , 1

  6. v = 3 3 , 3 and w = 3 , 1

    v w = 6

    θ = 60

    proj w ( v ) = 3 3 2 , 3 2

    q = 3 3 2 , 9 2

  7. v = 1 , 17 and w = 1 , 0

    v w = 1

    θ 93.37

    proj w ( v ) = 1 , 0

    q = 0 , 17

  8. v = 3 , 4 and w = 5 , 12

    v w = 63

    θ 14.25

    proj w ( v ) = 315 169 , 756 169

    q = 192 169 , 80 169

  9. v = 4 , 2 and w = 1 , 5

    v w = 6

    θ 74.74

    proj w ( v ) = 3 13 , 15 13

    q = 55 13 , 11 13

  10. v = 5 , 6 and w = 4 , 7

    v w = 62

    θ 169.94

    proj w ( v ) = 248 65 , 434 65

    q = 77 65 , 44 65

  11. v = 8 , 3 and w = 2 , 6

    v w = 2

    θ 87.88

    proj w ( v ) = 1 10 , 3 10

    q = 81 10 , 27 10

  12. v = 34 , 91 and w = 0 , 1

    v w = 91

    θ 159.51

    proj w ( v ) = 0 , 91

    q = 34 , 0

  13. v = 3 ı ^ ȷ ^ and w = 4 ȷ ^

    v w = 4

    θ 108.43

    proj w ( v ) = 0 , 1

    q = 3 , 0

  14. v = 24 ı ^ + 7 ȷ ^ and w = 2 ı ^

    v w = 48

    θ 163.74

    proj w ( v ) = 24 , 0

    q = 0 , 7

  15. v = 3 2 ı ^ + 3 2 ȷ ^ and w = ı ^ ȷ ^

    v w = 0

    θ = 90

    proj w ( v ) = 0 , 0

    q = 3 2 , 3 2

  16. v = 5 ı ^ + 12 ȷ ^ and w = 3 ı ^ + 4 ȷ ^

    v w = 33

    θ 59.49

    proj w ( v ) = 99 25 , 132 25

    q = 224 25 , 168 25

  17. v = 1 2 , 3 2 and w = 2 2 , 2 2

    v w = 6 2 4

    θ = 75

    proj w ( v ) = 1 3 4 , 3 1 4

    q = 1 + 3 4 , 1 + 3 4

  18. v = 2 2 , 2 2 and w = 1 2 , 3 2

    v w = 2 6 4

    θ = 105

    proj w ( v ) = 2 6 8 , 3 2 6 8

    q = 3 2 + 6 8 , 2 + 6 8

  19. v = 3 2 , 1 2 and w = 2 2 , 2 2

    v w = 6 + 2 4

    θ = 165

    proj w ( v ) = 3 + 1 4 , 3 + 1 4

    q = 3 1 4 , 1 3 4

  20. v = 1 2 , 3 2 and w = 2 2 , 2 2

    v w = 6 + 2 4

    θ = 15

    proj w ( v ) = 3 + 1 4 , 3 + 1 4

    q = 1 3 4 , 1 3 4

  21. ( 1500 pounds ) ( 300 feet ) cos ( 0 ) = 450 , 000 foot-pounds
  22. ( 10 pounds ) ( 3 feet ) cos ( 0 ) = 30 foot-pounds
  23. ( 13 pounds ) ( 25 feet ) cos ( 15 ) 313.92 foot-pounds
  24. ( 100 pounds ) ( 42 feet ) cos ( 13 ) 4092.35 foot-pounds
  25. ( 200 pounds ) ( 10 feet ) cos ( 77.5 ) 432.88 foot-pounds

Adapted from Precalculus, 3rd corrected edition, by Carl Stitz and Jeff Zeager (stitz-zeager.com), licensed under CC BY-NC-SA 3.0. Changes were made: reformatted as an accessible XYZ web edition. License: CC-BY-NC-SA-3.0.

These eBooks are a prerelease and are not yet certified conformant with WCAG 2.1 AA or ADA Title II. Every page is built against an automated accessibility gate, and the published editions will meet ADA Title II requirements when they release in late September 2026. If something is unusable, please tell us.