How to use the cross product calculator
- Enter the x, y and z components for vector A.
- Enter the three components for vector B.
- The cross product vector, its magnitude and the unit vector appear automatically.
- Swap the inputs to see how reversing the order negates the result.
How the cross product formula works
The cross product of two 3D vectors A = (a1, a2, a3) and B = (b1, b2, b3) produces a third vector that is perpendicular to both. Each component is computed as follows:
- c1 = a2b3 - a3b2
- c2 = a3b1 - a1b3
- c3 = a1b2 - a2b1
For example, if A = (2, 3, 4) and B = (5, 6, 7), then c1 = 3(7) - 4(6) = -3, c2 = 4(5) - 2(7) = 6, and c3 = 2(6) - 3(5) = -3. The resulting vector is (-3, 6, -3). You can verify this by checking that the dot product of the result with either original vector equals zero.
Reference table of common cross products
The standard basis vectors i, j and k follow a cyclic pattern. Memorizing these six results makes manual calculations faster.
| A | B | A × B |
|---|---|---|
| (1, 0, 0) | (0, 1, 0) | (0, 0, 1) |
| (0, 1, 0) | (0, 0, 1) | (1, 0, 0) |
| (0, 0, 1) | (1, 0, 0) | (0, 1, 0) |
| (0, 1, 0) | (1, 0, 0) | (0, 0, -1) |
| (0, 0, 1) | (0, 1, 0) | (-1, 0, 0) |
| (1, 0, 0) | (0, 0, 1) | (0, -1, 0) |
Notice that reversing the order of the operands flips the sign of every component. This property is called anticommutativity.
Geometric meaning and practical uses
The magnitude of the cross product equals the area of the parallelogram formed by the two vectors. If you need the area of a triangle defined by two edge vectors, simply halve that magnitude. This relationship makes the operation essential in geometry and physics.
In computer graphics, surface normals are found by taking the cross product of two edges of a polygon. Lighting models use those normals to determine how bright each face appears. In physics, torque is the cross product of the position vector and the force vector, and the magnetic force on a moving charge involves the cross product of velocity and the magnetic field.
When working with linear systems, tools like a determinant calculator or matrix calculator handle related matrix operations, but the cross product specifically targets 3D vector geometry.
Common mistakes to avoid
The most frequent error is confusing the cross product with the dot product. The dot product returns a single scalar value, while the cross product returns a vector. They serve different purposes and are not interchangeable.
Another mistake is assuming the cross product works in two dimensions. It is strictly defined for three-dimensional vectors. If you only have 2D vectors, set the z component to zero before using this cross product calculator.
Finally, remember that the cross product is not commutative. Swapping A and B gives the negative of the original result: B × A = -(A × B). Always keep track of operand order when computing normals or torques.
Why the result is perpendicular
The cross product vector is orthogonal to both input vectors by construction. You can prove this by taking the dot product of the result with either input. Using the earlier example where A = (2, 3, 4) and A × B = (-3, 6, -3):
2(-3) + 3(6) + 4(-3) = -6 + 18 - 12 = 0
A dot product of zero confirms perpendicularity. This property holds for any pair of non-parallel vectors. When the inputs are parallel or one is the zero vector, the cross product is the zero vector, which has no defined direction.
Worked examples
Each result below was produced by the same code the tool runs, so you can check your own numbers against them.
| Example | Input | Result |
|---|---|---|
| Standard basis i × j | Vector A (x): 1; Vector A (y): 0; Vector A (z): 0; Vector B (x): 0; Vector B (y): 1; Vector B (z): 0 | Cross product A × B: (0, 0, 1); Magnitude: 1; Unit vector: (0, 0, 1); Perpendicular check: Verified |
| Two arbitrary vectors | Vector A (x): 2; Vector A (y): 3; Vector A (z): 4; Vector B (x): 5; Vector B (y): 6; Vector B (z): 7 | Cross product A × B: (-3, 6, -3); Magnitude: 7.34847; Unit vector: (-0.408248, 0.816497, -0.408248); Perpendicular check: Verified |
| Parallel vectors (zero result) | Vector A (x): 1; Vector A (y): 2; Vector A (z): 3; Vector B (x): 2; Vector B (y): 4; Vector B (z): 6 | Cross product A × B: (0, 0, 0); Magnitude: 0; Unit vector: Undefined |
| Negative components | Vector A (x): -1; Vector A (y): 2; Vector A (z): -3; Vector B (x): 4; Vector B (y): -5; Vector B (z): 6 | Cross product A × B: (-3, -6, -3); Magnitude: 7.34847; Unit vector: (-0.408248, -0.816497, -0.408248); Perpendicular check: Verified |
FAQ
What does a cross product calculator do?
It takes two 3D vectors and computes a third vector that is perpendicular to both. It also provides the magnitude and unit vector of the result.
Can I compute the cross product of 2D vectors?
The cross product is defined only in three dimensions. For 2D vectors, add a z component of zero and use this tool normally.
Why is my cross product the zero vector?
If the two input vectors are parallel or if either vector has all zero components, the cross product is (0, 0, 0).
Is the cross product commutative?
No. Reversing the order of the vectors negates the result: B x A = -(A x B).
What is the difference between the cross product and the dot product?
The dot product yields a scalar representing projection, while the cross product yields a vector perpendicular to the inputs whose magnitude equals the parallelogram area.
Does this tool upload my data?
No. All calculations happen locally in your browser. Nothing is transmitted to any server.