3D Dot / Cross Product

Compute dot and cross product of two 3D vectors.

Open tool

Overview

The 3D Dot and Cross Product Calculator computes both inner-product values for a pair of 3D vectors in one shot. You give it two triples (x, y, z) and it returns the scalar dot product plus the vector cross product, along with magnitudes for context.

This is the workhorse calculation behind 3D rotations, lighting normals, torque, angular velocity and many physics shortcuts. Game developers, robotics students and graphics engineers reach for it constantly when checking out-of-plane orientations or computing surface normals.

How it works

For vectors a = (a1, a2, a3) and b = (b1, b2, b3) the dot product is a . b = a1*b1 + a2*b2 + a3*b3, a single scalar. It equals |a| |b| cos θ, so it tells you about alignment.

The cross product is a x b = (a2*b3 - a3*b2, a3*b1 - a1*b3, a1*b2 - a2*b1). The result is a vector perpendicular to both inputs, with magnitude |a| |b| sin θ — equal to the area of the parallelogram spanned by a and b. Its direction follows the right-hand rule.

Examples

(1, 0, 0) . (0, 1, 0)  →  0  (perpendicular)
(1, 2, 3) . (4, -5, 6)  →  12
(1, 0, 0) x (0, 1, 0)  →  (0, 0, 1)
(1, 2, 3) x (4, 5, 6)  →  (-3, 6, -3)

FAQ

Why are there two products?

The dot product returns a scalar related to alignment; the cross product returns a vector perpendicular to both inputs. They answer different questions.

Is the cross product anti-commutative?

Yes. a x b = -(b x a). Swapping the operands flips the result's direction.

What if the vectors are parallel?

The cross product is the zero vector and the dot product is +|a| |b| (parallel) or -|a| |b| (anti-parallel).

Does the right-hand rule apply?

Yes. Point fingers from a to b through the smaller angle; your thumb gives the direction of a x b.

Can I use 2D vectors?

Set the z-component to zero. The resulting cross product will only have a non-zero z-component, giving the signed area in the xy-plane.

Try 3D Dot / Cross Product

An unhandled error has occurred. Reload ×