Cross Product Calculator – A × B from 3D Components or AB sin θ
Use this free Cross Product Calculator in two ways: enter the 3D components of two vectors to get the full cross product vector A × B, or enter two magnitudes and the angle between them to get |A × B| = AB sin θ.
If the dot product measures how parallel two vectors are, the cross product measures how perpendicular — and it answers with a vector of its own. A × B points in the one direction that is perpendicular to both A and B, and its length is |A| |B| sin θ: zero when the vectors are parallel (nothing perpendicular about them), maximal when they are at right angles. Turning effects, areas and rotations all live in that statement, which is why the cross product — despite being defined only in three dimensions — runs some of the most important formulas in physics: torque, angular momentum and the magnetic force.
The direction is fixed by the right-hand rule: point the fingers of your right hand along A, curl them towards B, and your thumb indicates A × B. The rule sounds like a classroom trick, but it encodes something real — nature's rotations genuinely do pick out an axis this way, and every spinning thing from a bicycle wheel to a planet carries an angular velocity vector defined by exactly this convention. It also means the cross product is anti-commutative: B × A points the opposite way, because curling from B to A turns your thumb over.
This calculator offers the two faces of the operation. Components mode applies the determinant-style formula and returns the full vector plus its magnitude. Magnitudes mode applies |A × B| = AB sin θ when only sizes and the included angle are known — the form in which torque and magnetic-force problems usually arrive. The two modes agree wherever both apply, and checking one against the other is a sound habit.
Formula
A × B = (AyBz − AzBy, AzBx − AxBz, AxBy − AyBx) with magnitude |A × B| = AB sin θ
Each component is a small difference of products, and there is a pattern that makes it memorable: the x component uses only y and z ingredients, the y component only z and x, the z component only x and y — cyclically, each axis is built from the other two. (Note the y component is written AzBx − AxBz; reversing it is the classic sign error.) The magnitude formula rearranges to sin θ = |A × B| / (AB), which finds the angle between vectors — though the dot product's cos θ version is usually preferred, since sin θ cannot distinguish θ from 180° − θ. A built-in audit is always available: the true A × B must be perpendicular to both inputs, so (A × B) · A and (A × B) · B must both come out zero.
| Symbol | Meaning | Units |
|---|---|---|
| A × B | cross (vector) product — a vector perpendicular to A and B | product of the vectors' units (e.g. m × N = N·m) |
| |A × B| | its magnitude = AB sin θ = area of the parallelogram on A and B | product of the units |
| θ | angle between A and B, tails together | degrees, 0° to 180° |
| î, ĵ, k̂ | unit vectors along the x, y and z axes | unitless |
An area wearing a direction
The magnitude |A × B| has a picture worth keeping: it is the area of the parallelogram with sides A and B. The reasoning is one line — area = base × height, the base is |A|, and the height is the part of B perpendicular to A, namely |B| sin θ. Everything about the magnitude then makes sense geometrically. Parallel vectors span no parallelogram, so the area (and the cross product) is zero. Right-angled vectors span a full rectangle, the maximum area for their lengths. And a triangle built on A and B has exactly half the parallelogram's area, |A × B| / 2 — a formula surveyors and graphics programmers use constantly.
The cross product takes that area and pins it to the axis the area faces. That marriage — size from geometry, direction from the right-hand rule — is what makes the operation perfect for rotation physics. A torque is a force's turning effect: it grows with the lever arm, with the force, and with how perpendicular the two are (the sin θ), and it acts about an axis. r × F packages all three facts into one vector whose direction is the axle the turning happens around. The dot product could never do this job; it throws direction away. The cross product exists because rotation needed a bookkeeping system, and this is it.
How to use
- Pick a mode: components for the full 3D vector answer, or magnitudes + angle for just the size.
- Enter the values and click "Calculate Cross Product".
- In components mode, read the vector (x, y, z) and its magnitude; check it if you like by dotting it with each input — both dot products must be zero.
- In magnitudes mode, try A = 5, B = 4, θ = 30°: |A × B| = 5 × 4 × sin 30° = 10.
Worked examples
Example 1 — components mode. Let A = (1, 2, 3) and B = (4, 5, 6). A × B = (2×6 − 3×5, 3×4 − 1×6, 1×5 − 2×4) = (−3, 6, −3). Its magnitude is √(9 + 36 + 9) = √54 = 7.35. Audit: (−3)(1) + (6)(2) + (−3)(3) = −3 + 12 − 9 = 0 ✔ — perpendicular to A, as required.
Example 2 — magnitudes mode. With A = 5, B = 4 and θ = 30° between them: |A × B| = 5 × 4 × sin 30° = 20 × 0.5 = 10. The same two vectors at 90° would give the maximum, 20; at 0° they would give 0.
Example 3 — the unit vectors. î × ĵ = (1, 0, 0) × (0, 1, 0) = (0×0 − 0×1, 0×0 − 1×0, 1×1 − 0×0) = (0, 0, 1) = k̂. The axes cross into each other cyclically: î × ĵ = k̂, ĵ × k̂ = î, k̂ × î = ĵ — the skeleton key to the whole formula.
Example 4 — axis vectors with sizes. A = (2, 0, 0) and B = (0, 3, 0): A × B = (0×0 − 0×3, 0×0 − 2×0, 2×3 − 0×0) = (0, 0, 6), magnitude 6 = 2 × 3 × sin 90°. The parallelogram here is a plain 2-by-3 rectangle, and its area is 6 — the geometry and the algebra agree.
Example 5 — a flat pair with a negative result. A = (1, 2, 0) and B = (3, 4, 0) both lie in the x–y plane, so their cross product must point along z: A × B = (0, 0, 1×4 − 2×3) = (0, 0, −2), magnitude 2. The negative z says B is "clockwise" from A in the plane — swap the order and the answer is (0, 0, +2).
Example 6 — torque. A spanner of length 0.3 m along x, r = (0.3, 0, 0) m, is pulled at its end with F = (0, 50, 0) N. τ = r × F = (0×0 − 0×50, 0×0 − 0.3×0, 0.3×50 − 0×0) = (0, 0, 15) N·m — a torque of 15 N·m about the z-axis (the bolt's axis). Pull at 30° to the spanner instead and sin 30° halves the useful part: |τ| = 0.3 × 50 × 0.5 = 7.5 N·m, which is why you instinctively pull a spanner at right angles.
The cross product in real life
Torque everywhere. τ = r × F governs spanners, door handles (push far from the hinge, at right angles — maximum r, maximum sin θ), bicycle pedals, and the steering of spacecraft by reaction wheels. Example 6 is the template for all of them.
The magnetic force. A charge moving through a magnetic field feels F = qv × B, always perpendicular to both its velocity and the field — which is why magnetic forces bend paths into circles and spirals without ever speeding the charge up. Electric motors, mass spectrometers and the aurora all run on this cross product.
Angular momentum. L = r × p measures rotation the way momentum measures straight-line motion. Its conservation is why a spinning skater speeds up when pulling her arms in (r shrinks, so the rotation rate must grow to keep L fixed) and why planets sweep out equal areas in equal times.
Surface normals in graphics. Every 3D renderer computes the cross product of two edges of each triangle to find which way the surface faces — for lighting, for culling hidden faces, for collision response. A video game frame contains millions of cross products.
Areas of plots and triangles. Given two sides of a triangular plot as vectors, the area is |A × B| / 2 (for Example 1's pair, 7.35 / 2 = 3.68 square units). Surveyors and GIS software use the component form directly on coordinates.
The Coriolis effect. The deflection of winds and ocean currents on the rotating Earth is written with Ω × v, the planet's angular velocity crossed with the moving air's velocity — the reason hurricanes spin one way in the northern hemisphere and the other way in the southern.
The unit-vector cycle and the determinant shortcut
| Product | Result | Product | Result |
|---|---|---|---|
| î × ĵ | k̂ | ĵ × î | −k̂ |
| ĵ × k̂ | î | k̂ × ĵ | −î |
| k̂ × î | ĵ | î × k̂ | −ĵ |
| î × î (and ĵ × ĵ, k̂ × k̂) | 0 | A × A | 0 |
Read the left column cyclically — î → ĵ → k̂ → î — and every forward step gives the next axis, positive; every backward step is negative. Expanding A × B into unit vectors and applying this table is exactly how the component formula is derived, and many people find it the most reliable way to recompute a cross product by hand. The alternative memory aid is the determinant: write î, ĵ, k̂ over the components of A over the components of B and expand — the same three differences of products fall out, in the same order.
One level deeper sits the scalar triple product, A · (B × C): cross two vectors into an area vector, then dot the third into it to get the volume of the box (parallelepiped) the three vectors span. For the axis-aligned triple A = (2, 0, 0), B = (0, 3, 0), C = (0, 0, 4), B × C = (12, 0, 0) and A · (B × C) = 24 — exactly the box's volume 2 × 3 × 4. A triple product of zero is the definitive test that three vectors lie in one plane, which is how crystallographers check whether a direction lies in a crystal face and how engineers test whether a bracket's three struts can be coplanar.
Quick reference: |A × B| for |A| = |B| = 10
| Angle θ | sin θ | |A × B| = 100 sin θ | Parallelogram |
|---|---|---|---|
| 0° | 0 | 0 | collapsed to a line |
| 30° | 0.5 | 50 | half the maximum area |
| 45° | 0.707 | 70.71 | a diamond |
| 60° | 0.866 | 86.6 | nearly a rectangle |
| 90° | 1 | 100 | full rectangle — the maximum |
Because sin θ = sin(180° − θ), the table is symmetric: vectors at 150° span the same parallelogram as vectors at 30°. The magnitude alone cannot tell an acute pair from an obtuse one — another reason the dot product, whose cosine changes sign at 90°, is the better angle-finder.
Common mistakes
- Swapping the order and losing the sign. B × A = −(A × B). In torque and magnetism the order is fixed by the physics (r × F, v × B); reversing it reverses the predicted rotation or force.
- Reversing the y component. The middle component is AzBx − AxBz. Written the other way it flips the sign of y only — the most common hand-calculation error in this topic, and the perpendicularity audit (dot the result with A and B) catches it instantly.
- Using cosine instead of sine in magnitudes mode. |A × B| = AB sin θ. Cosine belongs to the dot product. Mixing them swaps the parallel and perpendicular answers entirely — at θ = 0 the cross product must be zero, and cos would give the maximum.
- Expecting the answer to lie in the same plane. For two vectors in the x–y plane, A × B points along ±z — out of the plane. Reporting it as a 2D direction is a category error; in 2D work only its z component (a signed area) is used.
- Forgetting the audit. A cross product must be perpendicular to both inputs. Thirty seconds of dotting — as in Example 1 — verifies all three components at once; skipping it lets sign errors through to everything built on top.
FAQ
What direction does A × B point?
It is perpendicular to both A and B, in the direction given by the right-hand rule: point your fingers along A, curl them towards B, and your thumb points along A × B.
Does the order matter?
Yes — the cross product is anti-commutative: B × A = −(A × B). Swapping the vectors flips the direction, while the magnitude stays the same.
When is the cross product zero?
When the vectors are parallel or anti-parallel (θ = 0° or 180°, so sin θ = 0), or if either vector is the zero vector. This is why torque τ = r × F vanishes when the force acts along the lever arm.
What are the units of a cross product?
The product of the inputs' units: metres × newtons = newton-metres for torque, (m/s) × tesla × coulomb = newtons for the magnetic force. The direction is carried by the vector itself, not by the unit.
Can I take the cross product of two 2D vectors?
Formally the cross product needs 3D, but two vectors in the x–y plane produce a result purely along z: (0, 0, AxBy − AyBx). That single number — a signed area — is what 2D physics and graphics actually use, and this calculator returns it if you enter the z components as 0.
What is A × A?
Zero, always: a vector is parallel to itself, sin 0° = 0, and the parallelogram collapses. The same holds for any parallel pair, A × (kA) = 0 for any scalar k.
Why is there no cross product in higher dimensions?
The construction "a vector perpendicular to both, with magnitude AB sin θ" works cleanly only in three dimensions (and, exotically, seven). In 2D the result escapes the plane; in 4D there is a whole plane of perpendicular directions, so no unique answer exists. The dot product, by contrast, works in any dimension.
How do I check a cross product by hand?
Dot it with each input: (A × B) · A must be 0 and (A × B) · B must be 0, because the result is perpendicular to both. Any non-zero value locates an arithmetic or sign error immediately.
When is |A × B| at its maximum?
At θ = 90°, where sin θ = 1 and |A × B| = AB. It is the same reason a spanner works best pulled at right angles and a door is easiest to push perpendicular to its surface.
Is the cross product distributive — does A × (B + C) = A × B + A × C?
Yes, it distributes over addition (and respects scalar multiplication), which is precisely why expanding it in unit vectors reproduces the component formula. It is not, however, associative: (A × B) × C generally differs from A × (B × C).