• Create Account

## Cross product of 2d vectors

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

11 replies to this topic

### #1Endar  Members

668
Like
0Likes
Like

Posted 21 December 2004 - 09:23 PM

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?

### #2harmless  Members

139
Like
0Likes
Like

Posted 21 December 2004 - 09:27 PM

i think you can only do cross product on 3d vectors, but i maybe wrong so wait for other's reply :)

### #3happybara  Members

312
Like
0Likes
Like

Posted 21 December 2004 - 09:31 PM

mathwolrd says:
for two 2d vectors U=(Ux,Uy) V=(Vx,Vy)
the crossproduct is
U x V = Ux*Vy-Uy*Vx

Dolphins - The sharks of the sea.

### #4Endar  Members

668
Like
0Likes
Like

Posted 21 December 2004 - 09:58 PM

Quote:
 Original post by happybaramathwolrd says:for two 2d vectors U=(Ux,Uy) V=(Vx,Vy)the crossproduct isU 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?

### #5Dmytry  Members

1150
Like
0Likes
Like

Posted 21 December 2004 - 11:06 PM

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|

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]

### #6dodecahedron  Members

152
Like
0Likes
Like

Posted 22 December 2004 - 02:24 AM

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.

### #7Puzzler183  Members

540
Like
0Likes
Like

Posted 22 December 2004 - 02:34 AM

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).

### #8Eelco  Members

301
Like
0Likes
Like

Posted 22 December 2004 - 05:25 AM

yeah its kinda weird that its so badly defined.
Quote:
 Original post by Puzzler183In 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.

### #9ajas95  Members

767
Like
0Likes
Like

Posted 22 December 2004 - 05:41 AM

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)

### #10Dmytry  Members

1150
Like
0Likes
Like

Posted 22 December 2004 - 05:53 AM

Quote:
 Original post by ajas95SomeFunction(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)

### #11johnb  Members

351
Like
0Likes
Like

Posted 22 December 2004 - 08:09 AM

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.

### #12Dmytry  Members

1150
Like
0Likes
Like

Posted 22 December 2004 - 09:34 PM

as about "SomeFunction", i just accidently found that it's named Scalar triple product , just haven't remembered before.

[Edited by - Dmytry on December 23, 2004 4:34:12 AM]

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.