Skip to content
Math

Cross Product Calculator

Compute the cross product a x b of two 3D vectors, get the resulting perpendicular vector and its magnitude, the angle between the vectors, the area of the parallelogram they span, the unit normal vector, and the triangle area. Switch to triple product mode to find the scalar triple product and the volume of the parallelepiped.

Your details

Cross product mode gives the perpendicular vector, angle, and areas. Triple product mode adds a third vector and gives the parallelepiped volume.
Cross product a x bNon-parallel vectors
(-3, 6, -3)

The vector perpendicular to both a and b.

x-component-3
y-component6
z-component-3
Magnitude |a x b|7.348469
|a|3.741657
|b|8.774964
Angle between a and b12.9332deg
Parallelogram area7.348469
Triangle area3.674235
Unit normal x-0.408248
Unit normal y0.816497
Unit normal z-0.408248
x-component-3
y-component6
z-component-3

a x b = (-3, 6, -3) with magnitude 7.3485.

  • The result (-3, 6, -3) is perpendicular to both input vectors. Its dot product with each of them is exactly zero.
  • The magnitude 7.3485 equals the area of the parallelogram spanned by a and b. The triangle they form has half that area: 3.6742.
  • The angle between a and b is 12.9332 degrees. The cross product magnitude relates to this as |a x b| = |a||b|sin(theta).
  • Swapping the order to b x a flips every sign, giving a vector that points the opposite direction.

Next stepDivide the result by its magnitude to get the unit normal vector for the plane of a and b.

Formula

a×b=(aybzazby,  azbxaxbz,  axbyaybx)\mathbf{a}\times\mathbf{b} = (a_y b_z - a_z b_y,\; a_z b_x - a_x b_z,\; a_x b_y - a_y b_x)

Worked example

For a = (1, 2, 3) and b = (4, 5, 6): x = 2*6 - 3*5 = -3, y = 3*4 - 1*6 = 6, z = 1*5 - 2*4 = -3, so a x b = (-3, 6, -3). Magnitude = sqrt(9 + 36 + 9) = sqrt(54) = 7.3485. Parallelogram area = 7.3485; triangle area = 3.6742. Angle = atan2(7.3485, 32) = 12.93 deg. Unit normal = (-0.4082, 0.8165, -0.4082).

How the cross product is computed

The cross product takes two vectors in three-dimensional space and returns a third vector perpendicular to both. Each component is a 2x2 determinant built from the other two coordinate planes: the x-component uses y and z values, the y-component uses z and x values, and the z-component uses x and y values. The classic memory aid is the symbolic 3x3 determinant with unit vectors i, j, k in the first row, followed by the components of a and then b. Unlike the dot product, which returns a single number, the cross product returns a full vector and is unique to three dimensions.

Direction, magnitude, and the right-hand rule

The direction of a x b follows the right-hand rule: point your fingers along a, curl them toward b, and your thumb points along the result. Because of this, order matters. The vectors a x b and b x a have equal length but point in opposite directions, so the cross product is anti-commutative. The magnitude equals |a||b|sin(theta), where theta is the angle between the vectors. This is exactly the area of the parallelogram spanned by a and b. When the vectors are parallel the sine is zero and the cross product collapses to the zero vector. When they are perpendicular the magnitude is simply the product of their lengths.

Angle between vectors and geometric areas

The angle formula |a x b| = |a||b|sin(theta) can be inverted to find theta once you know the magnitudes and the cross product magnitude. This calculator uses atan2(|a x b|, a.b) for numerical stability, which correctly handles all quadrants. The parallelogram area is the magnitude of the cross product directly. The triangle area is half of that, since any triangle is half of the parallelogram formed by two of its sides. These two results are widely used in computational geometry, where checking the sign of the cross product component indicates whether a turn is left or right.

Unit normal vector

