The Cross Product
A product of two vectors in three dimensions that yields a third vector perpendicular to both.
Definition
The cross product a x b of two vectors in R^3 is a vector perpendicular to both a and b, with magnitude |a| |b| sin(theta) equal to the area of the parallelogram they span, and direction given by the right-hand rule. Unlike the dot product, whose output is a scalar, the cross product outputs a vector, and it exists in its standard form only in three dimensions.
Component formula
If a = (a1, a2, a3) and b = (b1, b2, b3), then a x b = (a2 b3 - a3 b2, a3 b1 - a1 b3, a1 b2 - a2 b1). This can be remembered as the symbolic determinant of a 3-by-3 matrix whose first row holds the unit vectors i, j, k and whose next rows hold the components of a and b.
Properties
- anticommutative: a x b = -(b x a)
- a x a = 0 for every vector a
- distributive over addition
- not associative in general
- a x b = 0 exactly when a and b are parallel
The triple products
The scalar triple product a . (b x c) equals the signed volume of the parallelepiped spanned by the three vectors, and it is also the determinant of the matrix with those vectors as rows. The vector triple product a x (b x c) expands by the BAC-CAB rule to b(a . c) - c(a . b).
import numpy as np
a = np.array([1.0, 0.0, 0.0])
b = np.array([0.0, 1.0, 0.0])
print(np.cross(a, b)) # [0. 0. 1.] the z-axis
The cross product is fundamental to electromagnetism: the Lorentz force on a charged particle is q v x B, the mechanism that confines charged particles in the magnetic fields of the breeder Hyperion and the burner's tandem-mirror plug.