Sign in to follow this  
Endar

Cross product of 2d vectors

Recommended Posts

Endar    668
Last night, I was wondering how I get an equation for the cross product of 2 2d vectors. But, I'm a little confused. See, with 3d vectors, I put them into a matrix and found it: -- -- | x y z | | Ax Ay Az | | Bx By Bz | -- -- Where A and B are 3d vectors, the determinant for x is the x vector component for the corss product of the two, the determinant for y, etc, etc. But I'm a little confused how to do it for 2d vectors. -- -- | x y | | Ax Ay | | Bx By | -- -- Because I only learnt how to do the determinant in 3d, I'm a little lost. Would the cross product equation be: (Ay - By), (Ax - Bx) ? Or am I real far off the track?

Share this post


Link to post
Share on other sites
Endar    668
Quote:
Original post by happybara
mathwolrd says:
for two 2d vectors U=(Ux,Uy) V=(Vx,Vy)
the crossproduct is
U x V = Ux*Vy-Uy*Vx



Okay, maybe I'm missing something here, but doens't a cross product between two vectors with the same number of components give you another vector with that number of components?

Share this post


Link to post
Share on other sites
Dmytry    1151
Quote:

Okay, maybe I'm missing something here, but doens't a cross product between two vectors with the same number of components give you another vector with that number of components?

In 3D only. In other dimensions, cross product is not well defined, but there is well-defined analogs.

In any other number of dimensions >=2, there's at least 2 different cross-product "analogs", depending to what properties of 3D cross product we want it to mimic. And 3D is just only special case when both things is the same... and there's many other useful functions possible, that is somewhat like cross product...

In 2D,
CrossProductAnalog1(U,V)=(U.x*V.y-U.y*V.x)
CrossProductAnalog2(U)=(U.y, -U.x)
(yes, second analog takes only one argument, and return orthogonal vector :)
First analog makes some physical and geometrical sense, second analog comes from "determinant rule", for determinant of 2x2 matrix,
|A B|
|C D| = AD-BC


And in 4D, there is one analog that takes 2 4D vectors at input and return 6D vector as result. And other analog that takes 3 4D vectors, and have 4D vector as result. (3 vectors is necessary to define volume, and returned result is "normal of that volume" [grin])

Also, in 3D we can define another nice operation that takes 3 vectors at inputs, and return scalar, and is eqivalent to first 2D cross product analog.

SomeFunction(A,B,C)=(A x B . C)
- return volume of paralelepiped(sp?)
(note that order of operands does not matter...)

in summary,
1: 2D cross product is not defined by itself. In general, there's several analogs, and no analogs is completely equivalent.

2: you can define whatever function you *really* need and can use, and then use it.
3:It is not useful to make cross product routine if you don't know it's properties.

Also, "analog" doesn't really have any mathematical sense, just some properties is somewhat similar.

[Edited by - Dmytry on December 22, 2004 5:06:18 AM]

Share this post


Link to post
Share on other sites
dodecahedron    152
my 0.02 cents is that the cross product can be considered with an alternating covariant n-tensor (n-form), I believe. In this sense it can be defined in n-space always to return a single n-dimensional vector.

C.

Share this post


Link to post
Share on other sites
Puzzler183    540
In general, for an n-dimensional cross product, you need n - 1 vectors (so that the vector orthogonal to them all can be found. For 3 dimensions, this makes it look nice since you have only two operands. Note that this is also implemented in Mathematica this way.

Using the 2D cross product where you get (U.x*V.y-U.y*V.x) is just like doing a 3D one where the Z components are 0. However, the generalized definition does indeed give you (U.y, -U.x).

Share this post


Link to post
Share on other sites
Eelco    301
yeah its kinda weird that its so badly defined.
Quote:
Original post by Puzzler183
In general, for an n-dimensional cross product, you need n - 1 vectors (so that the vector orthogonal to them all can be found. For 3 dimensions, this makes it look nice since you have only two operands. Note that this is also implemented in Mathematica this way.

thats the definition i prefer also. its nice and consistent. the crossproduct returns a vector ortogonal to all n-1 input vectors. doesnt get any better imho.

Quote:

Using the 2D cross product where you get (U.x*V.y-U.y*V.x) is just like doing a 3D one where the Z components are 0. However, the generalized definition does indeed give you (U.y, -U.x).

this other definiton makes little sense to me. the only reason for its existance seems to be the irrational need for two operands, like were used to in 3d. but making this the definition for crossproduct in 2d is useless, because youre just giving another name to an already existing procedure: finding the span/calculating the determinant of a set of vectors. it has the same definition.

Share this post


Link to post
Share on other sites
ajas95    767
SomeFunction(A,B,C)=(A x B . C)
- return volume of paralelepiped(sp?)
(note that order of operands does not matter...)


Dmytry: by 'SomeFunction', you mean 'determinant' right? :)
And operand order doesn't matter, as long as they keep the same winding... i.e. dat(A,B,C) == det(B,C,A) != det(C,B,A)

Share this post


Link to post
Share on other sites
Dmytry    1151
Quote:
Original post by ajas95
SomeFunction(A,B,C)=(A x B . C)
- return volume of paralelepiped(sp?)
(note that order of operands does not matter...)


Dmytry: by 'SomeFunction', you mean 'determinant' right? :)
And operand order doesn't matter, as long as they keep the same winding... i.e. dat(A,B,C) == det(B,C,A) != det(C,B,A)

yes, determinant of course.
i'd say more,
dat(A,B,C) == det(B,C,A) == -det(C,B,A)

Share this post


Link to post
Share on other sites
johnb    351
If by "cross product" you mean "bi-linear anti-commutative product with non-trivial result in the space of vectors" it only exists in three and seven dimensions. The seven dimensional version is related to the mathematics of octions. Trivial versions can be defined in 1 and 0 dimensions. It can be proved they don't exist in other dimensions.

In other dimensions there are related products but their results are not vectors. E.g. in 2D you can define a bi-linear anti-commutative product with a 1D scalar result. It gives the area of the parallelogram with the two vectors for sides. In 4D a similar calculation yields a 6D result. An example is Plucker coordinates, where the product is calculated on 4D homogeneous coordinates.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this