acalculator

What is the cross product?

Free online cross product calculator. Fast, accurate, and easy to use math tool.

Your numbers

A × B
(7, -5, 1)

The cross product of A and B is (7, -5, 1), with length 8.660254.

x
7
y
−5
z
1
Length |A × B|
8.660254
Working
x = a₂b₃ − a₃b₂ = 3 × 3 − 1 × 2 = 7; y = a₃b₁ − a₁b₃ = 1 × 1 − 2 × 3 = -5; z = a₁b₂ − a₂b₁ = 2 × 2 − 3 × 1 = 1

A × B: (7, -5, 1). The cross product of A and B is (7, -5, 1), with length 8.660254.

How it is worked out

How to calculate

Computes the cross product A × B of two 3D vectors, a vector perpendicular to both, and its length, the area of the parallelogram they span.

Example with the default inputs (A: x 2, A: y 3, A: z 1, B: x 1, B: y 2, B: z 3): The cross product of A and B is (7, -5, 1), with length 8.660254.

Method: A × B = (a₂b₃ − a₃b₂, a₃b₁ − a₁b₃, a₁b₂ − a₂b₁); |A × B| = √(x² + y² + z²).

  • A and B are vectors in 3D space with real components.
  • The direction of A × B follows the right-hand rule, so B × A = −(A × B).

Machine-readable copies: Markdown, JSON.

Worked examples

Each example is checked against the calculator on every build.

  1. A: x 2, A: y 3, A: z 1, B: x 1, B: y 2, B: z 3 gives x 7, y -5, z 1, A × B (7, -5, 1), Length |A × B| 8.660254.Source: OpenStax, Calculus Volume 3, §2.4 The Cross Product. https://openstax.org/books/calculus-volume-3/pages/2-4-the-cross-product
  2. A: x 1, A: y 0, A: z 0, B: x 0, B: y 1, B: z 0 gives x 0, y 0, z 1, Length |A × B| 1.Source: OpenStax, Calculus Volume 3, §2.4 The Cross Product. https://openstax.org/books/calculus-volume-3/pages/2-4-the-cross-product
  3. A: x 1, A: y 2, A: z 3, B: x 4, B: y 5, B: z 6 gives x -3, y 6, z -3, Length |A × B| 7.348469.Source: OpenStax, Calculus Volume 3, §2.4 The Cross Product. https://openstax.org/books/calculus-volume-3/pages/2-4-the-cross-product
  4. A: x 2, A: y 4, A: z 6, B: x 1, B: y 2, B: z 3 gives x 0, y 0, z 0, Length |A × B| 0.Source: OpenStax, Calculus Volume 3, §2.4 The Cross Product. https://openstax.org/books/calculus-volume-3/pages/2-4-the-cross-product

How it works

For vectors A = (a₁, a₂, a₃) and B = (b₁, b₂, b₃), the cross product is

A × B = (a₂b₃ − a₃b₂, a₃b₁ − a₁b₃, a₁b₂ − a₂b₁)

Its length is |A × B| = √(x² + y² + z²), where x, y, and z are the three components above. This length equals |A| |B| sin(θ), the area of the parallelogram that A and B span.

The calculator shows:

  • A × B as (x, y, z). Each number in this text is rounded to 10 significant figures, written without thousands separators or trailing zeros, with a plain hyphen for minus. Numbers of 10²¹ or more, or under 10⁻⁶ (other than 0), are written in e-notation, for example 1.4e+22 or 1.5e-7.
  • x, y, z and the length |A × B| at full precision.
  • Working: each component with the numbers put in, written like A × B. A negative number that is multiplied is in brackets, for example x = a₂b₃ − a₃b₂ = 4 × 0.5 − 7 × (-1) = 9; the result after = is not. The same text is listed step by step under "How it is worked out".

