The cross product is a function that takes an ordered set of n-1 vectors in n space and produces a vector that is perpendicular to all of them. When two vectors are crossed in 3 space the symbol × is sometimes used as a binary operator, as in a×b. Don't confuse this with the dot product a.b.

To compute cross product, build a square matrix M as follows. Fill in the first n-1 rows of M with the n-1 vectors in the set, in order, and leave the bottom row blank. Now we're ready to compute the last row of M. This vector will be the cross product.

Let Mn,i be the ith cofactor. In other words, ignore the last row and ith column, take the determinant of what remains, and multiply by -1 if necessary. Do this for each column, and the last row of M becomes the cross product. Let's try a 3 dimensional example.

3 3 3 7 0 5 ? ? ?

Compute the three cofactors and find a cross product of (-15,-6,21). You'll notice that this vector, call it v, is perpendicular to the other two. The dot product of v with either the first or second row is 0. Thus the cross product is a handy way to find a vector perpendicular to the plane determined by two other vectors. Let's prove this in general.

Let v be the cross product of n-1 vectors in n space. Now consider the dot product of v and the jth row of M. This is equivalent to taking the determinant of M, with the jth row copied onto the last row. This gives a duplicate row, hence the determinant is 0. Therefore v is perpendicular to all the vectors in the cross product, and the subspace spanned by those vectors.

Let v be the last row of M, so that M is now a basis. Apply a rigid rotation that moves v to the z axis, where z is the last dimension in our vector space. The remaining vectors are still perpendicular to v. Thus M has all zeros in the last row and column, except for Mn,n. Let Mn,n = d. Now d is the subdeterminant of the rest of M. By an earlier theorem, we know this determinant is the volume of the cell spanned by the n-1 vectors within their subspace. The length of the cross product is the volume of the vectors that built it. In our example, the cross product was (-15,-6,21), which has length sqrt(702). You could show that the parallelogram spanned by those two vectors has area sqrt(702) by traditional geometric methods, but it would be much more difficult.

If the vectors are permuted, the cross product might change sign; that's it. This does not change the line determined by the cross product, nor the magnitude of the vector, which indicates volume. Therefore most people don't worry about the order of the vectors. It is often sufficient to say, "Take the cross product of these vectors." But sometimes the sign is important, and when it is, you must remember that a×b is -b×a.

In 3 dimensions, you can move the row of question marks to the top. This is an even permutation of rows, and does not affect the sign. Thus, most text books define cross product with the question marks at the top.

The triple scalar product of three vectors in 3 space is a.b×c. In other words, take the cross product of two of them and dot with the third. Arrange these three vectors in a 3×3 matrix and note that the triple scalar product is the determinant. As an immediate corollary, a.b×c gives the volume of the cell spanned by those three vectors. Also, we can rearrange the three vectors, which simply permutes the rows in the matrix. Thus a.b×c = b.c×a = c.a×b. The three odd permutations multiply the result by -1.