Dot, Scalar, Inner Product Question

In summary, the conversation discusses the concept of the dot product and its relation to known concepts in analytical geometry. The formula for the cosine of the angle between two line segments is derived and used to explain why the dot product takes the form it does. There is also a discussion on the simplicity and beauty of mathematics. Finally, the conversation explores different approaches to finding the dot product, with a focus on using rotated coordinate axes.
  • #1
Prologue
185
1
I have been searching for a way to relate known concepts (known to me) to the computation of the dot product in an effort to understand why it takes the form it does. I ran into a little snippet in a classical dynamics book that seems like it just may be the ticket.

Here is what it says:
From analytical geometry we recall that the formula for the cosine of the angle between two line segments is​

[tex]cos (\theta) = \frac{A_{x}B_{x}+A_{y}B_{y}+A_{z}B_{z}}{(A_{x}^{2}+A_{y}^{2}+A_{z}^{2})^{1/2}(B_{x}^{2}+B_{y}^{2}+B_{z}^{2})^{1/2}}[/tex]

Then by rearranging and using a definition of dot product we get:

[tex]\vec{A}\bullet\vec{B} := A_{x}B_{x}+A_{y}B_{y}+A_{z}B_{z}[/tex]

[tex]\vec{A}\bullet\vec{B} = cos(\theta)(A_{x}^{2}+A_{y}^{2}+A_{z}^{2})^{1/2}(B_{x}^{2}+B_{y}^{2}+B_{z}^{2})^{1/2}[/tex]



So the real question is: where in analytical geometry can I find this formula for the cosine of the angle between two line segments?
 
Physics news on Phys.org
  • #2
Prologue said:
[tex]cos (\theta) = \frac{A_{x}B_{x}+A_{y}B_{y}+A_{z}B_{z}}{(A_{x}^{2}+A_{y}^{2}+A_{z}^{2})^{1/2}(B_{x}^{2}+B_{y}^{2}+B_{z}^{2})^{1/2}}[/tex]

where in analytical geometry can I find this formula for the cosine of the angle between two line segments?

Hi Prologue! :smile:

it's the cosine rule:

(a - b).(a - b) = a.a + b.b - 2√(a.a)√(b.b)cos(c) :wink:
 
  • #3
Prologue said:
So the real question is: where in analytical geometry can I find this formula for the cosine of the angle between two line segments?

I just tried it and it is pretty straightforward. Start with two vectors [itex]\vec{A}[/itex] and [itex]\vec{B}[/itex]. Normalize [itex]\vec{B}[/itex] by setting [itex]\vec{B'}:=\vec{B}/||\vec{B}||[/itex] and let c be the constant such that [itex]||\vec{cA}||^2+||\vec{B'}-(cA)||^2=1[/itex]. This means that c is the scaling constant such that B' and cA form a right angled triangle with B' as the hypothenuse. Now by definition of the cosine of an angle (if I remember my high school math correctly), [itex]\cos\theta = ||c\vec{A}||[/itex].

So just solve for c in the equation above and inject in the defining equation for cos\theta. I tried it and it works!
 
  • #4
I see, but it isn't what I was looking for *deflation*. But even though that didn't lead me to a satifying conclusion, maybe I can and pose it differently.

I am really just trying to figure out why it is so darn simple. To find a dot product, you just take the contributions of the vectors in the same direction, multiply, then repeat, then sum. Why should it be (hopefully based on a visual/spatial argument *fingers crossed*) that this is the way that works?

We say things like, the projection of A onto B, or something of the sort. And when you break them into components, it literally is THE projection of each component onto the others component, then sum them. Why is it that this works?

It's so simple that it is begging for a simple explanation.
 
  • #5
Possibly interesting reading:
"The Geometry of Dot and Cross Products" by Tevian Dray and Corinne A. Manogue

[/url]
 
Last edited by a moderator:
  • #6
Prologue said:
I am really just trying to figure out why it is so darn simple.

Hi Prologue! :smile:

