LECTURE 1: DOT PRODUCTS MINGFENG ZHAO January 05, 2015 Vectors in 2 or 3 dimensions For simplicity, we consider vector operations in R3 : Let c be a scalar(i.e., a real number), u = hu1 , u2 , u3 i and v = hv1 , v2 , v3 i, then I. Magnitude: |u| = q u21 + u22 + u23 . II. Vector addition: u + v = hu1 + v1 , u2 + v2 , u3 + v3 i. III. Vector subtraction: u − v = hu1 − v1 , u2 − v2 , u3 − v3 i. IV. Scalar multiplication: cu = hcu1 , cu2 , cu3 i. Remark 1. The geometric meaning of vector addition and vector subtraction: 1 2 MINGFENG ZHAO Example 1. Let u = h2, −4, 1i and v = h3, 0, −1i, compute a. 1 u 2 b. − 2v c. u + 2v d. |u| In fact, we have 1 u = 2 = = −2v 1 h2, −4, 1i 2 1 1 1 · 2, · (−4), · 1 2 2 2 1 1, −2, 2 = −2h3, 0, −1i = h(−2) · 3, (−2) · 0, (−2) · (−1)i = h6, 0, 2i = h2, −4, 1i + 2h3, 0, −1i = h2, −4, 1i + h6, 0, −2i = h2 + 6, −4 + 0, 1 + (−2)i = h8, −4, −1i |u| = |h2, −4, 1i| u + 2v = = = p 22 + (−4)2 + 12 √ √ 4 + 16 + 1 21 Dot products of vectors Definition 1. Given two nonzero vectors u and v in R2 or R3 , their dot product is u · v = |u||v| cos(θ), where θ is the angle between u and v with 0 ≤ θ ≤ π. If u = 0 or v = 0, then u · v = 0, and θ is undefined. If u · v = 0, we say that u and v are orthogonal, denoted by u ⊥ v. LECTURE 1: DOT PRODUCTS 3 Remark 2. The zero vector is orthogonal to all vectors. Remark 3. The definition of dot product tells us the information of the angle between two vectors. More precisely, in order to find the angle θ between vectors u and v: I. Compute the dot product u · v. II. Compute the magnitudes of u and v, respectively. u·v III. Find the angle θ through the formula cos(θ) = , that is, |u||v| u·v −1 θ = cos . |u||v| Figure 1. The graph of cos−1 (x) Remark 4. Let cos(θ) = a be such that 0 ≤ π ≤ π, then I. If 0 ≤ a ≤ 1, then θ = cos−1 (a). II. If −1 ≤ a < 0, then θ = π − cos−1 (|a|). Theorem 1. Given two vectors u = hu1 , u2 , u3 i and v = hv1 , v2 , v3 i, then u · v = u1 v1 + u2 v2 + u3 v3 . Remark 5. It’s easy to see that |u| = √ u · u. √ √ √ √ Example 2. Let u = h 3, 1, 0i, v = h1, 3, 0i, and w = h1, 3, 2 3i. 4 MINGFENG ZHAO a. Compute u · v. b. Find the angle between u and v. c. Find the angle between u and w. a. By the definition of dot product, we have u·v = = = √ √ 3·1+1· 3+ √ √ 3+0·0 3+0 √ 2 3. b. By the result of part a, we have √ u · v = 2 3. Notice that |u| = = = = = |v| = = = = = Then we have √ |h 3, 1, 0i| q√ ( 3)2 + 12 + 02 √ √ 3+1+0 4 2 √ |h1, 3, 0i| q √ 11 + ( 3)2 + 02 √ √ 1+3+0 4 0. √ √ √ u·v 2 3 2 3 3 cos(θ) = = = = . |u||v| 2·2 4 2 Since 0 ≤ θ ≤ π, then −1 θ = cos √ ! 3 π = . 2 6 LECTURE 1: DOT PRODUCTS 5 c. By the definition of dot product, we have √ √ √ √ √ √ √ u · w = h 3, 1, 0i · h1, 3, 2 3i = 3 · 1 + 1 · 3 + 0 · 2 3 = 2 3. By the result of part b, we have |u| = 2. Notice that q √ √ √ √ |w| = 12 + ( 3)2 + (2 3)2 = 1 + 3 + 12 = 16 = 4. Then cos(θ) = √ √ u·w 2 3 3 = = . |u||w| 2·4 4 Since 0 ≤ θπ, then −1 θ = cos √ ! 3 . 4 Theorem 2. Let u, v and w be vectors, and c be a scalar(i.e., a real number), then a. Commutative property: u · v = v · u. b. Associative property: c(u · v) = (cu) · v = u · (cv). c. Distributive property: u · (v + w) = u · v + u · w. Remark 6. Notice that (u · v)w 6= u(v · w). Department of Mathematics, The University of British Columbia, Room 121, 1984 Mathematics Road, Vancouver, B.C. Canada V6T 1Z2 E-mail address: mingfeng@math.ubc.ca