What the cross product produces
The cross product of two three-dimensional vectors is another vector, and it is defined by three properties working together. Its direction is perpendicular to both inputs. Its magnitude equals the area of the parallelogram the two vectors span. Its sense — which of the two perpendicular directions it picks — is fixed by the right-hand rule: point your right index finger along a, your middle finger along b, and your thumb points along a × b.
That combination is exactly what you need for torque, for angular momentum, for the magnetic force on a moving charge, and for the surface normal of a triangle in a 3D scene. In each case the physics or geometry cares about a direction perpendicular to a plane, and about a quantity proportional to how much of a plane two vectors actually span.
It differs from the dot product in every respect. The dot product returns a number and peaks when the vectors are aligned; the cross product returns a vector and peaks when they are perpendicular. The dot product is commutative; the cross product anticommutes, so b × a = −(a × b).
Why it is written as a determinant
Nobody memorises the component formula. What people memorise is the symbolic determinant with the basis vectors in the top row:
a × b = det [[i, j, k], [a₁, a₂, a₃], [b₁, b₂, b₃]]
Expand along the first row exactly as you would in the determinant calculator and the three components fall out. The i coefficient is the 2×2 minor from the last two columns, the j coefficient is the minor from columns 1 and 3 with a minus sign from the checkerboard, and the k coefficient is the minor from the first two columns. That minus sign on the middle term is why the second component is written a₃b₁ − a₁b₃ rather than the pattern you might expect.
The determinant form also explains the properties for free. Swapping two rows of a determinant flips its sign, which is why swapping a and b negates the answer. A determinant with two equal rows is zero, which is why a × a = 0. And it makes the scalar triple product c · (a × b) visibly the determinant of the three vectors stacked together — the signed volume of the parallelepiped they span.
The other identity worth carrying is |a × b| = |a||b| sin θ. Compare it with the dot product's |a||b| cos θ: since sin² + cos² = 1, the two together recover the full geometry of the pair, and the angle is best computed as atan2(|a × b|, a · b), which is what this calculator does because it stays accurate at both ends of the range.
Worked example: (1, 2, 3) × (4, 5, 6)
Expand the symbolic determinant along its first row.
- x-component. Delete the i column, leaving [[2, 3], [5, 6]]. Its determinant is 2×6 − 3×5 = 12 − 15 = −3.
- y-component. Delete the j column, leaving [[1, 3], [4, 6]], whose determinant is 1×6 − 3×4 = 6 − 12 = −6. The cofactor sign is negative, so the component is +6. Equivalently, use the pre-signed form a₃b₁ − a₁b₃ = 3×4 − 1×6 = 6.
- z-component. Delete the k column, leaving [[1, 2], [4, 5]], whose determinant is 1×5 − 2×4 = 5 − 8 = −3.
- The product is (−3, 6, −3).
- Magnitude. √((−3)² + 6² + (−3)²) = √(9 + 36 + 9) = √54 = 7.348469. That is the area of the parallelogram, so the triangle with the same two edges has area 3.674235.
- Unit normal. Divide through: (−3, 6, −3)/7.348469 = (−0.408248, 0.816497, −0.408248).
- Angle. |a| = √14 = 3.741657 and |b| = √77 = 8.774964, so sin θ = 7.348469 / (3.741657 × 8.774964) = 7.348469 / 32.832910 = 0.223814, giving θ = 12.9332°.
Check the perpendicularity, which is the cheapest verification available: a · (a × b) = 1(−3) + 2(6) + 3(−3) = −3 + 12 − 9 = 0 ✓, and b · (a × b) = 4(−3) + 5(6) + 6(−3) = −12 + 30 − 18 = 0 ✓. Cross-check the angle with the dot product: a · b = 4 + 10 + 18 = 32, so cos θ = 32/32.832910 = 0.974632, and arccos of that is 12.9332° — the same answer from an independent route.
How to read the result
A zero cross product means the vectors are parallel. They lie along the same line, span no area, and have no unique perpendicular — every direction in the plane perpendicular to that line qualifies, so the calculator declines to name one. This is the standard test for collinearity of three points: form two edge vectors and cross them.
The magnitude is an area, so its units multiply. Cross a force in newtons with a position in metres and you get a torque in newton-metres. Cross two lengths in metres and you get an area in square metres. Reporting the number without the compound unit loses half the meaning.
The sign of each component encodes orientation. Reverse the operands and every component flips, and so does the normal direction. In graphics this is the difference between a surface facing the camera and one facing away, and it is why the winding order of triangle vertices matters.
The angle is always between 0° and 180°. The cross product's magnitude alone cannot distinguish 30° from 150°, because sin is positive on both — which is exactly why this calculator uses atan2 with the dot product supplying the sign of the cosine. If you only need the angle, the angle between vectors calculator does it directly.
Cross products of the basis vectors and other reference cases
| a | b | a × b | |a × b| | Angle |
|---|---|---|---|---|
| i = (1,0,0) | j = (0,1,0) | k = (0,0,1) | 1 | 90° |
| j = (0,1,0) | k = (0,0,1) | i = (1,0,0) | 1 | 90° |
| k = (0,0,1) | i = (1,0,0) | j = (0,1,0) | 1 | 90° |
| j = (0,1,0) | i = (1,0,0) | −k = (0,0,−1) | 1 | 90° |
| (1,2,3) | (4,5,6) | (−3, 6, −3) | 7.348469 | 12.9332° |
| (4,5,6) | (1,2,3) | (3, −6, 3) | 7.348469 | 12.9332° |
| (1,2,3) | (2,4,6) | (0, 0, 0) | 0 | 0° |
| (3,0,0) | (0,2,0) | (0, 0, 6) | 6 | 90° |
The last row is the geometric statement in its simplest form: two perpendicular vectors of length 3 and 2 span a rectangle of area 6.
Mistakes and limitations
- Dropping the minus sign on the middle component. The cofactor expansion alternates, so the j term is subtracted. Writing a₁b₃ − a₃b₁ instead of a₃b₁ − a₁b₃ flips the whole vector's y-component and silently reverses the normal.
- Assuming the cross product is associative. It is not: (a × b) × c is generally different from a × (b × c). The correct expansion is the BAC-CAB rule, a × (b × c) = b(a·c) − c(a·b).
- Trying to cross two-dimensional vectors. The cross product needs three dimensions. For 2D vectors, treat them as 3D with a zero z-component: the result points purely along z, and its single component a₁b₂ − a₂b₁ is the signed area often called the 2D cross product.
- Cancelling in a cross-product equation. a × b = a × c does not imply b = c; the two may differ by any multiple of a.
- Confusing it with the dot product. The dot product is a number that is largest when the vectors align; the cross product is a vector that is largest when they are perpendicular. They answer opposite questions.
- Assuming a left-handed convention. Some graphics APIs use left-handed coordinates, in which the visual sense of the result reverses even though the arithmetic does not. Check your coordinate system before trusting a normal direction.
Two uses that pay for learning it
Torque. τ = r × F, where r runs from the pivot to the point of application. The sin θ factor is why pushing straight at a hinge does nothing and pushing perpendicular to the door does the most — and why a longer wrench is a bigger torque for the same force.
Surface normals. For a triangle with vertices P, Q, R, form the edge vectors u = Q − P and v = R − P; then u × v is normal to the triangle and half its magnitude is the triangle's area. Every lighting calculation in 3D graphics starts here, which is also why a degenerate triangle with collinear vertices produces a zero normal and renders black.
Related tools
For the companion operation, the dot product calculator handles vectors of any dimension and tests for orthogonality. When the angle is what you actually want, the angle between vectors calculator gives it directly, and the vector projection calculator splits one vector into a component along another plus a perpendicular remainder — the perpendicular part is precisely what the cross product measures the size of.
Because the cross product is a determinant in disguise, the determinant calculator is the natural place to compute a scalar triple product: put your three vectors in as rows and the determinant is the signed volume of the parallelepiped, zero exactly when the three are coplanar. In vector calculus, the curl of a field is the cross product of the gradient operator with the field, so the curl calculator is the same operation applied to derivatives rather than numbers.