I think it's ultimately because perpendicular vectors have zero dot-product, and components in different directions are perpendicular, so when you multiply two vectors, you end up just multiplying the "same-direction" component-pairs, and adding:

(∑i aiei).(∑i biei) = ∑ijaibj(ei.ej) = ∑iaibi(ei.ei) = ∑iaibi :smile:
 
  • #7
do you want to know why the law of cosines is true or why math is beautiful?

the law of cosines appears in euclid, and is a corollary of pythagoras.

learning to phrase the law of cosines as a kind of multiplication of vectors is probably due to some obscure genius.

math is beautiful because...?
 
  • #8
Thank you for the replies everyone.

I would like to come at it a little different way. I'd like to look at the line of logic that starts with, 'We need something called a Dot Product because we would like to multiply vectors and this is how it works out.', and ends up with the dot prduct identity.

So, we want to multiply vectors. Then, I suppose, we decide that the only sensible way to do that is to say 'we only want to multiply the parts of the vectors that go in the same direction' (say that we put this constraint on as a result of a physical situation, maybe work). We then work out the geometry to find that no matter which vector we use as the reference we end up with the same result (B onto A or A onto B). Well, that is handy but now what is the best way to compute this with our contraint and with the rule we just found about commutation?



Let's say that we have two vectors A and B. A = [Ax,Ay] and B = [Bx,By].

http://img168.imageshack.us/img168/4715/dotproduct1es8.png


Now let us presume that for the purpose of finding the dot product we can rotate the coordinate axes that we use to measure the vectors, in any direction we please, as long as we preserve the positioning of the vectors relative to each other.


http://img168.imageshack.us/img168/1315/dotproduct2dh7.png


We now have an easy way to find the dot product in 2d. In this case it is merely the component of the vector A in the x' direction, times the magnitude of the vector B.

http://img166.imageshack.us/img166/2082/dotproduct4th1.png



Now we just have to show that

(1) [tex]A_{x'}|\vec{B}| = A_{x}B_{x}+A_{y}B_{y}[/tex]

or equivalently

(2) [tex]|\vec{A}||\vec{B}| cos(t)= A_{x}B_{x}+A_{y}B_{y}[/tex]


Using (2):

[tex]\sqrt{A_{x}^{2}+A_{y}^{2}}\sqrt{B_{x}^{2}+B_{y}^{2}} cos(t)= A_{x}B_{x}+A_{y}B_{y}[/tex]


Now I just need a way to find cos(t). It's late so I'll quit now and fumble with it some more later.
 
Last edited by a moderator:
  • #9
Hi Prologue!

I wish you well on your quest. :smile:

Here's a few comments to help/hinder you:

i] you've specified a.b = b.a (commutativity) … but why not a.b = -b.a? :wink:

ii] you've specified rotational invariance

iii] shouldn't you specify distributivity: a.(b+c) = a.b + a.c?

iv] what's wrong with a scalar product defined as a.b = absin? :smile:
 
  • #11
tiny-tim said:
Hi Prologue!

I wish you well on your quest. :smile:

Here's a few comments to help/hinder you:

i] you've specified a.b = b.a (commutativity) … but why not a.b = -b.a? :wink:

ii] you've specified rotational invariance

iii] shouldn't you specify distributivity: a.(b+c) = a.b + a.c?

iv] what's wrong with a scalar product defined as a.b = absin? :smile:


i] I think this is shown to not be true numerically in the geometric interpretation and generally when you convert it to algebra. In other words there is no direction associated with the dot product, only whether or not the two vectors have >90 degrees or < 90 degrees between them (the projected components point in 'opposite' directions). :)

ii] Yeah and I think it is clear that it works when looked at geometrically.

iii] Yeah that could be done (as you know) but I struggle to see how it would help. It seems to me that breaking things down into a math notation is good for computing the result, but is not good in this case for visualizing.

iv]Nothing is wrong with it, it just doesn't fit physically (as in trying to find work).



The last post shows basically what I understand of the argument and I think it demonstrates the problem I am having.

Fundamental disconnection:

