Upload
roderick-cook
View
225
Download
1
Embed Size (px)
Citation preview
Dot & Cross Product•
X
Dot Product (2.11)
• Symbolically:
– NOT, NOT, NOT vector multiplication• Numeric Interpretation #1
– Result is a scalar. = – Example:
D.P. Application #1
• Look at – Numerically: – Look familiar?
• Length, without the final square root.• Or…the length squared
Dot Product, cont.
• Numeric Interpretation #2:
– Where θ is the angle made when the two vectors are placed tail-to-tail.
– Comes from the Law of Cosines
Law of Cosines
)cos(*2222 abbac
C
A
B
b
a
c
αβ
γ
Sort of like the Pythagorean theorem for any triangle (not just right triangles)
Law of Cosines => D.P. Interp #21. Let 2. Let 3. Let 4. (by D.P App#1)
– This equals b in the drawing above.
5. Similar steps for w and q6. (Law of Cosines)7. (using step 4)8. (using FOIL and distributive law of D.P., 2.13)9. (substitue r.h.s of 8 into l.f.s of 7 and simplify)10.Q.E.D.
C
AB
ba
c
α β
γ
𝑣 ��
��
Let’s look at the two interpretations
Let and
Let’s draw a picture:
θ is ≈ 60 degrees
v
w
θ
0
5
10
v
0
3
5
w
w
Example, continued
0
5
10
v
0
3
5
w
Theta is ≈ 60.0 degrees.
57.5319250)3(5
18.11125251000510
222
222
w
v
Let’s hypothesize that interpretation#2 and interpretation#1 are both correct, but let’s compare the numbers for this test case…just to be sure. Interpretation#1: 3515500*0)3(*55*10 wv
Interpretation#2:
14.31
)60cos(*57.5*18.11cos**
wvwv
(Note: We guessed on theta, and rounded off the lengths. Otherwise they would be identical)
)cos(** wvwv
Application of D.P #2(Calculation of θ)
• We can come up with an exact value for θ, given any two vectors using a little algebra and our two definitions of dot product.
)cos(** wvwv
wv
wv
wv
wv
*
)cos(**
*
)cos(*
wv
wv
))(cos(cos)*
(cos 11 wv
wv
)*
(cos 1
wv
wv
Acute
Application of Dot Product #3 θ is the angle between v and w. In each of these cases,
think of what cos(θ) would be…
v
w
θ
v
w
θ
v
w θ
vw θ
v
w
θ
θ≈45
θ≈120
θ≈120θ≈180
θ≈90
NOTE: We never have to deal with the case of θ > 180. Why??
cos(45)=0.707
cos(120)=-0.5
cos(120)=-0.5
cos(90)=0
cos(180)=-1
Obtuse
Right .
Application of Dot Product #3(θ “Categorization”)
• We can classify what type of angle is made by two vectors by looking at the sign of the dot product.
• Acute: • Obtuse: • Right:
If v and w are both unit-length (normalized), we can make some more observations:
0 wv
0 wv 0 wv
1ˆ1 wv
1ˆˆ wv if they are equal (the d.p is close to 1 if they’re in the same general direction).
ALWAYS!
1ˆˆ wv if they are opposite (the d.p is close to -1 if they’re in generally opposite directions).
Application #4 (projection) Let v,w be two vectors.
Consider a triangle
How long is a ? A: *cos(θ) Remember: *cos(θ) So… a =
The projection ofis (whose length is a)
v
w
w
v
a
θ
��
Application #4, cont.
• For any two vectors, and …– The projection of onto is – This can be simplified to:
Application #4, cont.
• It works even if they make an obtuse angle
��
𝑟
��
Cross Product (5.11)
• Symbolically:• Again, NOT, NOT, NOT vector multiplication!• The result is a vector.
wv
Cross Product (5.11) A little trickier than dot product Only useful (to us) in 3D Imagine two vectors v,w
They aren't parallel (or antiparallel) They lie in a plane The plane has a normal. Call it n.
Define:
How do we compute it? We can use a visualization
to remember...
v×w=nx
y
z
v
w
n
Cross Product, Numericallyx y z
Vx Vy Vz
Wx Wy Wz
x y z
Vx Vy Vz
Wx Wy Wz
x y z
Vx Vy Vz
Wx Wy Wz
xyyx
zxxz
yzzy
wvwv
wvwv
wvwv
wv
**
**
**
X =
Y =
Z =
Another C.P. mnemonic
yzzyx wvwvresult **
zxxzy wvwvresult **
xyyxz wvwvresult **
Memorize Me
Increase the subscripts by 1, “wrapping” around from z=>x
Increase the subscripts by 1, “wrapping” around from z=>x
Direction
Cross product is anticommutative Meaning: v x w = -(w x v)
Determining direction of result: If we compute n = v x w: Use right-hand rule
Or, if in left handed space, use left-hand rule
v
w
n
Properties
Additional properties: ||v x w|| = area of parallelogram ||v x w|| = ||v|| ||w|| sin θ v x v = (0,0,0)
x
y
z
v
w
n