MathIsimple
Vector Algebra

Cross Product Calculator

Compute 3D vector cross product, magnitude, and direction with step-by-step determinant expansion.

100% FreeLinear AlgebraWith Steps
Cross Product Calculator
Enter components for vectors a and b
Enter to calculate, Esc to clear
3D Vector Geometry
Illustrating the cross product as a perpendicular vector using the right-hand rule

Vectors a (blue) and b (violet) span a parallelogram (shaded). Their cross product a×b (indigo) points perpendicular to that plane. The magnitude of a×b equals the parallelogram area.

Axes guide: x and y are diagonal axes, z points upward from the origin.

Color map: blue = a, violet = b, indigo = a x b. Area relation: |a x b|.

Quick Examples
Click to auto-fill and try these calculations
Cross Product Quick Answer
If you need a×b\vec{a}\times\vec{b} fast: plug both 3D vectors into the calculator and read the result vector plus magnitude. The direction tells you the perpendicular axis by the right-hand rule, and the magnitude gives the area of the parallelogram formed by the two vectors. This is exactly what you need for torque, normals in 3D graphics, and orientation checks in geometry problems.
What is the Cross Product?
Geometric interpretation, formula components, and key properties

The cross product is a binary operation on two three-dimensional vectors that produces a third vector perpendicular to both inputs. Unlike the dot product — which collapses two vectors into a scalar by measuring how parallel they are — the cross product preserves directional information and measures how much the vectors span a plane. The result vector points orthogonally out of that plane, with its direction determined by the right-hand rule.

To apply the right-hand rule: point your fingers along the first vector a, curl them toward the second vector b (taking the short way around), and your extended thumb points in the direction of a × b. Reversing the order — computing b × a — points your thumb in the opposite direction, confirming anti-commutativity:

a×b=(b×a)\vec{a} \times \vec{b} = -(\vec{b} \times \vec{a})

The component formula is derived by expanding the 3×3 determinant with unit vectors i, j, k in the first row. Given a = (a₁, a₂, a₃) and b = (b₁, b₂, b₃):

  • i-component: a₂b₃ − a₃b₂
  • j-component: a₃b₁ − a₁b₃
  • k-component: a₁b₂ − a₂b₁

A critical edge case occurs when the two vectors are parallel or anti-parallel: the cross product becomes the zero vector. Intuitively, parallel vectors span a line rather than a plane, so there is no well-defined perpendicular direction and no enclosed area. The magnitude formula confirms this directly:

a×b=absinθ\|\vec{a} \times \vec{b}\| = \|\vec{a}\|\|\vec{b}\|\sin\theta

Since sin0=sin180=0\sin 0^\circ = \sin 180^\circ = 0, any pair of collinear vectors yields a zero cross product. Detecting this is a useful test for collinearity — two edges in a mesh that share a vertex and produce a zero cross product lie along the same line and define a degenerate triangle.

Applications of Cross Products
Physics, computer graphics, robotics, and engineering

The cross product appears throughout physics and engineering wherever rotation, perpendicularity, or area must be computed in three dimensions. Its most fundamental physical application is torque: when a force F is applied at position r relative to a pivot:

τ=r×F\vec{\tau} = \vec{r} \times \vec{F}

The magnitude rFsinθ\|\vec{r}\|\|\vec{F}\|\sin\theta explains why pushing a wrench at its far end (maximizing r\|\vec{r}\|) and perpendicular to the handle (maximizing sinθ=1\sin\theta = 1) produces the greatest rotational effect.

In computer graphics, surface normals are computed via the cross product of two edge vectors of a triangle. Given vertices P₀, P₁, P₂:

n=(P1P0)×(P2P0)\vec{n} = (P_1 - P_0) \times (P_2 - P_0)

This normal is essential for lighting calculations: Phong and Lambertian shading compute surface brightness as the dot product of the normal with the light direction, so an incorrect normal produces inverted or flat-looking surfaces.

Robotics and kinematics rely on cross products to compute angular velocity and rotation axes. When a rigid body rotates, the velocity of any point r on the body is v=ω×r\vec{v} = \vec{\omega} \times \vec{r}, where ω\vec{\omega} is the angular velocity vector pointing along the rotation axis. This relationship drives inverse kinematics solvers, Jacobian matrix construction, and the simulation of articulated robot arms.

