Lelifi·tools

Cross Product Calculator

For a = (3, 4, 0) and b = (4, 0, 0), the cross product is (0, 0, -16) with magnitude 16. The angle between the vectors is 53.13 degrees, because 5 x 4 x 0.8 = 16, and the unit normal is (0, 0, -1). For (1, 2, 3) and (4, 5, 6) the tool returns (-3, 6, -3), magnitude 7.348, angle 12.93 degrees, and a triangle area of 3.674.

Cross product of two vectors, with the magnitude, the angle between them, a unit normal, and the areas the pair spans.

Enter two vectors to get the cross product, its magnitude, the angle between them, a unit normal, and the areas of the parallelogram and triangle.

By the Lelifi editors ·

Key takeaways

Component steps for (3, 4, 0) x (4, 0, 0)c1 = 4 x 0 - 0 x 0 = 0c2 = 0 x 4 - 3 x 0 = 0c3 = 3 x 0 - 4 x 4 = -16The result (0, 0, -16) runs along the negative z axis, and its length is 16.
Each output component ignores one input component, so three two-term products and three subtractions finish the job.
Area reading of the cross product, magnitudes to three decimalsPair 1 parallelogram16Pair 1 triangle8Pair 2 parallelogram7.348Pair 2 triangle3.674Half of each parallelogram value is the matching triangle area.
Pair 1 is perpendicular enough to span area 16; pair 2 is nearly parallel, so its area stays small.
On this page
  1. What the cross product computes
  2. The component formula, worked twice
  3. Magnitude as area, and the angle
  4. Parallel, antiparallel and the zero test
  5. Unit normal and which way it points
  6. Two dimensions: the scalar cross product
  7. Where the number earns its keep

What the cross product computes

The cross product of two three-dimensional vectors a and b is written a x b, and the result is a third vector, not a number. The new vector stands perpendicular to both inputs, its length equals |a| |b| sin(theta), where theta is the angle between them, and its direction follows the right-hand rule: curl the fingers of your right hand from a toward b, and the thumb gives the direction of a x b. Section 1.6 of the Digital Library of Mathematical Functions (NIST, current online edition) lists the component formula and the right-hand rule as equation 1.6.9, and that is the convention this calculator follows.

The cross product and the dot product answer different questions. The dot product returns one number that measures how much the two vectors point the same way. The cross product returns a vector that measures how much the pair fails to line up: when the inputs are parallel, sin(theta) is 0 and the product collapses to the zero vector, and when they are perpendicular, sin(theta) is 1 and the result is as long as it can be, |a| |b|.

Because the output carries a direction, order matters. Swapping the inputs flips the sign: b x a = -(a x b). This anticommutative property is the arithmetic version of the right-hand rule, and it is why cross products appear wherever orientation carries meaning, from torque in mechanics to lighting normals in 3D graphics.

The component formula, worked twice

For a = (a1, a2, a3) and b = (b1, b2, b3), the cross product is a x b = (a2 b3 - a3 b2, a3 b1 - a1 b3, a1 b2 - a2 b1). Each output component pairs the two inputs it does not use, with a sign pattern that cycles forward.

First example, a = (3, 4, 0) and b = (4, 0, 0): c1 = 4 x 0 - 0 x 0 = 0, c2 = 0 x 4 - 3 x 0 = 0, and c3 = 3 x 0 - 4 x 4 = -16, so a x b = (0, 0, -16). The result points down the negative z axis, which the right-hand rule confirms: fingers from (3, 4, 0) toward (4, 0, 0), thumb below the plane.

Second example, a = (1, 2, 3) and b = (4, 5, 6), component by component:

ComponentExpression(3, 4, 0) x (4, 0, 0)(1, 2, 3) x (4, 5, 6)
c1a2 b3 - a3 b24 x 0 - 0 x 0 = 02 x 6 - 3 x 5 = -3
c2a3 b1 - a1 b30 x 4 - 3 x 0 = 03 x 4 - 1 x 6 = 6
c3a1 b2 - a2 b13 x 0 - 4 x 4 = -161 x 5 - 2 x 4 = -3

So (1, 2, 3) x (4, 5, 6), which gives (-3, 6, -3). Both results come straight out of the determinant pattern, and the widget on this page runs the same three expressions, printing the components to three decimals.

Magnitude as area, and the angle

The length of the cross product has a geometric reading: |a x b| = |a| |b| sin(theta) is the area of the parallelogram the two vectors span, and half of it is the area of the triangle they span with the origin. This is often the fastest route to an area from coordinates, with no side lengths to work out first.

