What Is the Cross Product?
The cross product of two vectors a and b, written a × b, is a third vector that is perpendicular to both of them, with length equal to the area of the parallelogram they span. This cross product calculator computes a × b for 3D vectors — and the single-number 2D form — showing the determinant expansion component by component, then adds the facts you usually need next: the magnitude (that parallelogram area), the angle between the vectors, the unit vector in the result's direction, and a built-in perpendicularity check that dots the answer with both inputs to prove it comes out at zero.
How Do You Compute a Cross Product, Step by Step?
- Write the determinant layout: a row of unit vectors i, j, k over the components of a, then the components of b.
- i component: cover the i column and take the 2×2 determinant of what remains: a2·b3 − a3·b2.
- j component: same idea — a3·b1 − a1·b3 — remembering the cofactor sign flip is already baked into this ordering.
- k component: a1·b2 − a2·b1.
- Check: dot the result with a and with b; both must be 0. The calculator prints this check under every answer.
Worked Example 1: (1, 2, 3) × (4, 5, 6)
With a = (1, 2, 3) and b = (4, 5, 6): the i component is (2)(6) − (3)(5) = 12 − 15 = −3; the j component is (3)(4) − (1)(6) = 12 − 6 = 6; the k component is (1)(5) − (2)(4) = 5 − 8 = −3. So a × b = (−3, 6, −3), the calculator's default example. Its magnitude is sqrt(9 + 36 + 9) = sqrt(54) ≈ 7.35 — the area of the parallelogram with sides a and b. The check confirms the geometry: (−3, 6, −3) · (1, 2, 3) = 0 and (−3, 6, −3) · (4, 5, 6) = 0, so the result is perpendicular to both inputs, as it must be.
Worked Example 2: A 2D Cross Product
Take a = (2, 1) and b = (1, 3) in the plane. Treating them as 3D vectors with z = 0, only the k component survives: (2)(3) − (1)(1) = 6 − 1 = 5. The parallelogram they span has area 5, and the positive sign says b sits counterclockwise from a. Flip the order — b × a — and you get −5: the cross product is anti-commutative, a × b = −(b × a), so the order you enter the vectors matters for the sign (and, in 3D, for the direction).
Cross Product vs Dot Product
The two vector products answer different questions. The dot product returns a scalar measuring alignment — maximal when the vectors point together, zero when perpendicular. The cross product returns a vector measuring the plane the two vectors define — zero when they are parallel, longest when perpendicular. Together with the determinant calculator (the cross product is a determinant with a symbolic first row) and the matrix calculator, they cover the core computations of a linear algebra course.
Where Cross Products Are Used
The cross product is the working tool behind a surprising amount of physics and computing. Torque is r × F: the turning effect of a force grows with the lever arm, the force, and the sine of the angle between them — exactly |a||b|sin(theta). The magnetic force on a moving charge is q(v × B), which is why charged particles spiral in magnetic fields instead of travelling straight. Angular momentum is r × p. In computer graphics, the normal vector of a triangle with edges u and v is u × v, and the sign of its direction decides which side of the surface faces the camera — the calculation this page performs is, quite literally, how 3D engines decide what is visible. A useful special case to remember: the area of the triangle with sides a and b is half the parallelogram area, (1/2)|a × b|, a formula that solves many coordinate-geometry problems in one line.
Three Mistakes to Watch For
First, the j component sign: the cofactor expansion subtracts the middle determinant, and forgetting it is the most common cross product error — the component formula on this page already includes the flip, which is why the printed steps read a3·b1 − a1·b3. Second, swapping the order: b × a is the exact negative of a × b. Third, expecting a number: in 3D the answer is a vector, and if your result is not perpendicular to both inputs, the arithmetic — not the geometry — is wrong. Use the built-in check.