For area workflows, half the cross-product magnitude gives triangle area:

Area=12e1×e2\text{Area}_{\triangle} = \frac{1}{2}\|\vec{e_1} \times \vec{e_2}\|
How To Interpret Cross Product Results
Use direction and magnitude together instead of reading only one part.

The vector A×B\vec{A} \times \vec{B} gives you two pieces of information at once: orientation in space and effective area. The direction is perpendicular to both inputs and follows the right-hand rule, while the magnitude tells you how strongly the two vectors span a plane.

A×B=ABsinθ\left\|\vec{A} \times \vec{B}\right\| = \left\|\vec{A}\right\|\left\|\vec{B}\right\|\sin\theta

This formula is practical for diagnostics. If you know both vector lengths and your computed cross-product magnitude is unexpectedly small, your vectors are close to parallel because sinθ\sin\theta is small near 00^\circ and 180180^\circ. If the magnitude is large, the vectors are closer to perpendicular, which is usually the most stable setup for geometric and engineering calculations.

A frequent mistake is to treat sign changes as numerical noise. Changing the order of vectors reverses direction exactly:

A×B=(B×A)\vec{A} \times \vec{B} = -\left(\vec{B} \times \vec{A}\right)

If your result points opposite to expectation, check vector order first before debugging arithmetic. In code, this manifests as accidentally swapping the two edge vectors when computing a surface normal, producing a face that appears lit from the wrong side.

Finally, the determinant expansion is the most reliable hand-calculation method. Arrange the 3×3 matrix with i,j,k\mathbf{i}, \mathbf{j}, \mathbf{k} in row 1, components of A\vec{A} in row 2, and components of B\vec{B} in row 3. Expand along row 1 using cofactor signs (+, −, +). Each 2×2 minor gives one component. This method scales cleanly to symbolic computation and is the basis of every computer algebra system implementation.

Further Reading & Resources

Two Arrows in Space — and a Third One Pointing Straight Up

Multiply two numbers and you get a number. Multiply two vectors and you get... another vector, perpendicular to both of them.

That sounds like math inventing rules for its own convenience. But the cross product captures something physically real: the axis of rotation when two directions interact.

Push a wrench to the right. The bolt turns — but in which direction, clockwise or counterclockwise? The answer depends on which way the cross product of "force direction" and "lever arm direction" points. That's torque. The same operation runs through angular momentum, magnetic force, and 3D surface orientation in computer graphics.

The first time this mattered outside a textbook: a 3D renderer with lighting completely backwards. Faces that should have been bright appeared dark; shadowed ones were lit. One swapped vertex order — a×b\mathbf{a} \times \mathbf{b} instead of b×a\mathbf{b} \times \mathbf{a} — had flipped every surface normal inward. Two hours to diagnose. One-character fix. The anti-commutative property is not abstract algebra trivia.

The Right-Hand Rule: A Physical Intuition

Given two vectors a\mathbf{a} and b\mathbf{b}, the cross product a×b\mathbf{a} \times \mathbf{b} is perpendicular to both. To find which way it points:

  1. Point your right-hand fingers along a\mathbf{a}
  2. Curl them toward b\mathbf{b}
  3. Your thumb points in the direction of a×b\mathbf{a} \times \mathbf{b}

Switch the order — compute b×a\mathbf{b} \times \mathbf{a} instead — and your thumb points the opposite direction. Cross products are anti-commutative:

a×b=(b×a)\mathbf{a} \times \mathbf{b} = -(\mathbf{b} \times \mathbf{a})

This isn't a quirk. The order encodes direction — it's the whole point. When you tighten a standard bolt (right-hand thread), you're applying a cross product with a specific handedness.

The Formula: A 3×3 Determinant

For vectors a=a1,a2,a3\mathbf{a} = \langle a_1, a_2, a_3 \rangle and b=b1,b2,b3\mathbf{b} = \langle b_1, b_2, b_3 \rangle, the cross product is computed using the determinant structure:

