Skip to content
ScienceQuest
Maths & Data Visualiser School

3D Vector and Cross Product Explorer

Turn two vectors in space and watch their cross product stand perpendicular to both, with the parallelogram whose area is its length.

Visualiser

Drag the scene to turn it, or use the arrow keys. Space plays and pauses.

a x b
Perpendicular to both inputs. Turn the scene until it points at you to see that.
(1.5, -4.5, 6.5)
Length of the cross product
Equals the parallelogram area, 8.047, computed from |a||b|sin(theta) by a different route.
8.047
Angle between
Neither parallel nor perpendicular.
55.65 deg
Dot product
Zero exactly when the vectors are perpendicular. Negative when the angle is obtuse.
5.5
Triangle area
Half the parallelogram, which is the triangle with a and b as two of its sides.
4.023
Box volume with a x b
The scalar triple product. Zero whenever the three vectors lie in a plane.
64.75
Parameters

Same size, opposite direction. The clearest way to see that the cross product does not commute.

Its area is exactly the length of the cross product, which is why that length means something.

The parallelepiped spanned by a, b and their cross product. Its volume is the triple product.

Three things to try. Make the two vectors parallel and watch the parallelogram collapse and the cross product vanish. Turn on b x a and see the answer flip while its length stays the same. Then turn the scene until the cross product points straight at you, which is the moment the right-hand rule stops being a mnemonic.

Citing this tool

Last updated . Add the date you accessed it as well, which a citation of a page that can change asks for. If a specific result matters, cite the permalink from the tool’s share row instead of this page: it reproduces the exact parameters.

Teaching with this? You can put it on a class page or LMS for free, with no ads inside the frame. Get the embed code.

The equation

a⃗×b⃗=(aybz−azbyazbx−axbzaxby−aybx),∣a⃗×b⃗∣=∣a⃗∣∣b⃗∣sin⁡θ\vec{a} \times \vec{b} = \begin{pmatrix} a_y b_z - a_z b_y \\ a_z b_x - a_x b_z \\ a_x b_y - a_y b_x \end{pmatrix}, \quad |\vec{a} \times \vec{b}| = |\vec{a}||\vec{b}|\sin\theta

Vector analysis, Gibbs and Wilson (1901)

The only operation here whose answer points somewhere

A dot product gives you a number. A cross product gives you a direction, and that is why it is the one piece of vector algebra that genuinely needs three dimensions to teach. You can compute the components correctly every time and still not know where the answer points.

Three facts make the whole topic, and each is a line of algebra and an obvious feature of the picture:

  • It is perpendicular to both inputs.
  • Its length is the area of the parallelogram they span.
  • Swapping the inputs reverses it.

Perpendicular, and why the algebra says so

Take the dot product of a × b with a. Every term appears twice with opposite signs, so it cancels to zero, and a zero dot product is the definition of perpendicular. The same happens with b.

That is a proof and it is not a picture. Turn the scene until the cross product points straight at you and the two inputs flatten into the plane of the screen. What you are looking at is that cancellation.

Its length is an area

Work the magnitude out and you get |a||b|sin θ. That is base times perpendicular height, which is the area of the parallelogram the two vectors span. The sine is what does it: it picks out the part of b at right angles to a, which is the height.

This immediately explains the case that otherwise looks like a special rule. Make the vectors parallel and the parallelogram collapses to a line. No area, so no cross product. Zero is not an exception here, it is the formula working.

The tool computes the length from the components and the area from the angle, deliberately by separate routes, so you can watch two different calculations agree.

Why order matters, and why it does not for the dot product

A plane has two perpendicular directions, one out of each face. Nothing in the geometry prefers either. The right-hand rule is the convention that picks one, and reversing the order of the multiplication reverses the handedness, so the answer flips while its length is untouched.

The dot product has no such problem because a number has no side to be on. That asymmetry between the two products is not an algebraic quirk, it is the difference between producing a quantity and producing an orientation.

Two products, two jobs
Question Use Example
How much do these agree?DotWork, flux, power
What axis do these define?CrossTorque, angular momentum
Are they perpendicular?Dot is zeroOrthogonality tests
Are they parallel?Cross is zeroCollinearity tests

The triple product is a volume, and a coplanarity test

Feed three vectors in and a · (b × c) gives the volume of the box they span, with a sign that records handedness. Its most useful property falls straight out of that: the volume is zero exactly when the three vectors lie in one plane, because a box with no thickness holds nothing.

