Cross Product Calculator

Calculate the cross product of two vectors. This calculator will help you find the cross product of two vectors.

Vector A

Vector B

Cross Product (A x B = C)

Enter values for both vectors and click calculate.

Introduction to vector products

In vector algebra, there are several ways to multiply vectors together. While the dot product results in a scalar value, the cross product produces a new vector that is perpendicular to both original vectors. This operation is fundamental in numerous applications across physics, engineering, computer graphics, and more.

Definition of the cross product

The cross product (also called the vector product) of two vectors a\vec{a} and b\vec{b} is denoted by a×b\vec{a} \times \vec{b} and results in a vector that is:

  1. Perpendicular to both a\vec{a} and b\vec{b}
  2. Has a magnitude equal to absinθ|\vec{a}||\vec{b}|\sin\theta, where θ\theta is the angle between the vectors
  3. Points in the direction determined by the right-hand rule

Mathematically, for two vectors in three-dimensional space:

If a=(a1,a2,a3)\vec{a} = (a_1, a_2, a_3) and b=(b1,b2,b3)\vec{b} = (b_1, b_2, b_3), then:

a×b=(a2b3a3b2a3b1a1b3a1b2a2b1)\vec{a} \times \vec{b} = \begin{pmatrix} a_2b_3 - a_3b_2 \\ a_3b_1 - a_1b_3 \\ a_1b_2 - a_2b_1 \end{pmatrix}

This can also be represented using the determinant notation:

a×b=ijka1a2a3b1b2b3\vec{a} \times \vec{b} = \begin{vmatrix} \vec{i} & \vec{j} & \vec{k} \\ a_1 & a_2 & a_3 \\ b_1 & b_2 & b_3 \end{vmatrix}

Where i\vec{i}, j\vec{j}, and k\vec{k} are the standard unit vectors in the xx, yy, and zz directions respectively.

The right-hand rule

The direction of the cross product follows the right-hand rule:

  1. Position your right hand so that your fingers point in the direction of the first vector a\vec{a}
  2. Curl your fingers toward the second vector b\vec{b}
  3. Your thumb now points in the direction of the cross product a×b\vec{a} \times \vec{b}

This rule establishes that the cross product in a right-handed coordinate system produces a vector that completes a right-handed system with the two input vectors.

Properties of the cross product

The cross product has several important properties:

1. Anti-commutativity

a×b=(b×a)\vec{a} \times \vec{b} = -(\vec{b} \times \vec{a})

The order of vectors matters in a cross product. Reversing the order negates the result.

2. Distributivity over addition

a×(b+c)=a×b+a×c\vec{a} \times (\vec{b} + \vec{c}) = \vec{a} \times \vec{b} + \vec{a} \times \vec{c}

The cross product distributes over vector addition.

3. Scalar multiplication

α(a×b)=(αa)×b=a×(αb)\alpha(\vec{a} \times \vec{b}) = (\alpha\vec{a}) \times \vec{b} = \vec{a} \times (\alpha\vec{b})

Where α\alpha is a scalar.

4. Not associative

(a×b)×ca×(b×c)(\vec{a} \times \vec{b}) \times \vec{c} \neq \vec{a} \times (\vec{b} \times \vec{c})

The cross product does not follow the associative property.

5. Perpendicularity

a(a×b)=0 and b(a×b)=0\vec{a} \cdot (\vec{a} \times \vec{b}) = 0 \text{ and } \vec{b} \cdot (\vec{a} \times \vec{b}) = 0

The cross product is perpendicular to both original vectors.

6. Magnitude property

a×b=absinθ|\vec{a} \times \vec{b}| = |\vec{a}||\vec{b}|\sin\theta

Where θ\theta is the angle between a\vec{a} and b\vec{b}.

7. Cross product with parallel vectors

If a\vec{a} and b\vec{b} are parallel or anti-parallel (including the case where either is zero), then:

a×b=0\vec{a} \times \vec{b} = \vec{0}

Calculating the cross product

Example 1: Basic calculation

Let's compute the cross product of a=(2,3,4)\vec{a} = (2, 3, 4) and b=(5,6,7)\vec{b} = (5, 6, 7):