For a = (3, 4, 0) and b = (4, 0, 0): |a| = 5, |b| = 4, and the dot product a . b = 3 x 4 + 4 x 0 + 0 x 0 = 12. So cos(theta) = 12 / 20 = 0.6, sin(theta) = 16 / 20 = 0.8, and the angle is atan2(16, 12) = 53.13 degrees. The magnitude checks out three ways: directly as sqrt(0 + 0 + 256) = 16, by the sine form as 5 x 4 x 0.8 = 16, and as the parallelogram area, 16.

For (1, 2, 3) and (4, 5, 6): |a| = 3.742, |b| = 8.775, the dot product is 32, the cross product magnitude is 7.348, so sin(theta) = 0.224 and the angle is 12.93 degrees. The parallelogram area is 7.348 and the triangle area is 3.674.

Pair|a||b|a . bsinAngleParallelogramTriangle
(3, 4, 0), (4, 0, 0)54120.80053.13 deg168
(1, 2, 3), (4, 5, 6)3.7428.775320.22412.93 deg7.3483.674
(2, 1, 0), (4, 2, 0)2.2364.472100.0000 deg00

Type these pairs into the widget and it prints the same magnitudes and angles, rounded to the same decimals, together with the two areas.

Parallel, antiparallel and the zero test

A zero cross product is the clean test for parallel vectors. If a x b = (0, 0, 0), the pair is parallel, antiparallel, or one of them is the zero vector, and no unique normal direction exists.

Take a = (2, 1, 0) and b = (4, 2, 0). Here b = 2a, so: c1 = 1 x 0 - 0 x 2 = 0, c2 = 0 x 4 - 2 x 0 = 0, and c3 = 2 x 2 - 1 x 4 = 0. Every component cancels, and the calculator reports magnitude 0, an angle of 0 degrees, and no unit normal rather than a division by zero.

Antiparallel inputs behave the same way. (1, 0, 0) and (-2, 0, 0) also return the zero vector, and the angle reads 180 degrees. The widget states the parallel case in its conclusion line so the empty normal does not look like a bug.

The sign flip cuts the other way too. For a = (3, 4, 0) and b = (4, 0, 0) the product was (0, 0, -16); entering b first gives (0, 0, 16). Same length, opposite direction, exactly what b x a = -(a x b) requires.

Unit normal and which way it points

Dividing the cross product by its own length gives the unit normal n = (a x b) / |a x b|, a length-one vector perpendicular to both inputs. For the pair (3, 4, 0) and (4, 0, 0) it is (0, 0, -1), and for (1, 2, 3) and (4, 5, 6) it is (-0.408, 0.816, -0.408).

The direction is a convention, fixed by the right-hand rule, and it flips when the inputs swap order. If the surface you are working with needs a normal pointing the other way, reverse the argument order; nothing else changes.

The normal earns its keep in 3D work. A game engine takes the normal of each triangle to decide how light strikes it, a physics engine uses normals to resolve collisions, and mesh tools compare the normal they compute with the normal a model claims, which is how flipped or degenerate faces get caught. In all three cases the computation is the same one this widget performs.

Two dimensions: the scalar cross product

In two dimensions there is no third axis for the result to point along, so the cross product is written as a single number: a x b = a1 b2 - a2 b1. Switch the widget to 2D mode and it computes this scalar.

For a = (3, 1) and b = (1, 2): 3 x 2 - 1 x 1 = 5. The magnitude is 5, the angle is atan2(5, 5) = 45 degrees, the parallelogram area is 5 and the triangle area is 2.5. A negative result is information, not an error: it says b sits clockwise from a, which is how 2D orientation tests work.

Pair (2D)Scalar crossAngleParallelogramTriangleSign means
(3, 1), (1, 2)545 deg52.5b is counterclockwise from a
(1, 2), (3, 1)-545 deg52.5b is clockwise from a
(2, 1), (4, 2)00 deg00the pair is parallel

Summing these scalar products along the edges of a polygon and halving the total gives the polygon area, the shoelace method. The same one-line formula drives survey plots, SVG path tools and the signed area readout in the widget.

Where the number earns its keep

Torque is the everyday cross product. A mechanic pulls a wrench with 80 N at the end of a 0.3 m handle, perpendicular to it: torque = r x F, so the magnitude is 0.3 x 80 x sin 90 = 24 N.m. Pull at 60 degrees instead and the same force delivers 0.3 x 80 x 0.866 = 20.78 N.m, about 13 percent less, which is why grip angle matters as much as grip strength.

Three points P, Q, R define two edge vectors, Q - P and R - P, and half the magnitude of their cross product is the triangle area. The pair (3, 4, 0) and (4, 0, 0) from the first example gives a triangle area of 8; the same three lines of arithmetic area any lot, sail or roof face from coordinates.

