Archived

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

laeuchli

4D Cross product?

Recommended Posts

Dear All, Can someone point me to a place where I can see the equations for a 4D cross product? I can''t seem to find a spot on the web.. Thanks, Jesse

Share this post


Link to post
Share on other sites
In three dimensions, the cross product can be expressed in terms of a determinant. Extending this to four dimensions suggests:


A validility proof and simplified C source code can be found here.

Share this post


Link to post
Share on other sites
Yep, you can extend the vector product into any dimension you like, as long as it''s greater than 2. You can do the 2 vector cross product in 3 and 7 dimensional space. For everything else you can multiply N-1, N dimensional vectors together, as a vector product. Sort of. The exact proof is on mathworld, and this subject ( with proof ) was posted about 4 months ago, so do a search.

You have to remember that you''re unique, just like everybody else.

Share this post


Link to post
Share on other sites
Actually, you can indeed have a cross product in 2 dimensions! As others pointed out, you need N - 1 vectors to calculate it, so for 3D you need 2 vectors, for 4D you need 3 vectors, and for 2D you need....1 vector! So, turns out, in 2D the cross product of a single vector is simply the normal to that vector. You also need a constraint to make the 2D cross product unique, and you might typically constrain it to be the normal found by rotating counterclockwise by 90 degrees.

Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.

Share this post


Link to post
Share on other sites
quote:
Original post by grhodes_at_work
Actually, you can indeed have a cross product in 2 dimensions! As others pointed out, you need N - 1 vectors to calculate it, so for 3D you need 2 vectors, for 4D you need 3 vectors, and for 2D you need....1 vector! So, turns out, in 2D the cross product of a single vector is simply the normal to that vector. You also need a constraint to make the 2D cross product unique, and you might typically constrain it to be the normal found by rotating counterclockwise by 90 degrees.

Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.


Yes of course, I mean't greater than or equal to two. The trick to find the normal to a 2D vector as:

If V is a vector [x, y] then the normal to that can be [y, -x], can be derived from the cross product determinant as:

| i j |
| x y |


You have to remember that you're unique, just like everybody else.

[edited by - python_regious on January 18, 2004 9:38:54 AM]

Share this post


Link to post
Share on other sites
quote:
Original post by laeuchli
I wouldn't need it for anything, I just noticed that there was a DX3d fucntion that was for a 4D cross product...
Jesse


Wao...
Interesting,really interesting.. i'm wonder if it's work right.



About 2D crossproduct: i was somehow sure that 2d cross product is a scalar....maybe i was wrong...

What with 2D rotor(aka Nabla cross Field)?

also i'm pretty sure that 4d rotor are 6d vector.

[edited by - Dmytry on January 18, 2004 11:12:43 AM]

Share this post


Link to post
Share on other sites
quote:
Original post by Dmytry

About 2D crossproduct: i was somehow sure that 2d cross product is a scalar....maybe i was wrong...

What with 2D rotor(aka Nabla cross Field)?

also i''m pretty sure that 4d rotor are 6d vector.

[edited by - Dmytry on January 18, 2004 11:12:43 AM]


there''s no 2D rotor since there''s only one vector involved in the 2D cross product and the rotor needs 2.

I think you''re referring to a 2D - pseudo - cross-product: set the z coordinate zero and you''ll get a (0,0,z) vector as a result. then there''s the 2D-pseudo-rotor rot V = dVy/dx - dVx/dy.

Share this post


Link to post
Share on other sites
quote:
Original post by Dmytry About 2D crossproduct: i was somehow sure that 2d cross product is a scalar....maybe i was wrong...


I've heard that argument before, but it isn't quite right. The cross product always is the same order vector as the input vector(s). Thus, in 3D we have 2 input 3D vectors (x1,y1,z1) and (x2,y2,z2) that produce a cross product that is also a 3D vector (x3,y3,z3). The cross product here doesn't drop the z component. Same is true in 2D. You only need one input vector, (x1,y1) but the cross product is still a 2D vector (x2,y2).

Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.

[edited by - grhodes_at_work on January 19, 2004 6:03:47 PM]