Assumptions

  • A and B are 3D vectors with real components. For 2D vectors, set both z components to 0; the z component of the result is then the 2D cross product a₁b₂ − a₂b₁.
  • The result follows the right-hand rule, so B × A = −(A × B).
  • Parallel vectors (one a multiple of the other) and a zero vector give (0, 0, 0).

Worked examples by hand

The default vectors. A = (2, 3, 1), B = (1, 2, 3).

  • x = 3 × 3 − 1 × 2 = 9 − 2 = 7
  • y = 1 × 1 − 2 × 3 = 1 − 6 = −5
  • z = 2 × 2 − 3 × 1 = 4 − 3 = 1
  • Length: √(7² + 5² + 1²) = √75 = 8.660254…

A = (1, 2, 3), B = (4, 5, 6). x = 2 × 6 − 3 × 5 = −3; y = 3 × 4 − 1 × 6 = 6; z = 1 × 5 − 2 × 4 = −3. So A × B = (−3, 6, −3), and its length is √54 = 7.348469…

Large components. A = (1234, 5, 6), B = (0, 0, 1): x = 5 × 1 − 6 × 0 = 5, y = 6 × 0 − 1234 × 1 = −1234, z = 0, so A × B = (5, −1234, 0), with length √(25 + 1522756) = 1234.010130…

Parallel vectors. A = (2, 4, 6) is 2 × B for B = (1, 2, 3), so A × B = (0, 0, 0).

Other questions people ask

What is the cross product of two vectors?

The cross product (also called vector product) of two vectors is a vector that is perpendicular to both input vectors. It's calculated using the formula: A × B = |A| |B| sin(θ) n, where θ is the angle between the vectors and n is a unit vector perpendicular to both A and B. The direction follows the right-hand rule.

How do I calculate the cross product of two 3D vectors?

For vectors A = [a₁, a₂, a₃] and B = [b₁, b₂, b₃], the cross product A × B = [a₂b₃ - a₃b₂, a₃b₁ - a₁b₃, a₁b₂ - a₂b₁]. This can be remembered using the determinant formula with the unit vectors i, j, k.

What is the geometric interpretation of the cross product?

The magnitude of the cross product |A × B| equals the area of the parallelogram formed by vectors A and B. The direction of A × B is perpendicular to the plane containing A and B, following the right-hand rule. This makes cross products useful in physics, computer graphics, and engineering.

What is the right-hand rule?

The right-hand rule determines the direction of the cross product: Point your right hand's index finger in the direction of the first vector, your middle finger in the direction of the second vector, and your thumb will point in the direction of the cross product. This rule ensures consistent direction determination across all cross product calculations.

Is the cross product commutative?

No, the cross product is not commutative. In fact, A × B = -(B × A). This means changing the order of the vectors changes the sign of the result. This property is called anti-commutativity and is important in many applications.

What are the applications of cross products?

Cross products are used in physics for torque calculations, in computer graphics for surface normals, in engineering for moment calculations, in electromagnetism for magnetic force, and in robotics for angular velocity. They're essential for any calculation involving perpendicular vectors or rotational motion.

Can I calculate cross products in 2D?

In 2D, the cross product is a scalar (single number) rather than a vector. It represents the signed area of the parallelogram formed by the two vectors. The sign indicates the orientation (clockwise or counterclockwise) of the angle from the first vector to the second.

What is the relationship between dot product and cross product?

The dot product and cross product are complementary operations. The dot product gives a scalar result and measures how much two vectors point in the same direction. The cross product gives a vector result and measures how much two vectors are perpendicular. Together, they provide complete information about the relationship between two vectors.

How do I find a vector perpendicular to two given vectors?

The cross product of two vectors automatically gives you a vector perpendicular to both. This is one of the most common uses of the cross product. The resulting vector will be perpendicular to the plane containing the two input vectors.

What is the magnitude of a cross product?

The magnitude of A × B is |A × B| = |A| |B| sin(θ), where θ is the angle between vectors A and B. This equals the area of the parallelogram formed by the two vectors. When the vectors are parallel (θ = 0° or 180°), the cross product is zero.