Cross Product Calculator – a × b With Steps, Magnitude and Angle

Two vectors go in; a third comes out standing at right angles to both of them. Type in any two 3D vectors — or switch to the 2D version for the planar case — and this calculator expands the i, j, k determinant component by component, measures the angle between your vectors two independent ways, and proves the result is perpendicular by dotting it against both parents.

100% FreeNo sign-up neededInstant results

Your two vectors

a(,,)
b(,,)

The vectors loaded are a = (1, 2, 3) and b = (4, 5, 6) — a friendly first pair, because their cross product (−3, 6, −3) is short enough to check by hand. Decimals and negative components are welcome. In 2D mode each vector keeps its first two components and the whole answer is the single z component.

🔒 Everything is calculated in your browser — your numbers never leave your device.

Advanced options — unit vectors, torque reading and a third vector

Unit vectors, from the same two vectors:

Unit vector of a × b—
Unit vector of a—
Unit vector of b—

Divide the cross product by its magnitude to keep the direction and drop the area.

Third vector c, for the scalar triple product (3D only):

c(,,)
Scalar triple product (a × b) · c—
Box volume—

The sign records orientation: swapping any two of a, b, c flips it. Zero means the three vectors lie flat in one plane.

The readouts below are extra measurements taken from the same two vectors. Opening Advanced options never changes the cross product, magnitude or angle above — those stay exactly as the main calculator computes them.

The cross product

a × b
(-3, 6, -3)
Perpendicular to both a and b — and the panels below prove it two ways.

The measurements

Magnitude |a × b|7.3485
Angle between a and b12.93°
Parallelogram area7.3485
Triangle area3.6742
Copied ✓

The working, component by component

Lay the unit vectors i, j, k over the two rows and expand the determinant. Each component is a small 2×2 determinant of what is left when its column is covered — and the middle one, j, carries a minus sign built into the formula.

The i, j, k determinantCover a column, cross-multiply the corners that remain, subtract
ijk 123 456
i component
a2·b3 − a3·b2
2 × 6 − 3 × 5
= -3
j component
a3·b1 − a1·b3
3 × 4 − 1 × 6
= 6
k component
a1·b2 − a2·b1
1 × 5 − 2 × 4
= -3

Watch the j box: the expansion subtracts the middle minor, so the j component is written a3·b1 − a1·b3. That flipped order — the famous j sign — is where most hand calculations go wrong.

So a × b = (-3, 6, -3)
Its length is an areaThe magnitude of a cross product is the area of the parallelogram the two vectors span

|a × b| = √((-3)² + 6² + (-3)²) = √54 ≈ 7.3485 — the parallelogram area. The triangle on the same two sides is exactly half of it: 3.6742.

Swap the order, flip the signThe cross product is anti-commutative: b × a = −(a × b)

Run the same determinant with the rows exchanged and every component reverses: b × a = (3, -6, 3) = −(a × b). Same length, same area — the opposite direction, because curling your fingers from b toward a points your thumb the other way.

Key takeaways

  • a × b stands perpendicular to both a and b, and its length is the area of the parallelogram the two vectors span.
  • The j component carries a built-in minus sign from the determinant expansion, which is why it is written a3b1 − a1b3 and not the other way round.
  • A zero cross product means the vectors are parallel or one of them is the zero vector — there is no perpendicular direction left to point along.

Checked twice: perpendicular, and the angle measured two ways

A cross product makes two claims, and this page tests both. First, the result must be perpendicular to each parent — dotting it against a and against b must give exactly zero. Second, the angle between your vectors is measured from the dot product (cosine route) and from the cross magnitude (sine route): two independent computations that must agree.

(-3, 6, -3) against both parents
a · (a × b)
1(-3) + 2(6) + 3(-3) = 0
·
b · (a × b)
4(-3) + 5(6) + 6(-3) = 0
✓ Both zero — the result really is perpendicular to a and to b
The angle between a and b, measured twice
Cosine route (dot product)
cos θ = 32 ÷ (3.7417 × 8.775) = 0.97463 → θ = 12.93°
·
Sine route (cross magnitude)
sin θ = 7.3485 ÷ (3.7417 × 8.775) = 0.22381 → θ = 12.93° or 167.07°
✓ The cosine route settles it — the angle is 12.93°
Length of a
3.7417
√(1² + 2² + 3²) = √14 = 3.7417
Length of b
8.775
√(4² + 5² + 6²) = √77 = 8.775
Dot product a · b
32
1×4 + 2×5 + 3×6 = 32 — positive, so the angle between them is acute