a×b=(a2b3a3b2a3b1a1b3a1b2a2b1)=(374645272635)=(212420141215)=(363)\begin{align} \vec{a} \times \vec{b} &= \begin{pmatrix} a_2b_3 - a_3b_2 \\ a_3b_1 - a_1b_3 \\ a_1b_2 - a_2b_1 \end{pmatrix} \\ &= \begin{pmatrix} 3 \cdot 7 - 4 \cdot 6 \\ 4 \cdot 5 - 2 \cdot 7 \\ 2 \cdot 6 - 3 \cdot 5 \end{pmatrix} \\ &= \begin{pmatrix} 21 - 24 \\ 20 - 14 \\ 12 - 15 \end{pmatrix} \\ &= \begin{pmatrix} -3 \\ 6 \\ -3 \end{pmatrix} \end{align}

Example 2: Using determinant notation

For the same vectors, we can compute using the determinant:

a×b=ijk234567=i3467j2457+k2356=i(3746)j(2745)+k(2635)=i(2124)j(1420)+k(1215)=i(3)j(6)+k(3)=i(3)+j(6)+k(3)=(3,6,3)\begin{align} \vec{a} \times \vec{b} &= \begin{vmatrix} \vec{i} & \vec{j} & \vec{k} \\ 2 & 3 & 4 \\ 5 & 6 & 7 \end{vmatrix} \\ &= \vec{i}\begin{vmatrix} 3 & 4 \\ 6 & 7 \end{vmatrix} - \vec{j}\begin{vmatrix} 2 & 4 \\ 5 & 7 \end{vmatrix} + \vec{k}\begin{vmatrix} 2 & 3 \\ 5 & 6 \end{vmatrix} \\ &= \vec{i}(3 \cdot 7 - 4 \cdot 6) - \vec{j}(2 \cdot 7 - 4 \cdot 5) + \vec{k}(2 \cdot 6 - 3 \cdot 5) \\ &= \vec{i}(21 - 24) - \vec{j}(14 - 20) + \vec{k}(12 - 15) \\ &= \vec{i}(-3) - \vec{j}(-6) + \vec{k}(-3) \\ &= \vec{i}(-3) + \vec{j}(6) + \vec{k}(-3) \\ &= (-3, 6, -3) \end{align}

The cross product in different dimensions

Two dimensions

The cross product is primarily defined for three-dimensional vectors. However, we can define a pseudo-cross product for two-dimensional vectors that results in a scalar:

For a=(a1,a2)\vec{a} = (a_1, a_2) and b=(b1,b2)\vec{b} = (b_1, b_2):

a×b=a1b2a2b1\vec{a} \times \vec{b} = a_1b_2 - a_2b_1

This scalar represents the signed area of the parallelogram formed by the two vectors.

Higher dimensions

In higher dimensions, the cross product as we know it in three dimensions does not exist. However, there are generalizations:

  1. Wedge product: A generalization of the cross product to any dimension, part of exterior algebra
  2. Cross product in seven dimensions: A unique binary operation similar to the three-dimensional cross product

Applications of the cross product

1. Physics and mechanics

Torque

The torque τ\vec{\tau} produced by a force F\vec{F} applied at position r\vec{r} relative to a pivot point is:

τ=r×F\vec{\tau} = \vec{r} \times \vec{F}

Angular momentum

For a particle with mass mm, position r\vec{r}, and velocity v\vec{v}, the angular momentum L\vec{L} is:

L=r×mv=r×p\vec{L} = \vec{r} \times m\vec{v} = \vec{r} \times \vec{p}

Where p\vec{p} is the linear momentum.

Magnetic force

The force F\vec{F} on a charged particle with charge qq moving with velocity v\vec{v} in a magnetic field B\vec{B} is:

F=qv×B\vec{F} = q\vec{v} \times \vec{B}

2. Geometry

Area of a parallelogram

The area of a parallelogram formed by vectors a\vec{a} and b\vec{b} is:

Area=a×b\text{Area} = |\vec{a} \times \vec{b}|

Normal vector to a plane

Given two vectors a\vec{a} and b\vec{b} in a plane, the cross product a×b\vec{a} \times \vec{b} gives a vector normal (perpendicular) to that plane.

3. Computer graphics and 3D modeling

Surface normal calculation

For a triangle with vertices at positions v1\vec{v_1}, v2\vec{v_2}, and v3\vec{v_3}, the normal vector n\vec{n} is:

