Deriving the Dot ProductDate: 09/17/98 at 19:37:06 From: Nick Subject: Dot product I would like a very thorough explanation of how we derive the formula |u| |v| cos(x) = u.v, the dot product. I have looked in several books and they merely write this as a given instead of explaining how and why we get this equation. I need the formula so as to calculate the angle between two points on the surface of a sphere, but I want to understand what I am doing Thanks, Nick Date: 09/17/98 at 20:11:35 From: Doctor Schwa Subject: Re: Dot product Good question! There are books that do a better job of explaining this, but not a lot of them, so I'm not surprised you had trouble finding an answer. The idea is to find the angle between two vectors, and show that it is u.v divided by |u| |v|, where I'll use . to stand for the dot product and |u| to stand for the length of u. Probably the best way to do this is to look at the angles made with the x-axis. We want to know the difference between the two angles, which I'll call theta_u and theta_v. Similarly I'll let the vector u have two components (x_u, y_u) and v be (x_v, y_v) (the standard notation is to use _ to denote subscripts). x = theta_u - theta_v I want to find cos(x), which is: cos(theta_u - theta_v) = cos theta_u cos theta_v + sin theta_u sin theta_v = (x_u / |u|) (x_v / |v|) + (y_u / |u|) (y_v / |v|) and simplifying, you get u.v / |u||v| Very simple, it turns out, when you look at it the right way. I'm just about to be teaching these ideas to my 11th grade class here at Gunn HS in Palo Alto so answering your question was a good reminder for me of what to emphasize. Thanks for asking it! - Doctor Schwa, The Math Forum http://mathforum.org/dr.math/ Date: 09/17/98 at 20:30:10 From: Doctor Ken Subject: Re: dot product Hi Nick, Some books actually use |U|*|V|*Cos(X) as the definition of the dot product. There's another definition that's pretty common though; for two dimensional vectors, where U = (u1, u2) and V = (v1, v2), it is: U.V = u1*v1 + u2*v2 For three-dimensional vectors, it's: U.V = u1*v1 + u2*v2 + u3*v3 I bet you see the generalization. So let's see whether we can show that |U||V|Cos(X) = u1*v1 + u2*v2. We'll write out the left side in terms of the coordinates of U and V, and then simplify. We'll do it in 2 dimensions, but the proof isn't very different in 3 dimensions. Imagine a plane with two vectors: U V | / \ | / \ | / \|/ --------------------------------+---------------- Add the coordinates to the diagram: U V | /| |\ | / | v2| \ | / |u2 | \|/ | --------------------------+-----+----+----------- v1 u1 X is the angle from U to V. It equals the angle from the x-axis to V, minus the angle from the x-axis to U. Let's call these angles XOV and XOU. So we have: |U||V|Cos(x) = |U||V|Cos(X) = |U||V|Cos(XOV - XOU) = |U||V|[Cos(XOV)Cos(XOU) + Sin(XOU)Sin(XOV)] = |U||V|[(v1/|V|)(u1/|U|) + (v2/|V|)(u2/|U|)] = |U||V|[(v1u1 + v2u2)/(|V||U|)] = v1u1 + v2u2 Make sense? Now, to make sure you understand it, since your problem is in 3 dimensions, why don't you try to derive the same result for 3-dimensional vectors? If you're slick, you can actually use the 2-dimensional result (hint: there's a plane that contains the two vectors and the origin). Good luck! - Doctor Ken, The Math Forum http://mathforum.org/dr.math/ |
Search the Dr. Math Library: |
[Privacy Policy] [Terms of Use]
Ask Dr. Math^{TM}
© 1994- The Math Forum at NCTM. All rights reserved.
http://mathforum.org/dr.math/