Know the edges of the tool: the cross product as defined here exists for 3D vectors (and, as a mathematical curiosity, in 7 dimensions), while the 2D result is a scalar by convention. It is not associative, so (a x b) x c differs from a x (b x c) in general, and it is undefined when either input is the zero vector. MIT's 18.02 multivariable calculus course on OpenCourseWare covers the geometry in its first-week notes, and MathWorld's cross product entry collects the identities, including the quaternion and determinant forms.

To use the widget: pick 3D or 2D, type the components, and read the product, magnitude, angle, unit normal and areas off one table. Every value updates as you type, so you can test a pair, swap the order, and watch the sign flip.

Frequently asked questions

What does the cross product of two vectors give you?

A third vector that is perpendicular to both inputs, with length |a| |b| sin(theta) and a direction set by the right-hand rule. Its length also equals the area of the parallelogram spanned by the two vectors, which is why the same computation answers both a direction question and an area question.

How do you compute the cross product of (1, 2, 3) and (4, 5, 6)?

Apply (a2 b3 - a3 b2, a3 b1 - a1 b3, a1 b2 - a2 b1): the result is (-3, 6, -3). Its magnitude is sqrt(9 + 36 + 9) = 7.348, so the parallelogram area is 7.348 and the triangle area is 3.674.

What is the angle between (3, 4, 0) and (4, 0, 0)?

53.13 degrees. The dot product is 12, the cross product magnitude is 16, so sin = 0.8 and the angle is atan2(16, 12). You get the same angle from cos = 12 / 20 = 0.6, which is a good consistency check.

Why is the cross product zero for parallel vectors?

Because sin(theta) is 0 when the angle is 0 or 180 degrees. For a = (2, 1, 0) and b = (4, 2, 0), where b = 2a, every component cancels and the product is (0, 0, 0). A zero result always means parallel, antiparallel, or a zero vector on one side.

How do I get the area of a triangle from a cross product?

Take half the magnitude. For (3, 4, 0) and (4, 0, 0) the magnitude is 16, so the parallelogram area is 16 and the triangle area is 8. For (1, 2, 3) and (4, 5, 6) the triangle area is 7.348 / 2 = 3.674.

What is a unit normal vector and how is it computed?

Divide the cross product by its own length. For (1, 2, 3) and (4, 5, 6) the product is (-3, 6, -3) with magnitude 7.348, so the unit normal is (-0.408, 0.816, -0.408). It has length 1 and points perpendicular to both inputs, in the direction the right-hand rule selects.

Does the order of the vectors matter?

Yes, the cross product is anticommutative: b x a = -(a x b). Entering (3, 4, 0) then (4, 0, 0) gives (0, 0, -16), while the reverse order gives (0, 0, 16). Same magnitude, opposite direction. The areas do not change.

Can I take a cross product in 2D?

The vector cross product needs a third axis to point along, so in 2D the convention is a scalar: a1 b2 - a2 b1. For (3, 1) and (1, 2) that is 5, which is the signed parallelogram area. The widget's 2D mode returns this number and the matching areas.

What is the difference between a dot product and a cross product?

The dot product returns a scalar measuring alignment: (1, 2, 3) . (4, 5, 6) = 32. The cross product returns a vector measuring misalignment: (-3, 6, -3) for the same pair. Dot gives cos(theta), cross gives sin(theta), and only the cross product has a direction.

Why does sin(theta) appear in the magnitude formula?

Because only the perpendicular component of one vector contributes to the area the pair spans. Slide the tip of b parallel to itself until it stands on a, and the parallelogram keeps the same base and height, so the area depends on the sine of the angle, not on the raw lengths.

Is the cross product defined outside three dimensions?

In ordinary vector geometry it is a 3D construction; a genuine vector cross product also exists in 7 dimensions, though almost nobody meets it outside algebra courses. In 2D people use the scalar a1 b2 - a2 b1 instead, and that is what 2D mode on this calculator computes.

How does the cross product relate to torque?

Torque is r x F, the position arm crossed with the force. A 0.3 m wrench pulled with 80 N perpendicular to the handle gives 0.3 x 80 x 1 = 24 N.m. At 60 degrees the same pull gives 0.3 x 80 x 0.866 = 20.78 N.m, about 13 percent less.

What does the right-hand rule tell me?

It fixes which of the two perpendicular directions the answer takes. Point your right fingers along a, curl them toward b, and the thumb points along a x b. It is a convention rather than a law of nature, but every textbook and this calculator use the same one.

Spotted a wrong number or a broken result?

More Math tools

See all Math tools

Fee schedules, rates and rules change without notice. Always confirm important figures with the official source before you rely on them.