n=(v2v1)×(v3v1)\vec{n} = (\vec{v_2} - \vec{v_1}) \times (\vec{v_3} - \vec{v_1})

Camera orientation

The cross product helps establish orthogonal camera coordinate systems.

4. Navigation and orientation

Heading calculation

Cross products help determine relative orientations in navigation systems.

5. Robotics

Velocity kinematics

In robot arm kinematics, the cross product relates angular velocities to linear velocities at different points on a rigid body.

The relationship between cross product and dot product

The cross product and dot product are related through the triple scalar product and triple vector product:

Triple scalar product

For three vectors a\vec{a}, b\vec{b}, and c\vec{c}:

a(b×c)=b(c×a)=c(a×b)\vec{a} \cdot (\vec{b} \times \vec{c}) = \vec{b} \cdot (\vec{c} \times \vec{a}) = \vec{c} \cdot (\vec{a} \times \vec{b})

This represents the volume of the parallelepiped formed by the three vectors.

Triple vector product

a×(b×c)=b(ac)c(ab)\vec{a} \times (\vec{b} \times \vec{c}) = \vec{b}(\vec{a} \cdot \vec{c}) - \vec{c}(\vec{a} \cdot \vec{b})

This identity, known as Lagrange's formula, is useful in simplifying complex vector expressions.

The cross product in different coordinate systems

Cartesian coordinates

We've already seen the formula for Cartesian coordinates:

a×b=(a2b3a3b2a3b1a1b3a1b2a2b1)\vec{a} \times \vec{b} = \begin{pmatrix} a_2b_3 - a_3b_2 \\ a_3b_1 - a_1b_3 \\ a_1b_2 - a_2b_1 \end{pmatrix}

Cylindrical coordinates

For vectors expressed in cylindrical coordinates (r,θ,z)(r, \theta, z), the cross product can be computed using the appropriate Jacobian transformations.

Spherical coordinates

Similarly, for vectors in spherical coordinates (r,θ,ϕ)(r, \theta, \phi), the cross product requires appropriate transformations.

Computational considerations

Numerical stability

Computing cross products can be subject to numerical instability, especially when the vectors are nearly parallel.

Efficient implementation

In computational applications, the cross product can be efficiently computed:

function cross_product(a, b):
    return [
        a[1] * b[2] - a[2] * b[1],
        a[2] * b[0] - a[0] * b[2],
        a[0] * b[1] - a[1] * b[0]
    ]

Cross product matrix

The cross product can be expressed as a matrix multiplication:

a×b=[a]×b\vec{a} \times \vec{b} = [a]_{\times} \vec{b}

Where [a]×[a]_{\times} is the skew-symmetric matrix:

[a]×=(0a3a2a30a1a2a10)[a]_{\times} = \begin{pmatrix} 0 & -a_3 & a_2 \\ a_3 & 0 & -a_1 \\ -a_2 & a_1 & 0 \end{pmatrix}

This formulation is useful in computational applications and theoretical derivations.

Historical development

The cross product was developed in the 19th century as part of quaternion theory by Irish mathematician William Rowan Hamilton, and later refined by American mathematician Josiah Willard Gibbs into its modern form.

The concept evolved alongside vector analysis and has become fundamental to modern physics and engineering.

Conclusion

The cross product is a powerful mathematical operation with wide-ranging applications. Its unique properties—producing a perpendicular vector, being sensitive to orientation, and relating to geometric interpretations like areas and volumes—make it indispensable in fields ranging from physics to computer graphics.

Understanding the cross product and its properties enables deeper insights into three-dimensional geometry and provides essential tools for solving problems in numerous scientific and engineering disciplines.

References

  1. Anton, H., & Rorres, C. (2014). Elementary Linear Algebra: Applications Version (11th ed.). Wiley.
  2. Schey, H. M. (2005). Div, Grad, Curl, and All That: An Informal Text on Vector Calculus (4th ed.). W. W. Norton & Company.
  3. Arfken, G. B., Weber, H. J., & Harris, F. E. (2013). Mathematical Methods for Physicists (7th ed.). Academic Press.
  4. Marsden, J. E., & Tromba, A. (2011). Vector Calculus (6th ed.). W. H. Freeman.
  5. Kreyszig, E. (2011). Advanced Engineering Mathematics (10th ed.). Wiley.