[tex]cos(t)=\frac{A_{x}B_{x}+A_{y}B_{y}+A_{z}B_{z}}{(A_{x}^{2}+A_{y}^{2}+A_{z}^{2})^{1/2}(B_{x}^{2}+B_{y}^{2}+B_{z}^{2})^{1/2}}[/tex]

Why is this true?



I see that it works in certain cases (see below) but what is the generality that makes it all click?

http://img373.imageshack.us/img373/3695/dotproduct6fg1.png

You can see from this diagram that

[tex]cos(t)=\frac{A_{x}B_{x}+0+0}{AB}=\frac{A_{x}B_{x}}{1}=\frac{A_{x}1}{1}=A_{x}[/tex]

But how is there some visual/geometric generalization that pulls it all together for every relationship?
 
Last edited by a moderator:
  • #12
It comes from the law of cosines and the Euclidean distance in R3 (or more generally in Rn). Given a triangle with sides a, [/i]b[/i], and c, the angle between the sides a and b is given by

[tex]\cos\theta = \frac{a^2+b^2-c^2}{2ab}[/tex]

Now imagine a triangle with one vertex at the origin, another at point a and another at point b. Using the Euclidean norm,

[tex]\aligned
a^2 &= \sum_i a_i^2 \\
b^2 &= \sum_i b_i^2 \\
c^2 &= \sum_i (a_i-b_i)^2
\endaligned[/tex]

With the above the numerator in the law of cosines becomes

[tex]\aligned
a^2+b^2-c^2 &= \sum_i a_i^2 + b_i^2 - (a_i-b_i)^2 \\
&= 2\sum_i a_i b_i
\endaligned[/tex]

and thus

[tex]\cos\theta = \frac{\sum_i a_i b_i}{\sqrt{\sum_i a_i^2}\,\sqrt{\sum_i b_i^2}}[/tex]
 
  • #13
Well, D H, I think that pretty much takes care of all of my confusion. Thank you!

And thanks to everyone else, I know it was said many times that it comes from the law of cosines but I just couldn't see where it happened. Now I do, thanks again.
 

1. What is a dot product?

A dot product, also known as a scalar product, is a mathematical operation that takes two vectors and produces a single scalar value. It is calculated by multiplying the corresponding components of the two vectors and then adding them together.

2. How is a dot product different from a cross product?

A dot product results in a scalar value, while a cross product results in a vector. The dot product measures the similarity or projection of two vectors, while the cross product measures the perpendicularity or rotational relationship between two vectors.

3. What is the geometric interpretation of a dot product?

The dot product of two vectors is equal to the magnitude of one vector multiplied by the magnitude of the other vector, and then multiplied by the cosine of the angle between them. This can be interpreted as the projection of one vector onto the other, or the amount of one vector that is in the same direction as the other vector.

4. What is the relationship between dot products and orthogonality?

If the dot product of two vectors is equal to zero, then the vectors are orthogonal to each other, meaning they are perpendicular. This is because the cosine of 90 degrees is equal to 0, and the dot product formula includes a cosine term.

5. How is the dot product used in real-world applications?

The dot product has various applications in physics, engineering, and computer science. It is used to calculate work, power, and energy in physics. In computer graphics, it is used to determine lighting and shading in 3D models. In machine learning, it is used to measure the similarity between two data points. Additionally, the dot product is used in statistics, signal processing, and many other fields.

Similar threads

Replies
4
Views
1K
  • Differential Geometry
Replies
13
Views
2K
  • Advanced Physics Homework Help
Replies
3
Views
393
  • Calculus
Replies
4
Views
518
  • Linear and Abstract Algebra
Replies
1
Views
922
  • Differential Geometry
Replies
2
Views
590
  • Precalculus Mathematics Homework Help
Replies
3
Views
1K
  • Introductory Physics Homework Help
Replies
3
Views
1K
  • Linear and Abstract Algebra
Replies
14
Views
645
  • Calculus and Beyond Homework Help
Replies
13
Views
2K
Back
Top