a×b=ijka1a2a3b1b2b3\mathbf{a} \times \mathbf{b} = \begin{vmatrix} \mathbf{i} & \mathbf{j} & \mathbf{k} \\ a_1 & a_2 & a_3 \\ b_1 & b_2 & b_3 \end{vmatrix}

Expanding this determinant gives:

a×b=a2b3a3b2,  a3b1a1b3,  a1b2a2b1\mathbf{a} \times \mathbf{b} = \langle a_2 b_3 - a_3 b_2,\; a_3 b_1 - a_1 b_3,\; a_1 b_2 - a_2 b_1 \rangle

Let's run a concrete example. Let a=1,2,3\mathbf{a} = \langle 1, 2, 3 \rangle and b=4,5,6\mathbf{b} = \langle 4, 5, 6 \rangle:

a×b=(2)(6)(3)(5),  (3)(4)(1)(6),  (1)(5)(2)(4)\mathbf{a} \times \mathbf{b} = \langle (2)(6)-(3)(5),\; (3)(4)-(1)(6),\; (1)(5)-(2)(4) \rangle
=1215,  126,  58=3,6,3= \langle 12-15,\; 12-6,\; 5-8 \rangle = \langle -3, 6, -3 \rangle

Sanity check: the result should be perpendicular to both inputs. Verify with dot products — both should be zero. 3,6,31,2,3=3+129=0\langle -3,6,-3\rangle \cdot \langle 1,2,3\rangle = -3+12-9 = 0. Confirmed.

Magnitude = Area of the Parallelogram They Span

The cross product has a clean geometric interpretation. Two vectors form a parallelogram. The area of that parallelogram equals the magnitude of their cross product:

a×b=absinθ|\mathbf{a} \times \mathbf{b}| = |\mathbf{a}||\mathbf{b}|\sin\theta

When θ=0°\theta = 0° — the vectors are parallel — sin(0)=0\sin(0) = 0, so the cross product is the zero vector. A parallelogram with two parallel sides has zero area. Makes sense.

When θ=90°\theta = 90° — the vectors are perpendicular — sin(90°)=1\sin(90°) = 1, and the cross product has its maximum magnitude. A rectangle (perpendicular sides) maximizes parallelogram area for given side lengths.

Area shortcut: need the area of a triangle with vertices at three 3D points? Find two edge vectors, compute their cross product, take half the magnitude.

Where It Shows Up

The cross product isn't confined to math courses.

Torque is defined as τ=r×F\boldsymbol{\tau} = \mathbf{r} \times \mathbf{F}, where r\mathbf{r} is the position vector from the pivot and F\mathbf{F} is the force. Longer lever arm, same force → larger cross product → more torque. The direction of the torque vector (clockwise vs. counterclockwise) comes from the right-hand rule.

With actual numbers: a 0.3 m wrench with 50 N of perpendicular force gives τ=0.3×50×sin(90°)=15|\boldsymbol{\tau}| = 0.3 \times 50 \times \sin(90°) = 15 N·m. Grip the same wrench at 30° off-perpendicular and you get 0.3×50×sin(30°)=7.50.3 \times 50 \times \sin(30°) = 7.5 N·m — same force, half the rotational effect. The sin factor in the cross product magnitude formula is what handles that. It measures how perpendicular the two vectors actually are.

Surface normals in 3D graphics define which way a polygon's face points — critical for lighting calculations. Given two edges of a triangle, their cross product gives the normal vector. Flip the vertex order and the normal reverses, which changes whether the triangle is visible from the camera or culled as back-facing. Most rendering pipelines treat counter-clockwise vertex winding (from the camera's perspective) as "front-facing" — the cross product is how the GPU makes that determination, per triangle, every frame.

Magnetic force on a moving charge is F=q(v×B)\mathbf{F} = q(\mathbf{v} \times \mathbf{B}). The force is perpendicular to both the velocity and the magnetic field — a cross product — which is why charged particles in magnetic fields travel in circles.

The matrix determinant article goes deeper into why the 3×3 determinant structure works — the cross product formula is actually using the same cofactor expansion.

