Cross or dot: which one you want
Two vector products get taught side by side and confused ever after, so here is the split in one sentence each. The cross product answers "what direction is perpendicular to both" and returns a whole vector; it only exists in 3D, and it is what this page computes. The dot product answers "how aligned are these two vectors" and returns one number, in any dimension. If alignment is what you came for, the dot product calculator is the page you want.
How the cross product works
Write the two vectors as the second and third rows of a 3 by 3 determinant, with the unit vectors i, j and k across the top, and expand along that top row. Each 2 by 2 cofactor produces one component of the answer, and the middle one picks up a minus sign, the same way every determinant expansion alternates.
What comes out is a vector with two jobs. Its direction is perpendicular to both inputs, chosen by the right hand rule. Its length is the area of the parallelogram the two inputs span, which is why the cross product shows up anywhere a "how much do these two directions disagree" quantity is needed: torque, angular momentum, surface normals in graphics, and the area of a triangle you only know by its corners.
The formula
|a × b| = |a| × |b| × sin θ
Here a1, a2, a3 are the components of the first vector, b1, b2, b3 of the second, |a| and |b| are their lengths, and θ is the angle between them. The first line is how you compute it; the second is what the length of the result means.
Worked example
a = (2, 3, 4) and b = (5, 6, 7).
i component: (3)(7) − (4)(6) = 21 − 24 = −3
j component: (4)(5) − (2)(7) = 20 − 14 = 6
k component: (2)(6) − (3)(5) = 12 − 15 = −3
a × b = (-3, 6, -3)
|a × b| = √(9 + 36 + 9) = √54 = 7.348469, so the two vectors span a parallelogram of area 7.348469 and a triangle of area 3.674235.
Check: (-3)(2) + (6)(3) + (-3)(4) = -6 + 18 - 12 = 0, so the result is perpendicular to a, and the same check works against b.
The i, j, k cycle
The three coordinate directions cross into each other in a cycle worth memorizing, because every sign convention in 3D geometry traces back to it:
- i × j = k
- j × k = i
- k × i = j
Read it as a wheel: going around in order (i to j to k and back to i) gives the next one with a plus sign. Reverse any pair and the answer negates: j × i = −k, k × j = −i, i × k = −j. And anything crossed with itself is the zero vector, because a vector spans no area with its own shadow.
The right hand rule
The determinant tells you the perpendicular line; the right hand rule tells you which of its two directions the answer takes. Point the fingers of your right hand along a, curl them toward b, and your thumb points along a × b. Curl the other way, from b toward a, and your thumb flips, which is the physical picture behind b × a = −(a × b). Order matters, and reversing it reverses the result.
Torque, the flagship use
Torque is the cross product with a job: τ = r × F, position crossed with force. Push on a wrench and the torque's magnitude is how hard the bolt is being turned, while its direction runs along the axis the bolt turns around, straight out of the plane of wrench and push. That is the cross product's whole trick in one tool: the sine factor means force along the wrench does nothing, force at right angles does the most, and the perpendicular direction names the axis of rotation. The torque calculator works that calculation with real wrenches and real bolts. Angular momentum is the same construction one derivative up: L = r × p, position crossed with momentum, which is why planets sweep out orbits in a fixed plane.
Why the cross product only lives in 3D
The cross product needs a direction perpendicular to two given ones, and 3D is the dimension where that request has exactly one line as its answer. In 2D there is no room: nothing in the plane is perpendicular to two non-parallel directions at once. In 4D there is too much room: a whole plane of perpendicular directions, with no fair way to pick one.
The 2D case does not die, though; it collapses to a single signed number, x1y2 − x2y1, which is the z component of the 3D answer once you lay both vectors flat at z = 0. That scalar is the signed area of the parallelogram, positive when b sits counterclockwise from a, and it is what game developers and geometry libraries mean when they say 2D cross product. Enter two 2-component vectors above and this page does exactly that, stating the z = 0 promotion in the steps. Honesty compels one footnote: a genuine cross product also exists in exactly 7 dimensions, a lovely curiosity tied to the octonions, but nothing in between and nothing you will meet in coursework.