Keep going with vectors and matrices

How it works, in 3 steps

1

Split into three 2×2 determinants

Write i, j, k over the two vectors as a three-row grid. Cover each column in turn; the four numbers left behind form a small determinant — cross-multiply its corners and subtract. The middle column’s result is negated: the j sign flip.

2

Combine, then measure

The three numbers are the components of a × b. Its length equals |a| |b| sin θ, which is exactly the area of the parallelogram the two vectors span — so length and area are one number read two ways, and the triangle area is half of it.

3

Check the answer twice

A genuine cross product is perpendicular to both parents, so dotting it against a and against b must give zero. The angle is also computed from the dot product and from the cross magnitude — two routes that have to agree before the answer is called done.

How each answer is worked out

a × b = (a2b3 − a3b2, a3b1 − a1b3, a1b2 − a2b1) — one determinant, three components

Worked example — the vectors loaded above. For 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 = 6, written with the subtraction reversed because the determinant expansion negates the middle term; the k component is 1·5 − 2·4 = −3. So a × b = (−3, 6, −3). Its length is √(9 + 36 + 9) = √54 ≈ 7.3485 — also the parallelogram area. Check the perpendicularity: (−3, 6, −3) dotted with a gives −3 + 12 − 9 = 0, and dotted with b gives −12 + 30 − 18 = 0. Both zero, exactly as a cross product demands.

Worked example — the unit axes. Take a = (1, 0, 0), the direction called i, and b = (0, 1, 0), the direction j. The components are (0·0 − 0·1, 0·0 − 1·0, 1·1 − 0·0) = (0, 0, 1): i × j = k. Swap them and the components are (1·0 − 0·0, 0·1 − 0·0, 0·0 − 1·1) = (0, 0, −1): j × i = −k. The whole of 3D orientation is built from these three little computations.

Worked example — torque, the cross product at work. A lever arm r = (0.3, 0, 0) metres and a force F = (0, 50, 0) newtons give torque τ = r × F = (0·0 − 0·50, 0·0 − 0.3·0, 0.3·50 − 0·0) = (0, 0, 15) newton metres. Neither r nor F points along the axle, yet the torque does — that is precisely the job the cross product exists to do.

Worked example — the 2D version. Two planar vectors produce a single number, the z component: for a = (2, 3) and b = (4, 5), z = 2·5 − 3·4 = −2. Its size, 2, is the area of the parallelogram the vectors span in the plane; its negative sign says b sits clockwise from a (equivalently, the full 3D answer would point into the page rather than out of it).

Deep dives

The cross product formula fixes the result’s length exactly, but two opposite directions are both perpendicular to a and b — so mathematics needs a tie-breaker, and physics supplies one: the right-hand rule. Point the fingers of your right hand along a, curl them toward b, and your thumb gives the direction of a × b. The coordinate system built on i × j = k, j × k = i, k × i = j is called right-handed for exactly this reason.

The convention is not arbitrary decoration. Anti-commutativity — swapping the vectors flips the sign — is the algebraic shadow of the physical fact that curling your fingers the other way points your thumb the other way. A mirror-image (left-handed) coordinate system would reverse every cross product, which is why graphics and physics packages are careful to agree on handedness: get it wrong and every normal, torque and rotation in the scene quietly points backwards.

The magnitude |a × b| is the area of the parallelogram with sides a and b — that is why the angle formula |a| |b| sin θ appears: base times height, with sin θ supplying the height. The 2D z component is the same idea one dimension down: a signed area, whose sign records whether the turn from a to b runs anticlockwise or clockwise.

Add a third vector c and the family completes itself: the scalar triple product (a × b) · c is the signed volume of the box (the parallelepiped) the three vectors span — and it equals the determinant of the 3×3 matrix built from them. Volume zero means the three vectors lie flat in one plane. Determinants, cross products and areas are not three topics but one, seen from three sides: change of scale, measured geometrically.