Two Edge Cases Worth Knowing

When two vectors are parallel — pointing in the same direction or exactly opposite — their cross product is the zero vector. The parallelogram they span has zero area. In physics: a force applied directly along the lever arm produces no torque. In graphics: two collinear edges produce no usable surface normal, meaning the triangle is degenerate and effectively unrenderable. Encountering a zero cross product is always a signal that the inputs are aligned in a way the operation can't meaningfully act on.

A less-known fact: the cross product only works in 3D and 7D. In any other number of dimensions, it's mathematically impossible to define a multiplication returning a perpendicular vector with the same algebraic properties. 7D cross products exist and satisfy the same identities, but you won't encounter them outside abstract algebra and certain theoretical physics. For everything practical — torque, surface normals, magnetic force — you're in 3D.

Worth Knowing Before You Calculate

Why doesn't the cross product work in 2D?

In 2D, there's no third dimension for the perpendicular vector to point into. The 2D analog gives a scalar (not a vector) equal to a1b2a2b1a_1 b_2 - a_2 b_1 — this is the z-component of the 3D cross product and equals the area of the 2D parallelogram.

What does it mean when two vectors are parallel and their cross product is zero?

Parallel vectors don't span a plane — they define a line. The parallelogram they form has zero area, so the cross product is the zero vector. In graphics, this is a degenerate triangle (all points on one line) with no meaningful normal. In mechanics, parallel force and lever arm means no torque.

How is cross product different from dot product?

Dot product produces a scalar and measures how much two vectors point in the same direction (ab=abcosθ\mathbf{a} \cdot \mathbf{b} = |\mathbf{a}||\mathbf{b}|\cos\theta). Cross product produces a perpendicular vector and measures how much they span a plane (a×b=absinθ|\mathbf{a} \times \mathbf{b}| = |\mathbf{a}||\mathbf{b}|\sin\theta). One uses cosine, the other sine — they're complementary tools.

Can I use the cross product in 2D geometry problems?

Sort of. Applying the 3D formula to 2D vectors (with z = 0) gives a result with only a z-component: a1b2a2b1a_1 b_2 - a_2 b_1. This scalar equals the signed area of the 2D parallelogram — positive if counterclockwise, negative if clockwise. It's useful for testing whether a point is to the left or right of a directed line, and for computing polygon areas via the shoelace formula. Many 2D geometry libraries expose this as a "cross product" function that returns a number rather than a vector.

Compute Any Cross Product Instantly

Enter two 3D vectors and get the cross product, its magnitude, the angle between vectors, and the parallelogram area — with full step-by-step work shown.

*Also verifies perpendicularity via dot product check.

Frequently Asked Questions

How do you calculate the cross product step by step?
Write a 3×3 matrix with unit vectors i, j, k in row 1, vector A components in row 2, and vector B components in row 3. Expand along row 1: i-component (a₂b₃ − a₃b₂), j-component −(a₁b₃ − a₃b₁), k-component (a₁b₂ − a₂b₁). Combine to get the resulting vector.
What does a zero cross product mean?
A zero cross product means the two vectors are parallel (or anti-parallel), or one of them is the zero vector. Parallel vectors span no area, so there is no well-defined perpendicular direction.
Why is the cross product anti-commutative?
Swapping the two vectors reverses the determinant expansion, which negates all three components. Geometrically, the right-hand rule points in the opposite direction, so a × b = −(b × a).
What is the relationship between cross product magnitude and area?
The magnitude |a × b| equals the area of the parallelogram formed by vectors a and b. Half of that is the area of the triangle they define — a fact used in computer graphics, physics, and computational geometry.
Can the cross product be used in 2D?
The standard cross product is defined only in 3D. A 2D analogue exists: for 2D vectors a = (a₁, a₂) and b = (b₁, b₂), the scalar a₁b₂ − a₂b₁ gives the signed area of the parallelogram they span — useful for orientation tests.
How is the cross product used in physics?
The cross product is central to torque (τ = r × F), angular momentum (L = r × p), the magnetic force on a moving charge (F = q·v × B), and the velocity of a rotating rigid body (v = ω × r).
Advertisement