Share this post


Link to post
Share on other sites
http://www.gamedev.net/community/forums/topic.asp?topic_id=181474

I´d like to add that taking a "cross product" of n vectors in nD it should give you the signed volume of the paralleleptid (if that´s the english name 4 it) created by the vectors.
So the question "is a cross product in 2D a scalar or a vector?" depends on the number of vectors you multiply which imho doesn´t have to be n-1 (at least I haven´t heard anything about a strict definition of THE vector product in other than 3D).

Share this post


Link to post
Share on other sites
Unforunately, the page that described the general cross product ( that extends into any dimension ), isn''t there anymore. Though, I do point you to this thread, where it is sort of summarised, and a quote from the disappeared page:

quote:

Definition (generalized): The cross product of k vectors is a vector
perpendicular to the k vectors and of length equal to the k-volume
of the parallelepiped of the k vectors.

Theorem: The cross product of k vectors in R^n exists only for the following
pairs (n,k): (3,2), (7,2), (8,3), (n,n-1) and when n is even also for (n,1).

Share this post


Link to post
Share on other sites
According to my multivariable calculus professor the crossproduct is defined by the determinate of the matrix containing the basis vectors and the vectors that you are crossing. Since the matrix obviously has to be square, the 2D cross product would have only 1 input vector but output a vector.

Share this post


Link to post
Share on other sites
quote:
Original post by python_regious
Unforunately, the page that described the general cross product ( that extends into any dimension ), isn''t there anymore.
But it is here.

Share this post


Link to post
Share on other sites
Hmmm.

But rotor in 2D are scalar.
And rotor in 4D are 6-D vector.
Why everyone writes "nabla cross field",if so?

I think best idea should be,really ,to define product of M N dimensional vectors,and number of components in resulting vector depend to N and M.

Or else we have problems with operators. Rotor are defined in 2d,3d,4d,5d,etc,and have as many components as many pairs of axises we have

About determinant of a matrix.
In very old book,not "defined as determinant" was written but "it''s simpler to remember as determinant".

Share this post


Link to post
Share on other sites
Dmytry: i think you''re right about rotors, it makes sense that way. you mean the 4D rotor of a vector field V then would be (dVx1/dx0 - dVx0/dx1, -(dVx2/dx0 - dVx0/dx2), dVx3/dx0 - dVx0/dx3, -(dVx2/dx1 - dVx1/dx2), dVx3/dx1 - dVx1/dx3, -(dVx3/dx2 - dVx2/dx3))?

so nabla cross field can only be used in 3D.

Share this post


Link to post
Share on other sites
quote:
Original post by Beer Hunter
quote:
Original post by python_regious
Unforunately, the page that described the general cross product ( that extends into any dimension ), isn''t there anymore.
But it is here.


Hmmm... I tried the original link and it didn''t work. Perhaps my computers buggering up...


You have to remember that you''re unique, just like everybody else.

Share this post


Link to post
Share on other sites
quote:
Original post by ga
Dmytry: i think you''re right about rotors, it makes sense that way. you mean the 4D rotor of a vector field V then would be (dVx1/dx0 - dVx0/dx1, -(dVx2/dx0 - dVx0/dx2), dVx3/dx0 - dVx0/dx3, -(dVx2/dx1 - dVx1/dx2), dVx3/dx1 - dVx1/dx3, -(dVx3/dx2 - dVx2/dx3))?


Exactly.
quote:

so nabla cross field can only be used in 3D.

Maybe you''re right,i got no good idea how to define good cross product of M N-dimensional vectors...

That idea about cross of two vectors only in 3d and 7d,and cross of n-1 vectors anywhere looks too ugly anyway (in 7d,both cross of 2 vectors and cross of 6 vectors are possible-it''s looks too strange).Not like good math-like "dirty hacks" :O .
About that rotor-i never used 4d or 2d cross product(except pseudo-cross product).(but have used 2d rotor

Why cross product of N-dimensional vector(s) SHOULD be N-dimensional vector(s?) ? (i''m joking here ;-)

Share this post


Link to post
Share on other sites