User Rating 0.0
Total Usage 0 times
a Vector A
b Vector B
Presets:
Enter vectors and press Calculate
3D Visualization Drag to rotate
Is this tool helpful?

Your feedback helps us improve.

About

The cross product (or vector product) a × b yields a vector perpendicular to both input vectors in R3. Its magnitude equals the area of the parallelogram spanned by the two vectors. Misapplying the operation - confusing it with the dot product, or reversing operand order - produces incorrect surface normals in 3D graphics, wrong torque directions in mechanics, and flawed flux computations in electromagnetism. This calculator computes all three components, the resultant magnitude |a × b|, the angle θ between inputs, and verifies orthogonality via dot-product checks.

The tool assumes a right-handed coordinate system consistent with the IEEE and ISO 80000-2 convention. Results are exact for rational inputs. For near-parallel vectors (angle < 0.01°), floating-point cancellation may reduce precision in the magnitude to roughly 12 significant digits. An interactive 3D canvas renders the vectors and their cross product for spatial verification.

cross product vector calculator vector cross product 3D vectors linear algebra vector multiplication

Formulas

The cross product is computed via the determinant of a symbolic 3×3 matrix with unit vectors in the first row:

a × b = ijka1a2a3b1b2b3

Expanding along the first row yields three components:

a × b = (a2b3 a3b2)i (a1b3 a3b1)j + (a1b2 a2b1)k

The magnitude of the resultant vector equals:

|a × b| = |a| |b| sinθ

The angle θ between vectors is recovered from both products:

θ = atan2(|a × b|, a b)

Where a = (a1, a2, a3) is the first input vector, b = (b1, b2, b3) is the second input vector, i, j, k are the standard basis unit vectors, and θ is the angle between a and b. The atan2 form is preferred over arccos because it is numerically stable for all angles including near-zero and near-π.

Reference Data

PropertyCross Product (a × b)Dot Product (a b)
Result TypeVector in R3Scalar in R
Commutativitya × b = (b × a) (anti-commutative)a b = b a (commutative)
Geometric MeaningArea of parallelogramProjection of one vector onto another
Zero ConditionVectors are parallel (θ = 0° or 180°)Vectors are perpendicular (θ = 90°)
Distributivea × (b + c) = a × b + a × ca (b + c) = a b + a c
AssociativeNot associativeN/A (binary operation)
Self-Producta × a = 0a a = |a|2
Scalar Mult.(ka) × b = k(a × b)(ka) b = k(a b)
Lagrange Identity|a × b|2 + (a b)2 = |a|2 |b|2
Triple Producta (b × c) = volume of parallelepiped
Unit Vector Identityi × j = ki j = 0
j × ki0
k × ij0
Physics: Torqueτ = r × F
Physics: Lorentz ForceF = qv × B
Physics: Angular MomentumL = r × p
Graphics: Surface Normaln = (v1 v0) × (v2 v0)

Frequently Asked Questions

The cross product is anti-commutative: b × a = (a × b). This stems from the determinant definition. Swapping two rows of a matrix negates its determinant. In physics, this means torque direction depends on which vector you label as the position vs. force.
Parallel vectors have θ = 0° or 180°, so sinθ = 0. The cross product is the zero vector (0, 0, 0). The parallelogram they span has zero area. This calculator detects this case and flags it explicitly.
Strictly, the cross product is defined only in R3 (and R7). For 2D vectors (a1, a2) and (b1, b2), you can compute a pseudo-scalar a1b2 a2b1, which equals the z-component of the 3D cross product when a3 = b3 = 0. Set the z-components to zero in this calculator for that result.
When vectors are nearly parallel, the cross product components involve subtraction of nearly equal numbers (catastrophic cancellation). For double-precision IEEE 754, you lose roughly one decimal digit of accuracy for each order of magnitude the angle is below 1°. At θ 10−6°, expect only about 6 correct significant digits in the magnitude.
Given a triangle with vertices v0, v1, v2, the surface normal is n = (v1 v0) × (v2 v0). The winding order of vertices determines the normal direction. Counter-clockwise winding (in a right-handed system) produces an outward-facing normal. Reversing two vertices flips it, causing incorrect lighting and backface culling.
Yes. The identity |a × b|2 + (a b)2 = |a|2|b|2 must hold exactly (within floating-point tolerance). This calculator verifies it internally. If the residual exceeds 10−10, a warning is shown.