Linear Algebra

Cross Product

A perpendicular vector whose length is the area between two others

The cross product takes two vectors in three-dimensional space and returns a third vector perpendicular to both, with magnitude equal to the area of the parallelogram they span. Written a × b, it satisfies |a × b| = |a||b|sinθ and follows the right-hand rule for direction. It is the algebraic engine behind torque, angular momentum, surface normals, magnetic forces, and Maxwell's equations. Introduced by Hamilton in 1843 (as the imaginary part of quaternion multiplication) and rebuilt as a standalone vector operation by Gibbs and Heaviside in the 1880s.

  • Symbola × b (also a ∧ b in older texts)
  • Magnitude|a × b| = |a||b|sinθ
  • DirectionPerpendicular to both, by right-hand rule
  • ResultA vector (in ℝ³)
  • Anticommutative?Yes — a × b = −(b × a)
  • Defined in3D and 7D only (as a true vector product)

Watch the 60-second explainer

A condensed visual walkthrough — narrated, captioned, under a minute.

How the cross product works

Take two vectors a and b in three-dimensional space. The cross product a × b returns a new vector with three properties:

  1. Perpendicular to both inputs. a × b is orthogonal to a and to b — it sticks straight out of the plane containing them.
  2. Magnitude equals parallelogram area. |a × b| = |a||b|sinθ, where θ is the angle between a and b. When the vectors are parallel, sinθ = 0 and the cross product vanishes; when perpendicular, sinθ = 1 and the magnitude is just the product of lengths.
  3. Direction follows the right-hand rule. Point your right index finger along a, your middle finger along b, and your thumb points along a × b. Reversing the order flips the thumb 180°, which is why a × b = −(b × a).

Algebraically, the cross product comes out of a 3×3 determinant. With a = (a₁, a₂, a₃), b = (b₁, b₂, b₃), and unit basis vectors i, j, k:

          | i   j   k  |
a × b  =  | a₁  a₂  a₃ |
          | b₁  b₂  b₃ |

       =  (a₂b₃ − a₃b₂) i  −  (a₁b₃ − a₃b₁) j  +  (a₁b₂ − a₂b₁) k

The basis vectors cycle: i × j = k, j × k = i, k × i = j. Going against the cycle flips the sign: j × i = −k. This pattern is the seed of the entire formula.

Worked example: cross product via determinant

Compute i × j where i = (1, 0, 0) and j = (0, 1, 0).

          | i  j  k |
i × j  =  | 1  0  0 |
          | 0  1  0 |

       =  i·(0·0 − 0·1)  −  j·(1·0 − 0·0)  +  k·(1·1 − 0·0)
       =  0i − 0j + 1k
       =  (0, 0, 1)  =  k

Now a less trivial case: a = (2, 1, 3), b = (−1, 4, 2).

a × b  =  i·(1·2 − 3·4)  −  j·(2·2 − 3·(−1))  +  k·(2·4 − 1·(−1))
       =  i·(2 − 12)     −  j·(4 + 3)         +  k·(8 + 1)
       =  −10 i − 7 j + 9 k
       =  (−10, −7, 9)

Sanity check: a · (a × b) = 2·(−10) + 1·(−7) + 3·9 = −20 − 7 + 27 = 0. The result is perpendicular to a, as it must be. The same check passes for b.

Algebraic properties

  • Anticommutative. a × b = −(b × a). Swapping arguments flips the sign — the right-hand rule reverses orientation.
  • Distributive over addition. a × (b + c) = a × b + a × c.
  • Compatible with scalars. (ka) × b = k(a × b).
  • Not associative. (a × b) × c ≠ a × (b × c) in general. The triple cross product instead obeys the BAC−CAB identity: a × (b × c) = b(a·c) − c(a·b).
  • Self-cross is zero. a × a = 0, because a is parallel to itself (sinθ = 0).
  • Jacobi identity. a × (b × c) + b × (c × a) + c × (a × b) = 0. This is the structural property that makes ℝ³ with × into a Lie algebra.

Cross product vs wedge product (3D vs nD)

The cross product is a peculiar quirk of three dimensions. The deeper, dimension-agnostic operation is the wedge product a ∧ b, which lives in the exterior algebra. Its result is a bivector — an oriented plane element — not a vector. In 3D, a bivector happens to have three components (corresponding to the three coordinate planes), so we can identify it with a vector via the Hodge star and pretend it's the cross product. In any other dimension, no such identification works.

