#### Archived

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

# Ever tried visualizing a dot product?

This topic is 6129 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## 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 on other sites
It''s the projection of one onto the other, multiplied by the magnitude of the one projected onto.

##### 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 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 on other sites
Oops, that''s right. Thanks for picking that up.

##### 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 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 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 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 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."

1. 1
Rutin
46
2. 2
3. 3
4. 4
5. 5

• 13
• 10
• 12
• 10
• 13
• ### Forum Statistics

• Total Topics
632993
• Total Posts
3009763
• ### Who's Online (See full list)

There are no registered users currently online

×