ES EN FR PT DE IT

Cross Product Calculator

Calculate the cross product of two 3D vectors and its magnitude.

The Cross Product Calculator is a free online math calculator. Calculate the cross product of two 3D vectors and its magnitude. Get instant results with the detailed formula and step-by-step examples.
Inputs
Values
Result
Enter values and press Calculate

What Is Cross Product Calculator?

Cross Product Calculator computes the vector product of two 3D vectors — a new vector perpendicular to both input vectors. The cross product appears throughout physics (torque, angular momentum, magnetic force), engineering (moment calculations, 3D mechanics), computer graphics (surface normals, camera orientation), and robotics (joint axes, rotational dynamics). Unlike the dot product which outputs a scalar, the cross product outputs a vector with both magnitude and direction.

Consider two vectors: a = (1, 0, 0) pointing along the x-axis, and b = (0, 1, 0) pointing along the y-axis. Their cross product a × b = (0, 0, 1) — a vector pointing along the positive z-axis. This follows the right-hand rule: curl your fingers from a toward b, and your thumb points in the direction of a × b. The magnitude |a × b| = 1 equals the area of the parallelogram spanned by a and b — in this case, a unit square.

The cross product's geometric meaning is profound: its magnitude equals the area of the parallelogram formed by the two vectors, and its direction is perpendicular to the plane containing them. This makes cross products essential for finding surface normals (which way does this triangle face?), calculating torque (how much does this force cause rotation?), and determining orientation (is this turn left or right?).

How Cross Product Calculator Works: Formulas Explained

Cross product formula: For vectors a = (a₁, a₂, a₃) and b = (b₁, b₂, b₃), the cross product is a × b = (a₂b₃ - a₃b₂, a₃b₁ - a₁b₃, a₁b₂ - a₂b₁). Each component is a 2×2 determinant. Example: a = (2, 3, 4), b = (5, 6, 7). a × b = (3×7 - 4×6, 4×5 - 2×7, 2×6 - 3×5) = (21 - 24, 20 - 14, 12 - 15) = (-3, 6, -3).

Magnitude formula: |a × b| = |a| × |b| × sin(θ), where θ is the angle between the vectors. This equals the area of the parallelogram spanned by a and b. Example: |a| = 5, |b| = 8, θ = 30°. |a × b| = 5 × 8 × sin(30°) = 40 × 0.5 = 20. The parallelogram has area 20 square units.

Right-hand rule: Point your right hand's fingers in the direction of a, then curl them toward b. Your thumb points in the direction of a × b. This convention ensures consistent orientation in 3D space. Reversing the order reverses the direction: b × a = -(a × b). The cross product is anti-commutative.

Geometric properties: If a and b are parallel (θ = 0° or 180°), then a × b = (0, 0, 0) — the zero vector. If a and b are perpendicular (θ = 90°), then |a × b| = |a| × |b| — maximum magnitude. The cross product vector is always perpendicular to both a and b, verified by (a × b) · a = 0 and (a × b) · b = 0.

Working through complete examples: Find (1, 0, 0) × (0, 1, 0). Cross product = (0×0 - 0×1, 0×0 - 1×0, 1×1 - 0×0) = (0, 0, 1). This is the standard basis vector k. Find (2, -1, 3) × (1, 4, -2). Cross product = ((-1)(-2) - 3×4, 3×1 - 2×(-2), 2×4 - (-1)×1) = (2 - 12, 3 + 4, 8 + 1) = (-10, 7, 9). Verify perpendicularity: (-10, 7, 9) · (2, -1, 3) = -20 - 7 + 27 = 0 ✓ and (-10, 7, 9) · (1, 4, -2) = -10 + 28 - 18 = 0 ✓.

Step-by-Step Guide to Calculating Cross Products

  1. Verify both vectors are 3D. Cross product is only defined for three-dimensional vectors. You cannot compute the cross product of 2D vectors (use the 2D "perp dot product" instead) or 4D vectors. Example: (2, 3, 4) and (5, 6, 7) are both 3D — valid. (2, 3) and (5, 6, 7) are incompatible.
  2. Set up the component formula. Write a = (a₁, a₂, a₃) and b = (b₁, b₂, b₃). The cross product components are: x = a₂b₃ - a₃b₂, y = a₃b₁ - a₁b₃, z = a₁b₂ - a₂b₁. These follow a cyclic pattern: (y,z), (z,x), (x,y) for each component.
  3. Calculate the x-component. x = a₂b₃ - a₃b₂. Example: a = (2, 3, 4), b = (5, 6, 7). x = 3×7 - 4×6 = 21 - 24 = -3. This is the determinant of the 2×2 matrix formed by the y and z components.
  4. Calculate the y-component. y = a₃b₁ - a₁b₃. Example: y = 4×5 - 2×7 = 20 - 14 = 6. Note the order: a₃b₁ comes first, then subtract a₁b₃. This ordering ensures the right-hand rule works correctly.
  5. Calculate the z-component. z = a₁b₂ - a₂b₁. Example: z = 2×6 - 3×5 = 12 - 15 = -3. Complete the cross product: a × b = (-3, 6, -3). Combine all three components into the result vector.
  6. Verify perpendicularity (optional). Check that (a × b) · a = 0 and (a × b) · b = 0. For (-3, 6, -3) · (2, 3, 4) = -6 + 18 - 12 = 0 ✓ and (-3, 6, -3) · (5, 6, 7) = -15 + 36 - 21 = 0 ✓. This confirms the calculation is correct.