Cross product (×)Wedge product (∧)
Dimensions defined3 (and 7, exotically)Any dimension
Result typeVectorBivector (k-form)
Components3 numbers in 3Dn(n−1)/2 numbers in nD
Anticommutative?Yes — a × b = −b × aYes — a ∧ b = −b ∧ a
Associative?NoYes
Geometric meaningPerpendicular vector with parallelogram-area magnitudeOriented parallelogram itself
Used inClassical mechanics, EM, graphicsDifferential forms, general relativity, gauge theory

The wedge product is what differential geometers and physicists working in higher dimensions actually use. In 4D spacetime there is no cross product — Maxwell's equations are written with wedge products and exterior derivatives instead. The 3D-only nature of the cross product is a coincidence of low dimension, not a fundamental feature of the universe.

Where the cross product shows up

  • Torque. When a force F acts at a position r from a pivot, the torque is τ = r × F. The cross product captures the lever arm and the rotational direction simultaneously. Push a door near the hinge and torque is small; push at the handle and it is large.
  • Angular momentum. L = r × p, the moment of momentum. Conservation of angular momentum follows directly from the cross product's symmetry under central forces.
  • Magnetic force. A charge q moving with velocity v through magnetic field B feels force F = qv × B. The cross product forces the magnetic deflection to be perpendicular to motion — which is why charged particles in a uniform field travel in circles.
  • Surface normals. Given a triangle with edges e₁ and e₂, the outward normal is e₁ × e₂. Every 3D rendering pipeline computes this for lighting, backface culling, and collision detection.
  • Triangle and parallelogram areas. Half-magnitude of e₁ × e₂ gives the triangle area. Robust geometric algorithms in CAD and finite-element meshes rely on this.
  • Plane equations. Three points determine a plane; the normal is the cross product of two edges, and the plane is the set of x with n·(x − p₀) = 0.

Common mistakes

  • Treating the cross product as commutative. a × b = −(b × a). Forgetting the sign flips torque direction and breaks lighting calculations.
  • Trying to take a cross product in 2D or 4D. No such operation exists as a true vector product. In 2D you can compute a "scalar cross" (a₁b₂ − a₂b₁) — that's just the z-component of the 3D embedding. In higher dimensions, use the wedge product.
  • Confusing the cross with the dot. The cross returns a vector; the dot returns a scalar. Different shape, different meaning.
  • Forgetting the right-hand rule convention. Switching between right- and left-handed coordinate systems flips every cross product. Graphics frameworks differ; check before you ship.
  • Assuming associativity. (a × b) × c ≠ a × (b × c). Always parenthesize carefully, and use the BAC−CAB identity to expand triple products.
  • Reading zero as "small". a × b = 0 means strictly parallel (or one is zero), not "almost aligned". For nearly-parallel vectors the cross product can be tiny but nonzero — important for numerical robustness.

Frequently asked questions

Why does the cross product only work in three dimensions?

Because three is the only dimension (other than seven) where you can pick out a single vector perpendicular to two given vectors. In 2D the perpendicular space is just the zero vector; in 4D and above it is itself a higher-dimensional subspace, so "the" perpendicular vector is not well-defined. The wedge product (a∧b) generalizes the cross product to any dimension by returning a bivector — an oriented plane element — instead of a vector.

Is the cross product commutative?

No. Swapping the arguments flips the sign: a × b = −(b × a). This anticommutativity is the geometric statement that flipping the order reverses the right-hand-rule orientation. It distinguishes the cross product from the dot product, which is fully symmetric.

What is the right-hand rule?

Point your right index finger along a, your middle finger along b. Your thumb points in the direction of a × b. The rule is a convention — left-handed systems (used in some graphics frameworks like DirectX historically) reverse it. The math is identical; only the visual orientation differs. The right-hand rule was popularized by Gibbs and Heaviside in the 1880s.

How do I compute a cross product quickly?

Write the determinant of a 3×3 matrix whose first row is (i, j, k), second row is the components of a, and third row is the components of b. Expanding along the first row gives a × b = (a₂b₃ − a₃b₂, a₃b₁ − a₁b₃, a₁b₂ − a₂b₁). For unit basis vectors: i × j = k, j × k = i, k × i = j (cyclic) and the reverses are negative.

When is the cross product zero?

Exactly when the two vectors are parallel (or one is zero). Since |a × b| = |a||b|sinθ, parallel vectors have sinθ = 0 and the magnitude vanishes. This makes the cross product the standard test for collinearity, complementary to the dot product's test for orthogonality.

What is the geometric meaning of the magnitude?

|a × b| equals the area of the parallelogram spanned by a and b. Half that — |a × b|/2 — is the area of the triangle with the two vectors as edges. Surveyors, computer-graphics shaders, and finite-element solvers all use this formula to compute element areas from raw vertex coordinates.