<<

ES 111 Mathematical Methods in the Earth Sciences Lecture Outline 4 - Thurs 10th Oct 2019 Dot and Cross Products

So far, we haven’t talked about vector . It turns out that there are two ways of doing it: (1) the dot , which produces a , and (2) the which produces a vector. The Dot (or Scalar) Product When is it useful? Anywhere you need to find the component of something which acts in a particular direction. Given two vectors a and b, we define the dot product of a and b as 3 X a · b = a1b1 + a2b2 + a3b3 = aibi i=1 where a = [a1, a2, a3] and b = [b1, b2, b3]. Note that the dot product is a scalar. Example: If a = [1, 0, 2] and b = [0, 1, 1] then what is a · b? The dot product is 1. Commutative a · b = b · a

2. Distributive a · (b + c) = a · b + a · c

3. Associative (ca) · b = c(a · b) = a · (cb)

Physically, we think of the dot product as the projection of one vector onto another. You can also think of the dot product measuring how parallel a and b are. Obviously, the between the two vectors γ has an important role.

Figure 1

1 A very important result is the following (which can be proved (how?) with the ):

a · b = |a||b| cos γ

Remember that a·b gives a scalar. The scalar is the length of a times the length of the component of b projected onto a (or vice versa). There are two special cases. If γ = π/2, then the two vectors are and the dot product is 0 (cos π/2=0). If γ = 0, then the two vectors are parallel and the dot product is simply |a||b|. [Answer: The third side of the can be described as a vector c = b − a. In terms of the individual components, a = [a1, a2, a3] and similarly with b and c. So we can write c1 = b1−a1 and so 2 2 2 2 2 2 on. Using the law of cosines, we have |c| = |a| +|b| −2|a||b| cos γ. But|c| = (b1 −a1) +(b2 −a2) + 2 (b3 −a3) and so expanding the law of cosines out we end up with (a1b1)+(a2b2)+(a3b3) = |a||b| cos γ and the left-hand side of this equation is the definition of the dot product.] Example The done is distance travelled times by applied in the direction of travel. We can write this as W = |f| cos γ|d| = f · d where f and d are the vectors describing the force and travel vectors, respectively. The most useful thing about the dot product is that it gives us an easy way of calculating the angle between two vectors in 3D. Let’s say that we know the two vectors a and b. Then the angle between them is given by a · b cos γ = |a||b| Example What’s the angle between [−1, 0, 1] and [−1, 1, 1]? √ √ [Answer: a · b = (−1)(−1) + (0)(1) + (1)(1) = 2. We also have |a| = 2 and |b = 3. So √ q cos γ = 2/ 6 or 2/3.] Caution The dot product only works with Cartesian vectors!

For unit vectors, the angle between the two vectors is given by

cos γ =a ˆ · ˆb

This expression is particularly useful if we are dealing with geographic (lat,long) coordinates.

For instance, given two points on a sphere (φ1, θ1) and (φ2, θ2), you can show that the angle between

2 them γ is given by

cos γ = cos θ1 cos θ2 cos(φ1 − φ2) + sin θ1 sin θ2

What are some limiting cases that you can use to check this expression?

Cross (or Vector) Product When is it useful? It appears in the fundamental equations governing magnetic induction, and the Coriolis effect. Also useful when you want to define mutually orthogonal axes. Given two vectors a and b, we define the cross product of a and b as

a ⊗ b = [a2b3 − a3b2, a3b1 − a1b3, a1b2 − a2b1] or equivalently ˆ a ⊗ b = ˆi(a2b3 − a3b2) + ˆj(a3b1 − a1b3) + k(a1b2 − a2b1) where

a = [a1, a2, a3] , b = [b1, b2, b3]

Note that the resulting answer is also a vector (unlike the dot product). Does it work? There is a short-hand way of remembering this formula Example: If a = [1, 1, 0] and b = [0, 1, 1] then what is a ⊗ b? [Answer: [1,-1,1]. You can check by dotting [1,-1,1] with [1,1,0] and [1,-1,1] with [0,1,1] and verifying that in both cases the answer is zero. So [1,-1,1] is perpendicular to both those vectors, as it should be.] The cross product has several useful properties: 1. a ⊗ b is perpendicular to both a and b. The cross product is normal to the containing the two vectors. Thus a · (a ⊗ b) = b · (a ⊗ b) = 0. 2. a ⊗ b = c obeys the right-hand rule. So if a is oriented along x and b is oriented along y, then c will be oriented along z. Another way of writing this is: ˆi ⊗ ˆj = kˆ. 3. |a ⊗ b| = |a||b| sin γ. Thus if a = cb, then a ⊗ b=0. In other words, parallel vectors have a cross product of the null vector (zero). So the cross product measures how orthogonal two vectors are. 4. |a ⊗ b| is equal to the area of the parallelogram defined by a and b.

3 If the cross product of two vectors is zero, the vectors are parallel. If the dot product of two vectors is zero, the vectors are perpendicular.

Example - what is |ω ⊗ (ω ⊗ r)|? The cross product is 1. Anti-commutative why? a ⊗ b = −b ⊗ a

2. Distributive a ⊗ (b + c) = a ⊗ b + a ⊗ c

3. Not associative a ⊗ (b ⊗ c) 6= (a ⊗ b) ⊗ c

A useful identity is that

a ⊗ (b ⊗ c) = (a · c)b − (a · b)c

Note that both sides of this identity are vectors. We can combine the dot and cross products into the scalar

a · (b ⊗ c) = c · (a ⊗ b) = b · (c ⊗ a) which has the useful property of giving the of the defined by a,b and c. If it turns out to be negative, it’s because the vectors are left-handed rather than right-handed. Example - Coriolis effect (Battle of the Falklands, 1914).

4