Cross Product Calculator

Cross product (A × B)
Next

The cross product of two 3D vectors returns a third vector that is perpendicular to both of them. Its length equals the area of the parallelogram the two vectors span, and its direction follows the right-hand rule. This makes it essential for surface normals in 3D graphics, torque and angular momentum in physics, and any geometry that needs a perpendicular direction. Enter the components of vectors A and B and this tool returns A × B as (x, y, z) plus its magnitude, updating the result as you type.

How to compute a cross product

  1. 1

    Enter Vector A

    Type the three components ax, ay and az of the first vector.

  2. 2

    Enter Vector B

    Type the three components bx, by and bz of the second vector.

  3. 3

    Read the result

    The perpendicular vector A × B is shown as (x, y, z), together with its magnitude.

The formula

For vectors A = (ax, ay, az) and B = (bx, by, bz), the cross product is:

A × B = (ay·bz − az·by, az·bx − ax·bz, ax·by − ay·bx)

Each component is a 2×2 determinant of the other two axes, with the middle term sign-flipped. A handy memory aid is the determinant expansion along the unit vectors i, j, k.

Worked example

Take A = (1, 2, 3) and B = (4, 5, 6):

  • x: ay·bz − az·by = 2·6 − 3·5 = 12 − 15 = −3
  • y: az·bx − ax·bz = 3·4 − 1·6 = 12 − 6 = 6
  • z: ax·by − ay·bx = 1·5 − 2·4 = 5 − 8 = −3

So A × B = (−3, 6, −3). Its magnitude is √((−3)² + 6² + (−3)²) = √54 ≈ 7.348. You can verify the result is perpendicular: A·(A × B) = 1·(−3) + 2·6 + 3·(−3) = 0. ✓

Key properties

Property Statement
Anticommutative A × B = −(B × A)
Parallel inputs A × A = 0 (and any parallel pair gives 0)
Magnitude |A × B| = |A| · |B| · sin(θ)
Perpendicular (A × B) ⊥ A and (A × B) ⊥ B
Direction Right-hand rule from A toward B

Common pitfalls

  • Order matters. Swapping the inputs flips the sign of every component, because the cross product is anticommutative.
  • Cross product is 3D-only. Unlike the dot product, A × B is defined for three-dimensional vectors (a 7D analogue exists but is rarely used). For 2D vectors, pad the missing z with 0.
  • Sign of the middle term. The y component is az·bx − ax·bz, not ax·bz − az·bx, the j term is subtracted in the determinant expansion, which is where most by-hand mistakes happen.
  • Parallel vectors give zero. If A and B point the same way (θ = 0) the result is the zero vector, since sin(0) = 0.

Frequently Asked Questions

The dot product returns a single number (a scalar) and measures how parallel two vectors are. The cross product returns a vector perpendicular to both inputs and measures how perpendicular they are. They answer opposite questions.

Not directly, the cross product is defined for 3D vectors. For two 2D vectors you can set the z component to 0; the result then has only a z component equal to ax·by − ay·bx, often called the “2D cross product” or signed area.

The magnitude equals the area of the parallelogram spanned by the two vectors, and it is also |A| · |B| · sin(θ), where θ is the angle between them. Half of it is the area of the triangle formed by A and B.

No. The components are sent to the server only to run the calculation and are never stored in a database or kept after the page closes.

Related Tools