The unit vector: the direction, with the length divided out

Every cross product carries two pieces of information at once: a direction and a length. Sometimes only the direction matters — a surface normal for lighting, an axis to rotate about, a heading to point along. The unit vector is how you keep the direction and throw the length away. Take the cross product and divide every component by its own magnitude:

û = (a × b) ÷ |a × b|

For the vectors loaded above, a = (1, 2, 3) and b = (4, 5, 6), the cross product is (−3, 6, −3) and its magnitude is 7.3485. Dividing component by component gives the unit vector shown in the table, and the Advanced panel on this page computes it live for any pair you type in.

ComponentCross productDivided by 7.3485Unit vector component
i−3−3 ÷ 7.3485−0.4082
j66 ÷ 7.34850.8165
k−3−3 ÷ 7.3485−0.4082

The check that this really is a unit vector is its own length: (−0.4082)² + (0.8165)² + (−0.4082)² comes to 1.0000 once rounding is allowed for, so û points exactly along a × b and stretches exactly one unit. The same division works on the inputs themselves. The unit vector along a is (0.2673, 0.5345, 0.8018), because |a| is 3.7417, and the unit vector along b is (0.4558, 0.5698, 0.6838), because |b| is 8.7750. Both appear in the Advanced panel beside the unit cross product, so you can compare all three directions at a glance.

Two cautions belong with the recipe. First, a zero cross product has no unit vector: dividing by a magnitude of zero is meaningless, which is the arithmetic echo of the geometry — parallel vectors fix no perpendicular direction at all. Second, in 2D mode the unit direction can only be (0, 0, 1) or (0, 0, −1), out of the page or into it, following the sign of the single z component. A positive signed area points toward you; a negative one points away.

Torque mode: the same product, read as turning

Torque is the cross product at work in the physical world, and it is the clearest reason the order of the two vectors matters. A lever arm r from a pivot to the point where a force F is applied produces a torque

τ = r × F

The torque vector points along the axle the turning happens about, following the right-hand rule from r toward F, and its magnitude is |r| |F| sin θ, where θ is the angle between arm and force. That sine is the whole story of leverage: a force at right angles to the arm turns with its full strength, a force along the arm does not turn at all, and a force at an angle contributes only its perpendicular part.

Take a lever arm r = (0.5, 0, 0) and a force F = (0, 40, 30). The cross product is (0 × 30 − 0 × 40, 0 × 0 − 0.5 × 30, 0.5 × 40 − 0 × 0) = (0, −15, 20), so the torque is 25 newton metres in magnitude: |r| is 0.5, |F| is 50, the force has no component along the arm so sin θ is 1, and 0.5 × 50 × 1 is 25. The torque points partly along negative y and partly along positive z because the force itself is split between those two directions — the cross product keeps that split, where a single-number answer would lose it.

CaseLever arm rForce FTorque τ = r × FMagnitude
Perpendicular push(0.3, 0, 0)(0, 50, 0)(0, 0, 15)15
Angled push(0.5, 0, 0)(0, 40, 30)(0, −15, 20)25
Push along the arm(2, 0, 0)(6, 0, 0)(0, 0, 0)0

The Advanced panel offers a torque reading for exactly this use: it reads your first vector as the lever arm and your second vector as the force, and reports the torque vector and its magnitude. It is a relabelling of the cross product you already computed, not a second calculation — the numbers are the same, and switching the reading on or off cannot change the main result. One honesty note: this calculator is unit-free, so the torque reading takes its units from whatever you typed. Metres for the arm and newtons for the force give newton metres; any other consistent pair of units gives the matching torque unit.

From area to surface normals: where the unit vector earns its keep

The magnitude of a cross product is an area, and the unit vector turns that area into an orientation — a combination computer graphics uses on every triangle it draws. A triangle in a 3D scene has two edge vectors, and crossing them gives a vector perpendicular to the triangle’s face. Divide by its length and you have the unit normal, the direction light calculations need: how bright a face looks depends on the angle between its normal and the light, which is a dot product, so the normal must carry direction only, with no area mixed in.