Real-World Cross Product Examples

Example 1: Torque Calculation. A wrench applies force F = (0, 50, 0) newtons at position r = (0.3, 0, 0) meters from a bolt. Torque τ = r × F = (0×0 - 0×50, 0×0 - 0.3×0, 0.3×50 - 0×0) = (0, 0, 15) N·m. The torque vector points along the z-axis (out of the page), indicating counterclockwise rotation. Magnitude: 15 N·m — this is the turning effort applied to the bolt.

Example 2: Surface Normal for 3D Triangle. A triangle has vertices A = (0, 0, 0), B = (1, 0, 0), C = (0, 1, 0). Edge vectors: AB = (1, 0, 0), AC = (0, 1, 0). Surface normal: n = AB × AC = (0, 0, 1). This points in the +z direction — the triangle faces upward. Normalize for lighting: |n| = 1, so n̂ = (0, 0, 1). Game engines compute millions of such normals per frame for realistic rendering.

Example 3: Magnetic Force on Moving Charge. A proton (charge q = 1.6×10⁻¹⁹ C) moves with velocity v = (10⁶, 0, 0) m/s through magnetic field B = (0, 0, 0.5) tesla. Magnetic force: F = q(v × B) = 1.6×10⁻¹⁹ × (0×0.5 - 0×0, 0×0 - 10⁶×0.5, 10⁶×0 - 0×0) = 1.6×10⁻¹⁹ × (0, -5×10⁵, 0) = (0, -8×10⁻¹⁴, 0) N. The force pushes the proton in the -y direction, causing circular motion.

Example 4: Angular Momentum. A particle with mass m = 2 kg is at position r = (3, 0, 0) m moving with velocity v = (0, 4, 0) m/s. Linear momentum: p = mv = (0, 8, 0) kg·m/s. Angular momentum: L = r × p = (3, 0, 0) × (0, 8, 0) = (0×0 - 0×8, 0×0 - 3×0, 3×8 - 0×0) = (0, 0, 24) kg·m²/s. The angular momentum points along +z, indicating counterclockwise rotation about the origin.

Example 5: Finding Perpendicular Vector. Given two non-parallel directions d₁ = (1, 2, 3) and d₂ = (4, 5, 6), find a direction perpendicular to both. Cross product: d₁ × d₂ = (2×6 - 3×5, 3×4 - 1×6, 1×5 - 2×4) = (12 - 15, 12 - 6, 5 - 8) = (-3, 6, -3). Any scalar multiple of (-3, 6, -3) is perpendicular to both d₁ and d₂. This is essential for constructing coordinate systems and camera orientations.

Common Mistakes in Cross Product Calculations

Reversing the order of subtraction. For the x-component, compute a₂b₃ - a₃b₂, not a₃b₂ - a₂b₃. Wrong order gives the negative of the correct answer. Example: (1, 2, 3) × (4, 5, 6). Correct x: 2×6 - 3×5 = 12 - 15 = -3. Wrong x: 3×5 - 2×6 = 15 - 12 = +3. The entire vector flips direction. Remember the cyclic pattern: (y,z), (z,x), (x,y) with first term positive.

Confusing cross product with dot product. Dot product gives a scalar; cross product gives a vector. Dot: a · b = a₁b₁ + a₂b₂ + a₃b₃ (single number). Cross: a × b = (a₂b₃-a₃b₂, a₃b₁-a₁b₃, a₁b₂-a₂b₁) (three components). Example: (1,0,0) · (0,1,0) = 0 (scalar). (1,0,0) × (0,1,0) = (0,0,1) (vector). They answer different questions.

Forgetting that cross product is anti-commutative. a × b = -(b × a). The order matters! Example: (1, 0, 0) × (0, 1, 0) = (0, 0, 1). But (0, 1, 0) × (1, 0, 0) = (0, 0, -1). Reversing the order flips the direction. This is why torque is r × F, not F × r — the direction indicates rotation sense.

Trying to compute cross product for 2D vectors. The cross product requires three dimensions. For 2D vectors (x₁, y₁) and (x₂, y₂), you can compute the "2D cross product" which is a scalar: x₁y₂ - y₁x₂. This equals the z-component of the 3D cross product if both vectors had z = 0. But the full vector cross product needs 3D inputs.

