HomeMath › Cross Product Calculator

Cross Product Calculator

Compute the cross product of two 3D vectors. Enter the x, y and z components of vector a and vector b to get a x b, its magnitude (the parallelogram area), and the triangle area.

Example: with a: x 2 · a: y 3 · a: z 4 · b: x 5 · b: y 6 → Cross product a x b: (-3, 6, -3).

  • Magnitude |a x b|7.3485 (parallelogram area)
  • Triangle area3.6742 (triangle area)

Computed by the calculator below using its default values. Change any input to see your own numbers.

Cross product a x b
Magnitude |a x b|
Triangle area

a x b = (ay·bz − az·by, az·bx − ax·bz, ax·by − ay·bx). The result is perpendicular to both inputs, and its length equals the area of the parallelogram they form.

A vector perpendicular to both

The cross product of two 3D vectors returns a third vector at right angles to both. Its direction follows the right-hand rule: point your fingers from a toward b and your thumb gives the direction of a x b. Swapping the order flips the sign, so b x a points the opposite way.

The length is what makes it useful for geometry: |a x b| equals the area of the parallelogram the two vectors span, and half of that is the area of the triangle. When the vectors are parallel the cross product is the zero vector, because a flat parallelogram has no area.

How it’s calculated

a x b = (ay·bz − az·by, az·bx − ax·bz, ax·by − ay·bx), the expansion of the 3x3 determinant with i, j, k in the top row. The magnitude |a x b| = √(cx²+cy²+cz²) equals |a||b|sinθ and the parallelogram area; the triangle area is half of it.

Defined only for three-dimensional vectors and a right-handed coordinate system. A 2D cross product would return just the scalar z term.

Cross products of unit and sample vectors

aba x b|a x b|
i (1,0,0)j (0,1,0)k (0,0,1)1
j (0,1,0)k (0,0,1)i (1,0,0)1
(2,3,4)(5,6,7)(-3,6,-3)7.35
(1,0,0)(2,0,0)(0,0,0)0

Computed from the determinant formula; parallel vectors give the zero vector.

Common mistakes

  • Reversing the order — a x b and b x a differ by a sign.
  • Expecting a number: the cross product of 3D vectors is a vector, not a scalar (that is the dot product).
  • Sign slips in the middle term, which is az·bx − ax·bz, not ax·bz − az·bx.
  • Trying to cross two 2D vectors directly instead of treating z as 0.

Frequently asked questions

What is the cross product formula?

a x b = (ay·bz − az·by, az·bx − ax·bz, ax·by − ay·bx). It comes from expanding the 3x3 determinant with the unit vectors i, j, k in the first row.

What does the magnitude of the cross product mean?

|a x b| equals |a||b|sinθ, which is the area of the parallelogram spanned by the two vectors. Half of it is the area of the triangle.

How is the cross product different from the dot product?

The dot product returns a single number and measures alignment; the cross product returns a vector perpendicular to both inputs and measures the area they span.

Why is my cross product the zero vector?

The two vectors are parallel or one is zero. Parallel vectors span no area, so their cross product has zero length.