Take edges (2, 0, 0) and (0, 3, 0). Their cross product is (0 × 0 − 0 × 3, 0 × 0 − 2 × 0, 2 × 3 − 0 × 0) = (0, 0, 6). The parallelogram area is therefore 6, the triangle area is half of that, 3, and the unit normal is (0, 0, 1): straight out of the page. A second pair, edges (1, 0, 0) and (1, 1, 0), gives cross product (0, 0, 1), parallelogram area 1, triangle area 0.5, and the same unit normal (0, 0, 1). Same direction, different area — which is precisely why graphics keeps the two readings separate.

Triangle edgesCross productParallelogram areaTriangle areaUnit normal
(2, 0, 0) and (0, 3, 0)(0, 0, 6)63(0, 0, 1)
(1, 0, 0) and (1, 1, 0)(0, 0, 1)10.5(0, 0, 1)
(1, 2, 3) and (4, 5, 6)(−3, 6, −3)7.34853.6742(−0.4082, 0.8165, −0.4082)

Order matters here exactly as it does for torque: swapping the two edges flips the normal to its opposite, and a renderer reading the flipped normal shades the face as if it faced the other way. The same unit normal also writes the plane through the origin in one line: with normal (−0.4082, 0.8165, −0.4082), the plane is −0.4082x + 0.8165y − 0.4082z = 0. Every point of the plane satisfies it, because dotting the normal with any vector lying in the plane gives zero — the perpendicularity check this page already performs, now doing geometry work.

The determinant, sign by sign: the cofactor pattern that explains the j flip

The determinant expansion is easier to trust once its sign pattern is out in the open. Expanding along the top row of the i, j, k determinant, the three columns carry the cofactor signs plus, minus, plus. The i component keeps its small determinant as it stands, the j component has its small determinant negated, and the k component keeps its own. That single minus sign on the middle column is the whole reason the j component is written a3b1 − a1b3, with the subtraction running in the opposite order from its neighbours.

Column coveredCofactor signSmall 2×2 determinantComponent
i+a2b3 − a3b2a2b3 − a3b2
j−a1b3 − a3b1, then negateda3b1 − a1b3
k+a1b2 − a2b1a1b2 − a2b1

Each small determinant follows the same two-by-two rule: for a grid with top row p, q and bottom row r, s, the determinant is ps − qr, the product of the falling diagonal minus the product of the rising diagonal. The working panels above show every one of these steps for your vectors, so a hand calculation can be compared line by line instead of only at the final answer.

Four mistakes account for most wrong answers, and each has a tell. Forgetting the j flip gives (−3, −6, −3) for the loaded vectors instead of (−3, 6, −3): only the middle sign is wrong, which is the fingerprint of this error. Swapping the two rows negates all three components, giving (3, −6, 3). Adding inside a small determinant instead of subtracting breaks the perpendicularity check — the result no longer dots to zero against its parents, which is how you catch it. And normalising the inputs before crossing quietly changes the answer’s meaning: the cross product of two unit vectors has magnitude sin θ, not the parallelogram area, so the area is lost unless you multiply |a| |b| back in. When a result looks wrong, dot it against both parents first: a genuine cross product always gives zero twice.

Check yourself: four pairs to work by hand

The fastest way to own this calculation is to work a few pairs by hand and then check them here. Each pair below is chosen to teach one thing: a routine case, an axis case where the answer is a single basis vector, a case with mixed signs, and the 2D version where the whole answer is one signed number. The dot-product column is the built-in check — a correct cross product is perpendicular to both parents, so both dots are zero in the 3D cases.

Paira × bMagnitudea · bWhat it teaches
(2, 1, 0) and (0, 3, 1)(1, −2, 6)6.40313Routine three-component working
(1, 0, 0) and (0, 0, 1)(0, −1, 0)10i × k = −j, the axis cycle running backwards
(3, −1, 2) and (1, 4, −2)(−6, 8, 13)16.4012−5Mixed signs and a negative dot product, so an obtuse angle
2D: (3, 4) and (1, 2)z component 22 (signed area)11One number, positive, so the turn is anticlockwise