Pro Tips for Cross Product Applications

Use the determinant mnemonic. Write the cross product as a 3×3 determinant: a × b = det([[i, j, k], [a₁, a₂, a₃], [b₁, b₂, b₃]]), where i, j, k are unit vectors. Expand along the first row: i(a₂b₃-a₃b₂) - j(a₁b₃-a₃b₁) + k(a₁b₂-a₂b₁). The minus sign on j accounts for the alternating signs in determinant expansion.

Apply to area calculations. The area of a triangle with vertices A, B, C is: Area = ½ |AB × AC|. Example: A=(0,0,0), B=(3,0,0), C=(0,4,0). AB=(3,0,0), AC=(0,4,0). AB×AC=(0,0,12). |AB×AC|=12. Area = ½ × 12 = 6 square units. This matches the standard formula ½ × base × height = ½ × 3 × 4 = 6 ✓.

Recognize parallel vectors quickly. If a × b = (0, 0, 0), the vectors are parallel (or one is zero). This is faster than checking if one is a scalar multiple of the other. Example: (2, 4, 6) × (1, 2, 3) = (4×3-6×2, 6×1-2×3, 2×2-4×1) = (12-12, 6-6, 4-4) = (0, 0, 0). Indeed, (2,4,6) = 2×(1,2,3) — parallel.

Use for coordinate system construction. Given two non-parallel vectors a and b, construct an orthonormal basis: e₁ = a/|a| (normalize a). e₂ = (a × b) / |a × b| (perpendicular to both). e₃ = e₁ × e₂ (completes right-handed system). This Gram-Schmidt-like process builds camera coordinate systems and local object frames.

Frequently Asked Questions

In 3D, there's exactly one direction perpendicular to two non-parallel vectors — the cross product direction. In 2D, no direction is perpendicular to the plane (it would point "out of" the plane). In 4D+, there are infinitely many directions perpendicular to two vectors, so no unique cross product exists. The 3D cross product is special to three-dimensional space.

Zero magnitude means the vectors are parallel (angle = 0° or 180°) or one vector is zero. Since |a × b| = |a| × |b| × sin(θ), and sin(0°) = sin(180°) = 0, parallel vectors produce zero cross product. Geometrically, parallel vectors span no area — the "parallelogram" collapses to a line.

Use |a × b| = |a| × |b| × sin(θ). Rearrange: sin(θ) = |a × b| / (|a| × |b|). Then θ = arcsin(|a × b| / (|a| × |b|)). However, the dot product formula cos(θ) = (a · b) / (|a| × |b|) is often preferred because arccos handles the full 0° to 180° range unambiguously, while arcsin only gives 0° to 90°.

For 2D problems, treat vectors as 3D with z = 0. The cross product will have only a z-component: (x₁, y₁, 0) × (x₂, y₂, 0) = (0, 0, x₁y₂ - y₁x₂). The scalar x₁y₂ - y₁x₂ is called the "2D cross product" or "perp dot product." It's positive if the turn from vector 1 to vector 2 is counterclockwise, negative if clockwise.

You may also find these calculators useful: Dot Product Calculator, Vector Magnitude Calculator, Triple Product Calculator, Surface Normal Calculator.

Written and reviewed by the CalcToWork editorial team. Last updated: 2026-04-29.

Frequently Asked Questions

In 3D, there's exactly one direction perpendicular to two non-parallel vectors — the cross product direction. In 2D, no direction is perpendicular to the plane (it would point "out of" the plane). In 4D+, there are infinitely many directions perpendicular to two vectors, so no unique cross product exists. The 3D cross product is special to three-dimensional space.
Zero magnitude means the vectors are parallel (angle = 0° or 180°) or one vector is zero. Since |a × b| = |a| × |b| × sin(θ), and sin(0°) = sin(180°) = 0, parallel vectors produce zero cross product. Geometrically, parallel vectors span no area — the "parallelogram" collapses to a line.
Use |a × b| = |a| × |b| × sin(θ). Rearrange: sin(θ) = |a × b| / (|a| × |b|). Then θ = arcsin(|a × b| / (|a| × |b|)). However, the dot product formula cos(θ) = (a · b) / (|a| × |b|) is often preferred because arccos handles the full 0° to 180° range unambiguously, while arcsin only gives 0° to 90°.
For 2D problems, treat vectors as 3D with z = 0. The cross product will have only a z-component: (x₁, y₁, 0) × (x₂, y₂, 0) = (0, 0, x₁y₂ - y₁x₂). The scalar x₁y₂ - y₁x₂ is called the "2D cross product" or "perp dot product." It's positive if the turn from vector 1 to vector 2 is counterclockwise, negative if clockwise.