That makes it the standard test for coplanarity, and much faster than hunting for a plane through three vectors. Cycling the three leaves the value alone; swapping any two flips its sign, for the same reason the cross product anticommutes.

One thing drawn out of scale, on purpose

The cross product arrow is shortened, and everything else in the scene is to scale. Its true length is an area, so it grows as the product of the inputs rather than in step with them: two vectors of length 5 at right angles produce a cross product of length 25. Drawn honestly it would leave the canvas, or squash the inputs into nothing.

Since the picture exists to show the direction, the arrow is scaled to sit beside its inputs and the readout carries the real length.

Common mistakes

  • Getting the middle component backwards. It is a_z b_x − a_x b_z, following the cyclic order. Writing it the other way round flips only that component, which gives a vector perpendicular to nothing.
  • Expecting the cross product to commute. It reverses. Only its length is unchanged.
  • Treating a zero cross product as an error. It means the vectors are parallel. That is information, and often the thing you were checking for.
  • Using the cross product on two-dimensional vectors. It only exists in three dimensions. In two you can compute the scalar a_x b_y − a_y b_x, which is the signed area, but it is not a vector.
  • Confusing which product is which for work and torque. Work is a dot product, because only motion along the force counts. Torque is a cross product, because the geometry defines an axis.
  • Assuming a right angle gives the largest dot product. It gives the largest cross product and a dot product of zero. The two are at their extremes in opposite places.

Common questions

Why is the cross product perpendicular to both vectors?

Because that is what the formula computes, and you can check it in one line: take the dot product of the result with either input and every term cancels in pairs. For the first input you get a_x times the quantity a_y b_z minus a_z b_y, plus the corresponding terms, and each product appears twice with opposite signs. So the result is zero, which is the definition of perpendicular. The reason this is worth seeing rather than proving is that a page of components gives no sense of direction at all. Turn the scene until the cross product points at you and the two input vectors flatten into the plane you are looking at, which is the geometric content of that algebraic cancellation.

Why is the length of the cross product an area?

Because the magnitude works out to the length of one vector times the length of the other times the sine of the angle between them, and that is exactly the base times perpendicular height of the parallelogram they span. The sine is doing the work: it picks out the part of the second vector that is at right angles to the first, which is the height. This also explains why the cross product vanishes for parallel vectors: the parallelogram has collapsed to a line and has no area. The tool computes the length from the components and the area from the angle by separate routes, so you can watch two different calculations land on the same number.

Why does a x b not equal b x a?

Because the cross product has to choose a side, and swapping the inputs swaps which side it chooses. The perpendicular direction to a plane is genuinely ambiguous: there are two, one on each face. The right-hand rule is the convention that resolves it, and reversing the order reverses the handedness, so the result flips to point the opposite way while keeping exactly the same length. This is unlike the dot product, which is symmetric because it produces a number and a number has no direction to flip. Toggling the order in the tool is the quickest way to see that anticommutativity is a fact about orientation rather than an algebraic quirk.

What does the scalar triple product tell me?

It is the volume of the box, strictly the parallelepiped, spanned by three vectors, and it is signed. The magnitude is the volume and the sign tells you whether the three form a right-handed or a left-handed set. Its most useful property is that it is zero exactly when the three vectors lie in a common plane, because a box with no thickness has no volume. That makes it the standard test for coplanarity, and it is far quicker than trying to find a plane through them. Cycling the three vectors leaves it unchanged, while swapping any two flips its sign, both of which follow from the same handedness argument as anticommutativity.

When would I use the cross product rather than the dot product?

Use the dot product when you want to know how much two directions agree, and the cross product when you want the axis that two directions define. Work is a dot product, because only the part of a force along the motion does any work. Torque is a cross product, because a force applied off-axis defines an axis of rotation, and the further out and the more perpendicular the force, the greater the twist. The same split appears throughout physics: magnetic force on a moving charge, angular momentum and the area of a surface element are all cross products, while flux, power and projections are all dot products.

Why is the cross product arrow drawn shorter than it should be?

Because its length is an area, so in the same units as the inputs it grows as their product rather than in step with them. Two vectors of length five at right angles give a cross product of length twenty five, which would either run far off the canvas or force the inputs down to almost nothing to fit alongside it. Since the point of the picture is the direction the result points, the arrow is scaled to sit comfortably beside its inputs and the true length is reported in the readout. Everything else in the scene, including the parallelogram, is drawn to scale.