Verify the first pair against its parents: (1, −2, 6) dotted with (2, 1, 0) is 2 − 2 + 0 = 0, and dotted with (0, 3, 1) is 0 − 6 + 6 = 0. Verify the third pair the same way: (−6, 8, 13) dotted with (3, −1, 2) is −18 − 8 + 26 = 0, and dotted with (1, 4, −2) is −6 + 32 − 26 = 0. If either dot fails to vanish on your own working, the error is in one of the small determinants — and the sign table in the previous section says which one to recheck first.

One more measurement belongs to the same family and lives in the Advanced panel: add a third vector c and form the scalar triple product (a × b) · c, the signed volume of the box the three vectors span. For the loaded vectors, c = (0, 0, 1) gives (a × b) · c = −3, so the box volume is 3. The sign records orientation — swapping any two of the three vectors flips it — and a volume of zero means the three vectors lie flat in a single plane. Try c = (1, 1, 0) as well: the triple product is −3 + 6 = 3, volume 3 again, because only the part of c sticking out of the a–b plane contributes.

The scalar triple product: the volume of a parallelepiped

Three vectors define a solid, and one number gives its volume. The triple product is the cross product put to work a second time.

The scalar triple product of three vectors a, b, and c is a dot (b cross c), the dot product of the first vector with the cross product of the other two, and its absolute value is the volume of the parallelepiped, the slanted box, whose three edges from one corner are a, b, and c. It is computed as a determinant, with the three vectors as the rows or the columns, and the sign carries the orientation: a positive value means the three vectors form a right-handed set in the order given, and swapping any two vectors reverses the sign, exactly as swapping the two vectors of a cross product reverses its direction. For the vectors a = (1, 2, 3), b = (4, 5, 6), and c = (7, 8, 10), the triple product is negative 3, so the parallelepiped they define has a volume of 3 cubic units, and the sign is negative, so the set is left-handed in that order.

The zero case is as informative as the number. A triple product of zero means the three vectors lie in a single plane, coplanar, so the slanted box they define is flat and its volume is nothing: one of the three vectors can be built from the other two, and the three do not span three dimensions. The same test, applied to two vectors, is the angle test: the magnitude of the cross product is the product of the magnitudes times the sine of the angle between them, so a zero cross product means the sine is zero, the angle is 0 or 180 degrees, and the vectors are parallel, pointing the same way or opposite ways. Both tests are used wherever independence matters: in geometry, to test whether three points and a fourth define a volume or a plane; in mechanics, to test whether forces span the space they act in; and in computer graphics, to test whether a surface normal is well defined. The companion guide compares the dot product and the cross product, with the worked examples, so the triple product here can be read as the natural next step from the two products there.

Frequently asked questions

What is the cross product, in plain words?

The cross product of two vectors a and b is a third vector that stands perpendicular to both of them. Its length equals the area of the parallelogram the two vectors span, and its direction follows the right-hand rule: point the fingers of your right hand along a, curl them toward b, and your thumb points along a × b. For a = (1, 2, 3) and b = (4, 5, 6) the cross product is (−3, 6, −3), with length about 7.35.

How do you calculate a cross product by hand?

Write the unit vectors i, j and k as a top row, with a as the second row and b as the third, and expand the determinant. The i component is a2b3 − a3b2; the j component is a3b1 − a1b3 — note the reversed order, because the expansion negates the middle minor; the k component is a1b2 − a2b1. The most common hand-calculation error is forgetting that middle sign flip, which is why this page displays the three sub-determinants separately.

Why does swapping the vectors change the sign?

Because the cross product encodes a direction, and swapping the order reverses the curl of your fingers, so your thumb points the opposite way. Algebraically, every component of b × a is the negative of the matching component of a × b, so b × a = −(a × b). The length, the angle and the areas are all unchanged; only the direction flips.

What does it mean when the cross product is zero?

It means the two vectors are parallel — pointing along the same line, in the same or opposite directions — or that one of them is the zero vector. Parallel vectors span a degenerate parallelogram with zero area, and no unique perpendicular direction exists, so the cross product collapses to (0, 0, 0). This page reports that honestly, with a note, instead of dressing the zero up as an ordinary answer.

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

