Cross Product Calculator

A × B, its magnitude, the dot product, and the angle between two 3D vectors.

A × B(0.0000, 0.0000, 1.0000)|A × B| = 1.0000
A · B0.0000
Angle90.00°
|A|1.0000
|B|1.0000

A · B = AxBx + AyBy + AzBz. cos θ = (A · B) / (|A||B|). A × B = (AyBz − AzBy, AzBx − AxBz, AxBy − AyBx).

This cross product calculator returns A x B for two 3D vectors, along with its magnitude, the dot product, both vector lengths, and the angle between them. The result is a vector perpendicular to both inputs — that is the whole point of the operation, and the reason it shows up in torque, surface normals, and rotational physics.

Below: the determinant formula with a worked example, the right-hand rule, when the answer is the zero vector, and how the cross product differs from the dot product — the confusion that costs marks in every linear algebra course.

How to calculate a cross product

  1. Write A = (2, 3, 4) and B = (5, 6, 7).
  2. x component = a2b3 - a3b2 = 3x7 - 4x6 = -3.
  3. y component = a3b1 - a1b3 = 4x5 - 2x7 = 6.
  4. z component = a1b2 - a2b1 = 2x6 - 3x5 = -3.
  5. Result: A x B = (-3, 6, -3).
  6. Magnitude = root(9 + 36 + 9) = root 54 = 7.3485, which is also the area of the parallelogram spanned by A and B.

Example

A = (2, 3, 4) and B = (5, 6, 7) give (-3, 6, -3). Check: A dot (A x B) = -6 + 18 - 12 = 0, so the result really is perpendicular to A. The magnitude is 7.3485, the dot product is 56, and with |A| = 5.385 and |B| = 10.488 the angle is 7.49 degrees.

Cross product formula

A x B = (a2b3 - a3b2, a3b1 - a1b3, a1b2 - a2b1). |A x B| = |A| |B| sin(theta).

How to use this calculator

  1. Enter the x, y, and z components of A and B.
  2. Read A x B in the result box.
  3. The magnitude below it is the area of the parallelogram the two vectors span.
  4. The four tiles give the dot product, the angle, and each vector's length.
  5. Try two parallel vectors to see the degenerate case — the cross product collapses to (0, 0, 0).

Cross product vs dot product

Both are products of two vectors and both use the angle between them. One returns a direction, the other a number. Work — force times distance along the force — is a dot product. Torque — force times lever arm — is a cross product.

PropertyCross productDot product
ResultA vectorA scalar
Formula|A||B| sin(theta) n|A||B| cos(theta)
Zero whenThe vectors are parallelThe vectors are perpendicular
DirectionPerpendicular to both, by the right-hand ruleNo direction
Typical useTorque, normals, angular momentumWork, projection, angle

The right-hand rule

Point your right index finger along A and curl it toward B; your thumb points along A x B. Swap the inputs and the thumb flips, which is the origin of the most important property of this operation: A x B = -(B x A). The cross product is anti-commutative, not commutative.

For the basis vectors: i x j = k, j x k = i, k x i = j, and reversing any pair flips the sign, so j x i = -k. That cycle is why the cross product is usually taught as a determinant with i, j, k in the top row.

Reading the magnitude as area

|A x B| equals the area of the parallelogram with sides A and B. Half of it is the area of the triangle with vertices at the origin, A, and B — which makes ½|A x B| the fastest way to get the area of a triangle in 3D.

Because |A x B| = |A||B| sin(theta), the result never exceeds |A||B|, and it shrinks toward zero as the vectors rotate toward each other. Two vectors at 90 degrees give the largest cross product their lengths allow.

When the answer is zero

A x B = (0, 0, 0) if and only if A and B are parallel, including the case where either is the zero vector. This is the exact counterpart of the dot product being zero for perpendicular vectors, and mixing the two up is the most common error in exam answers.

It also gives a one-line test for collinearity: points P, Q, and R lie on a line exactly when (Q - P) x (R - P) = 0.

The 2D cross product

In two dimensions the cross product is a scalar, not a vector: A x B = a1b2 - a2b1. It is the z component of the 3D result when both vectors lie in the xy-plane, and its sign gives the turn direction — positive for counter-clockwise from A to B, negative for clockwise. Its absolute value is the parallelogram area, same as in 3D.

Common mistakes

  • Computing B x A when the question asks for A x B. Every component changes sign.
  • Using a cross product where a dot product was needed, or the reverse. Ask what type the answer should be: vector or scalar.
  • Dropping the sign on the middle term. The y component is a3b1 - a1b3, not a1b3 - a3b1.
  • Reporting the magnitude when the question asks for the vector, or the vector when it asks for the area.

FAQ

How do you calculate the cross product of two vectors?

A x B = (a2b3 - a3b2, a3b1 - a1b3, a1b2 - a2b1). Equivalently, expand the 3x3 determinant with i, j, k in the top row.

Is the cross product commutative?

No. A x B = -(B x A). Swapping the inputs flips the direction of the result.

What does a cross product of zero mean?

The vectors are parallel, or one of them is the zero vector. The area they span is zero.

What is the difference between cross product and dot product?

The cross product returns a vector perpendicular to both inputs; the dot product returns a scalar. Cross uses sine, dot uses cosine.

What is the cross product of i and j?

(0, 0, 1) = k. The cycle is i x j = k, j x k = i, k x i = j.

How do you find the angle between two vectors?

cos(theta) = (A dot B) / (|A||B|), or sin(theta) = |A x B| / (|A||B|). Both work; the dot product is more accurate for angles near 0 and 180 degrees.

Can you take a cross product in 2D?

Only as a scalar: a1b2 - a2b1, the signed area of the parallelogram. The vector version requires three dimensions.

What is the magnitude of a cross product used for?

It is the area of the parallelogram spanned by the two vectors, and twice the area of the triangle they form with the origin.

Why is the cross product perpendicular to both vectors?

By construction — it is the normal to the plane the two vectors define. The right-hand rule fixes which of the two normals you get.

Related calculators