Dividing the cross product by its magnitude gives the unit normal vector n-hat = (a x b) / |a x b|. This is a vector of length 1 perpendicular to both a and b, pointing in the direction given by the right-hand rule. Unit normals are essential in 3D graphics for lighting calculations (Phong shading uses the surface normal and the light direction), in physics for defining the orientation of a surface element, and in geometry for specifying a plane. The calculator shows all three components of the unit normal when the cross product is non-zero.

Scalar triple product and parallelepiped volume

The scalar triple product a . (b x c) extends the cross product to three vectors. It equals the volume of the parallelepiped whose three edges are a, b, and c. A positive value means the three vectors form a right-handed triple; a negative value means a left-handed triple; zero means the vectors are coplanar and the parallelepiped degenerates to a flat figure with no volume. The scalar triple product is cyclic: a . (b x c) = b . (c x a) = c . (a x b). Switch to triple product mode and supply the three components of vector c to compute this.

Applications in physics and engineering

Cross products appear throughout physics and engineering. Torque is the cross product of a position vector and a force. Angular momentum couples position with linear momentum the same way. The magnetic force on a moving charge equals the cross product of the velocity and the field. In computer graphics and geometry, the cross product of two edge vectors gives the surface normal used for lighting and collision tests. One half of the magnitude gives the triangle area, so it is also used in mesh area calculations. The scalar triple product appears in the mixed product formula for the volume of general polyhedra and in crystallography for computing unit cell volumes.

Cross products of the standard unit vectors

a x bResultInterpretation
i x jkRight-handed, positive
j x kiRight-handed, positive
k x ijRight-handed, positive
j x i-kLeft-handed, negative
k x j-iLeft-handed, negative
i x k-jLeft-handed, negative
i x i0Parallel (zero cross product)
j x j0Parallel (zero cross product)
k x k0Parallel (zero cross product)

The right-handed cycle i to j to k to i gives positive results. Reversing the order flips the sign.

Frequently asked questions

What is the cross product of two vectors?

The cross product a x b of two 3D vectors is a new vector perpendicular to both. Its components are (a_y*b_z - a_z*b_y, a_z*b_x - a_x*b_z, a_x*b_y - a_y*b_x) and its length equals the area of the parallelogram the two vectors span. The direction follows the right-hand rule.

How is the cross product different from the dot product?

The dot product returns a single scalar that measures how much two vectors align, while the cross product returns a vector perpendicular to both inputs. The dot product works in any dimension; the standard cross product is specific to three dimensions. The dot product is maximized when vectors are parallel; the cross product is maximized when they are perpendicular.

Why is my cross product the zero vector?

A zero result means the two vectors are parallel or anti-parallel (one is a scalar multiple of the other), or one of them is the zero vector. In those cases the vectors do not span a parallelogram, so its area and therefore the magnitude are zero.

How do I find the angle between two vectors using the cross product?

The magnitude formula |a x b| = |a||b|sin(theta) lets you solve for theta. Compute |a x b|, divide by the product of the individual magnitudes |a| and |b|, and take the arcsine. This calculator uses atan2(|a x b|, a.b) which is more numerically stable and handles obtuse angles correctly.

What is the scalar triple product and why does it give volume?

The scalar triple product a . (b x c) computes the dot product of a with the cross product of b and c. Geometrically, b x c gives the area and orientation of the base of the parallelepiped, and dotting with a projects the height onto that normal, giving the signed volume. The absolute value is the actual volume.

How do I get the unit normal to a plane from two vectors?

Compute a x b to get a vector perpendicular to both a and b, then divide every component by its magnitude |a x b|. The result is the unit normal n-hat with length exactly 1. This is shown in the outputs when the cross product is non-zero. If you know two edges of a triangle or a face of a mesh, this is the standard way to get its surface normal.

Sources

Written by Dr. Rajiv Menon, PhD Applied Mathematician · Bengaluru, India

Applied mathematician bridging algebraic theory and computational tools for students, engineers, and everyday problem-solvers.

Search 3,500+ calculators

Loading search…