The dot product takes two vectors and returns a single number, a · b = a1b1 + a2b2 + a3b3, which measures how strongly the vectors agree in direction. The cross product returns a whole vector, perpendicular to both inputs, whose length is the area they span. One answers “how parallel, as a number”; the other answers “what stands at right angles to both, and how big is the patch between them”.

Where is the cross product used?

Anywhere turning, twisting or orientation matters. Torque is r × F; the magnetic force on a moving charge is qv × B; angular momentum is r × p; and computer graphics finds the surface normals that decide how light falls by crossing the edges of each triangle. In every case the needed quantity is the same: a direction perpendicular to two known directions, scaled by the area-like quantity they define.

How do you find the unit vector in the direction of a cross product?

Divide the cross product by its own magnitude: û = (a × b) ÷ |a × b|. For a = (1, 2, 3) and b = (4, 5, 6), the cross product is (−3, 6, −3) with magnitude 7.3485, so the unit vector is (−0.4082, 0.8165, −0.4082). Its length is 1 by construction, so it keeps the direction and drops the area. The Advanced panel computes it live for any pair, and it is undefined when the cross product is the zero vector, because there is no direction to keep.

How is torque different from just multiplying a force by a distance?

Torque is τ = r × F, a vector, not a single number. Its magnitude is |r| |F| sin θ, so only the part of the force perpendicular to the lever arm turns anything: a force along the arm gives zero torque, and a force at right angles gives the full |r| |F|. Its direction, along the axle, tells you which way the turning goes. The Advanced torque reading on this page relabels your first vector as the arm and your second as the force, so (0.5, 0, 0) and (0, 40, 30) read as a torque of (0, −15, 20) with magnitude 25.

Why is the 2D cross product a single number instead of a vector?

In the plane there is only one direction perpendicular to everything in it: straight out of the page. Two planar vectors therefore produce a single z component, which is the signed area of the parallelogram they span. Its sign records the sense of the turn: positive when b turns anticlockwise from a, negative when it turns clockwise. In three dimensions that same number becomes the k component of the full cross product vector.

Does the cross product exist in four dimensions or more?

Not in the familiar form. A vector perpendicular to both inputs, with length equal to the parallelogram area, is special to three dimensions, with one exotic exception in seven dimensions that needs a different algebra. In other dimensions the oriented-area object is the wedge product, and the volume idea survives as the determinant: the scalar triple product on this page is the three-dimensional case, giving the signed volume of the box spanned by three vectors.

What does the scalar triple product measure?

The volume of the parallelepiped, the slanted box, whose three edges from one corner are the three vectors. It is a dot (b cross c), computed as a determinant, and its absolute value is the volume in cubic units. A triple product of zero means the three vectors lie in a single plane and the box is flat, so the test also detects coplanarity: three vectors with a zero triple product do not span three dimensions.

How do you test whether two vectors are parallel with the cross product?

Compute the cross product and check whether it is zero. The magnitude of the cross product is the product of the magnitudes times the sine of the angle between the vectors, so a zero cross product means the sine is zero, the angle is 0 or 180 degrees, and the vectors are parallel, pointing the same way or opposite ways. A non-zero cross product means the vectors are not parallel, and its direction is perpendicular to both of them.

Why does the triple product change sign when two vectors swap?

Because the cross product inside it reverses direction when its two vectors swap, and the dot product with the third vector reverses sign with it. Swapping any two vectors of the triple product reverses the sign, while a cyclic reorder, moving the first vector to the end, leaves it unchanged, because the orientation of the three vectors is preserved. The sign carries the handedness of the set: positive for a right-handed order, negative for a left-handed one, and the absolute value, the volume, is unchanged either way.

More maths calculators

Disclaimer: This calculator is an educational tool. All arithmetic runs in your browser in double-precision decimal, so results are shown rounded — cross products of whole-number vectors are exact, but magnitudes and angles involving square roots are approximations, displayed to 4 decimal places for lengths and areas and 2 for degrees. The angle is computed as atan2(|a × b|, a · b), which stays correct for obtuse angles, where a sine-only formula would return the supplement instead. Nothing you type is stored or transmitted.