6.2 Dot Product The dot product is an operation that takes two vectors as input and outputs a scalar. It is defined by the formula ( a, b ) · ( c, d ) ac + bd. That is, corresponding components of the two vectors are multiplied, and then the products are added together. For example, (2, 3) · (5, 4) (2)(5) + (3)(4) 10 + 12 22. Because the result is a scalar, the dot product is also known as the scalar product of vectors. It is also sometimes called the inner product of vectors, or more properly the Euclidean inner product. Note that the dot product of a vector with itself gives the square of the magnitude: ( a, b ) · ( a, b ) a 2 + b 2 | ( a, b ) | 2 . That is, v · v |v| 2 for any vector v. The dot product is often thought of as a kind of multiplication of vectors, though the result is a scalar as opposed to a vector. Algebraically, it satisfies several rules analogous to the rules for multiplication, as listed below. Algebraic Properties of the Dot Product The dot product has the following properties: 1. v · w w · v for any two vectors v and w. 2. ( kv) · w v · ( kw) k (v · w) for any scalar k and any vectors v and w. 3. u · (v + w) u · v + u · w for any three vectors u, v, and w. Because the dot product obeys the distributive law, we can distribute dot products of sums just as we do in normal algebra. For example, (a + b) · (c + d) a · c + a · d + b · c + b · d for any four vectors a, b, c, d. Geometric Interpretation The importance of the dot product stems from its geometric interpretation. Geometric Interpretation of Dot Product If v and w are vectors, then v · w |v| |w| cos θ, a Figure 1: The angle between v and w. where θ is the angle between v and w, as shown in Figure 1. DOT PRODUCT 2 This formula follows from the law of cosines from trigonometry. To see this, recall that the law of cosines states that c 2 a 2 + b 2 − 2ab cos θ a Figure 2: Triangle for the law of cosines. for any triangle with side lengths a, b, c, where θ is the angle opposite the side of length c, as shown in Figure 2. To derive the desired formula for v · w, we apply the law of cosines to the triangle of vectors shown in Figure 3. This gives the formula |w − v| 2 |v| 2 + |w| 2 − 2 |v| |w| cos θ. But expanding |w − v| 2 using the dot product gives |w − v| 2 (w − v) · (w − v) w·w − w·v − v·w + v·v a Figure 3: A triangle of vectors. |v| 2 + |w| 2 − 2v · w, and it follows that v · w |v| |w| cos θ. EXAMPLE 1 Two vectors v and w have magnitudes 5 and 6, and the angle between them is 60◦ . What is the value of v · w? We have v · w |v| |w| cos θ (5)(6) cos (60◦ ) (5)(6)(1/2) 15. SOLUTION One way the formula v · w |v| |w| cos θ is useful is that it allows us to find the angle between two vectors. To use it in this fashion, we solve for the angle θ: Because of the inverse cosine, this formula always yields an angle between 0◦ and 180◦ . θ cos−1 v·w |v| |w| EXAMPLE 2 Find the angle between the vectors (3, 2) and (1, 5) . SOLUTION Let v (3, 2) and w (1, 5) . Then v · w (3)(1) + (2)(5) 13, a Figure 4: The angle between the vectors (3, 2) and (1, 5) is 45◦ . so θ cos −1 v·w |v| |w| |v| −1 cos √ 13, 13 √ √ 13 26 |w| and ! −1 cos 1 √ 2 √ 26, ! 45◦ . Thus the angle between the vectors is 45◦ , as shown in Figure 4. Another application of the formula v · w |v| |w| cos θ is that it gives us a general rule for the sign of v · w. In particular, assuming |v| > 0 and |w| > 0, the dot product v · w must have the same sign as cos θ, as shown in Figure 5. Thus: • v · w > 0 if the angle between v and w is acute. • v · w 0 if the angle between v and w is a right angle. a Figure 5: The cosine is positive for acute angles and negative for obtuse angles. • v · w < 0 if the angle between v and w is obtuse. DOT PRODUCT 3 d Figure 6: The sign of the dot product depends on the angle between the two vectors. This trichotomy is illustrated in Figure 6. Of these three cases, the most important case is where the dot product is equal to zero. Two vectors v and w are said to be orthogonal if v · w 0. For example, the vectors (2, 5) and (−5, 2) are orthogonal, since Note that the zero vector 0 is orthogonal to any other vector, since 0 · v 0 for any vector v. (2, 5) · (−5, 2) (2)(−5) + (5)(2) 0. Geometrically, two nonzero vectors are orthogonal if and only if their directions are perpendicular. EXERCISES " # 1. Compute the dot product of the vectors 5 2 " and # 3 . −4 2. Suppose that two vectors v and w meet at a 30◦ angle. If v · v 4 and w · w 12, what is the value of v · w? 3. Compute the angle between the vectors 2i − j and −i + 3j. 4. Compute the angle between the vectors (2, 5) and (−1, 4) , correct to the nearest degree. 5. The following figure shows four vectors a, b, c, and d. (a) For which two of these vectors is the dot product positive? (b) Which two of these vectors are orthogonal? 6. Let a (−9, −3) , b (3, −8) , c (7, 2) , and d (−2, 6) . (a) Which two of these vectors are orthogonal? (b) Which two of these vectors meet at an acute angle? 7. Suppose |v| 4 and w · w 9, and that v · w 0. What is the value of |v + w|?