Archived

This topic is now archived and is closed to further replies.

Void

Ever tried visualizing a dot product?

Recommended Posts

The dot product can be viewed geometrically as a projection of a vector onto another. The pic here shows it in much detail. Looking at the formula for dot product, swapping the vectors gives the same result. ( u.v = v.u = |u| |v| cos(angle) ) So if the vectors are swapped, the projection (in the pic) should lie in the other vector and the length of the projected vector will be longer. This doesn''t quite tally with the maths. So, any clues what went wrong?

Share this post


Link to post
Share on other sites
quote:
Original post by Dracoliche
It''s the projection of one onto the other, multiplied by the magnitude of the one projected onto.


What happens if u flip the order of vectors? The projected vectors'' length will be different, yet the dot product formula stays the same.

Share this post


Link to post
Share on other sites
Neither the magnitude of either vector nor the angle between them changes. As Dracoliche said it is the component of one along the other times the magnitude of the other . Well, ok, you both said projection, but it is the magnitude of the projection and not the projection itself, i.e. component.



Edited by - LilBudyWizer on January 10, 2002 10:04:07 AM

Share this post


Link to post
Share on other sites
quote:
Original post by LilBudyWizer
Neither the magnitude of either vector nor the angle between them changes. As Dracoliche said it is the component of one along the other times the magnitude of the other . Well, ok, you both said projection, but it is the magnitude of the projection and not the projection itself, i.e. component.



Rite, it is the magnitude of the projection. In the picture, it is the red line.

That value is X.Y = |X| |Y| cos(angle).

So, if we do Y.X, we are projecting the other way. What would be the magnitude of the projected vector then? It certainly wouldn''t be the red line. In fact it would lie on vector X and exceed the length vector X .

But the formula Y.X == X.Y which means the projected vectors are of the same magnitude.

If we do a orthogonal projection of Y onto X, how is it possible to achieve an projection vector with the same magnitude as the red line?

Share this post


Link to post
Share on other sites
The magnitude of the projection is not the only quantity changing. The dot product''s other factor, ie the magnitude of the vector being projected onto, also changes if you reverse the operation. It changes by just the right amount to keep the dot product constant.

Consider X.Y... this is equal to the component of X along Y times the magnitude of Y.
Y.X, on the other hand, is the component of Y along X times the magnitude of X.

You will find these to be identical.

Share this post


Link to post
Share on other sites
The other way to visualise dot products is to consider what it is actually computing. Consider a vector V = ai +bj . It is the linear sum of two basis vectors, i & j . Now ask yourself, what if I want to write the vector V as the linear sum of two other vectors. Write V as V = cp + dq . ''c'' is the component of the magnitude of V that is applied in the direction of p and similarly for d. If we can write p as a vector in the i ,j basis then the dot product formula computes c. Similary for d. Basically, the dot product formula gives a functional relationship between the components c,d and a,b, given the basis i ,j .

Cheers,

Timkin

Share this post


Link to post
Share on other sites
The projected vector is to form a right hand triangle, rite? So, X and the X^ (red line) forms a right handed triangle when we do X.Y

If we do the other way, it should form a right hand triangle too, rite? But the projected vector should lie on X now.

Is there any way I can post a pic? It would make more sense.

Share this post


Link to post
Share on other sites
I do apologize for breaking into the conversation with something that is not completely related to the topic at hand, but it seems as though it in the same general vein. I would like to know if the conclusions I have drawn are reasonably correct.

-----------

Dot Product:

Can be used to find what a line looks like from a realitive angle and distance such as would be used in 3-dimentional visual representations on a 2-dimentional medium. This is done by taking one vector(magnitude with a direction) as the unit vector(the realitive point of view in the scene, being a form of metric?) and another vector(what we use to determain our line to be rendered into the scene based upon that unit vector?). The Dot Product equation allows us to determain magnitude for the projection of our vector into the unit vector? Permitting the realitive distance to be known of the origin and termination of the vector upon a plane(our screen) perpendicular to(My lingo is lacking, but this equates to saying "at a right angle to" does it not?) the unit vector?

------------

I hope that came out coherent enough to follow. If you can provide any enlightenment to aid my grasp of this concept it will be welcome, and you will have my thanks!

"Who are you, and how did you get in here?"
"I''''m the locksmith, and I''''m the locksmith."

Share this post


Link to post
Share on other sites
Mmm, I don''t think I have completely disentangled your meaning from your words but if I am correct, then yes, you are correct! The dot product of two vectors can be represented by the visual projection of 1 onto the other. Of course, the dot product just returns the length as it is a scalar product. If you take the vector product of two vectors, you will get the actual vector projection. This is achieved by multiplying the scalar product by the unit vector in the direction of the projection.

Cheers,

Timkin

Share this post


Link to post
Share on other sites