Cross product (outer product)

 

 

The outer product is the dimensionless generalisation of the cross product and is valid not only in 3d. In many ways it is the opposite of the dot (inner) product as it does the reverse of projection: extension. In 2d one vector crossed with another gives the signed area of the parellelogram formed by the extension of one vector by the other. This is useful in backface culling and tells us when our triangles face the "wrong" way:

Two vectors A and B

area = A_x*B_y - A_y*B_x

 

In 3d the outer product (cross product) gives us three separate signed areas, one for each world space axis:

x area = A_y*B_z - A_z*B_y

y area = A_z*B_x +A_x*B_z

z area = A_x*B_y + A_y*B_x

<applet>

You will notice that the z area in 3d is the same equation which gave us the area in 2d.

 

The textbook definition is:

||A x B|| = ||A||*||B||*sin θ

Which says that the magnitude of resultant vector is equal to twice the area of the triangle formed by A B with an implicit missing edge.

 

The cross product also gives us a vector perpendicular to the other two vectors which is useful in all sorts of applications.

Perpendicular P = A x B

The cross product does not preserve magnitude generally, so that two unit vectors A and B crossed will only result in a unit vector C if A and B are at 90o to each other in some plane. Most of the time the resulting vector will be smaller than the two input vectors and indeed, tends toward 0 as the two inputs move towards being parallel.

Interestingly you can also use the cross product operator for projection of a vector onto a plane which is useful in lots of circumstances:, (e.g. in physics when you want to calculate the tangential velocity given a plane and the velocity)

Plane partially defined by normal N

Vector for projection V

New vector Q = (NxV)xN