Jump to content
• Advertisement

#### Archived

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

# Vector maths

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

If you intended to correct an error in the post then please contact us.

## Recommended Posts

I''m not sure about the expansion of a vector dot product and am wondering if any of you maths people can help. I have four vectors v1, v2, v3, v4 and want to get the dot product (v2-v1).(v4-v3) Can anybody tell me if this dot product can be expanded to: v2.v4 - v2.v3 - v1.v4 + v1.v3 I''ve tried this out with numbers and my feeling is that it isn''t a valid expansion - any help would be appreciated on whether this is valid or not, and if not what the correct expansion is (if there is one)? thanks henry

#### Share this post

##### Share on other sites
Advertisement
OK, lets see:
take - v1 = (a1i , a2j , a3k ), v2 = (b1i , b2j , b3k ), v3 = (c1i , c2j , c3k ), v4 = (d1i , d2j , d3k ).

v2 - v1 = ((b1 - a1)i , (b2 - a2)j , (b3 - a3)k )

v4 - v3 = ((d1 - c1)i , (d2 - c2)j , (d3 - c3)k )

(v2 - v1 ).(v4 - v3 ) = (b1 - a1)(d1 - c1) + (b2 - a2)(d2 - c2) + (b2 - a2)(d2 - c2)
(v2 - v1 ).(v4 - v3 ) = b1d1 - b1c1 - a1d1 + a1c1 + b2d2 - b2c2 - a2d2 + a2c2 + b3d3 - b3c3 - a3d3 + a3c3

v2 .v4 - v2 .v3 - v1 .v4 + v1 .v3 = (b1d1 + b2d2 + b3d3) - (b1c1 + b2c2 + b3c3) - (a1d1 + a2d2 + a3d3) + (a1c1 + a2c2 + a3c3)
v2 .v4 - v2 .v3 - v1 .v4 + v1 .v3 = b1d1 - b1c1 - a1d1 + a1c1 + b2d2 - b2c2 - a2d2 + a2c2 + b3d3 - b3c3 - a3d3 + a3c3
v2 .v4 - v2 .v3 - v1 .v4 + v1 .v3 = (v2 - v1 ).(v4 - v3 )

So they are identical.

EDIT: a few bad tags

Enigma
------
...weight, or fail to invite them out...

Edited by - Enigma on December 13, 2001 6:34:56 AM

Edited by - Enigma on December 13, 2001 6:35:49 AM

Edited by - Enigma on December 13, 2001 6:39:49 AM

#### Share this post

##### Share on other sites
Thanks Enigma,

I actually tried that too but didn''t get them to be equal. I see where my algebra went wrong now.

Thanks again

henry

#### Share this post

##### Share on other sites

• Advertisement

### Announcements

• Advertisement

• ### Popular Contributors

1. 1
2. 2
3. 3
4. 4
Rutin
17
5. 5
• Advertisement

• 11
• 37
• 12
• 12
• 11
• ### Forum Statistics

• Total Topics
631414
• Total Posts
2999952
×

## Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!