CalcMountain

Cross Product Calculator

Enter two 3D vectors to compute their cross product (A x B), the magnitude of the result, and the area of the parallelogram they span.

The cross product is a binary operation on two vectors in three-dimensional space that produces a third vector perpendicular to both. Written A × B, it's distinct from the dot product (which gives a scalar). The cross product has both magnitude and direction, and uniquely captures 3D rotational and area information that no other operation can.

The magnitude of A × B equals the area of the parallelogram formed by the two vectors as edges: |A × B| = |A| × |B| × sin(θ), where θ is the angle between them. The direction follows the right-hand rule: point fingers from A toward B, and the thumb gives the direction of A × B.

This combination of properties makes cross product essential in physics and engineering. Torque (τ = r × F) describes rotational force. Angular momentum (L = r × p) describes rotation. Magnetic force on a moving charge (F = qv × B) involves cross product. In computer graphics, normal vectors for surfaces are computed via cross product of two edge vectors. In navigation, course corrections use cross product geometrically.

Cross product is defined only for 3D vectors (and 7D, with different rules). In 2D, you have the "scalar cross product" or determinant — magnitude only, direction implied. In higher dimensions, generalized through wedge product (exterior algebra).

Common applications: torque and angular momentum calculations, magnetic force (Lorentz force), computer graphics (surface normals, lighting), engineering (rotational analysis), and 3D geometry problems.

Inputs

Results

A × B

(-3, 6, -3)

|A × B| (magnitude)

7.348469

|A|

3.741657

|B|

8.774964

Parallelogram Area

7.348469 sq units

Parallel Vectors?

No

Last updated:

Formula

**Cross product of 3D vectors A and B:** If A = (a₁, a₂, a₃) and B = (b₁, b₂, b₃): A × B = (a₂b₃ − a₃b₂, a₃b₁ − a₁b₃, a₁b₂ − a₂b₁) **Determinant form:** A × B = | i j k | | a₁ a₂ a₃ | | b₁ b₂ b₃ | Where i, j, k are unit vectors. **Worked example: A = (1, 2, 3), B = (4, 5, 6)** A × B = ((2)(6) − (3)(5), (3)(4) − (1)(6), (1)(5) − (2)(4)) A × B = (12 − 15, 12 − 6, 5 − 8) A × B = (-3, 6, -3) Magnitude: |A × B| = √(9 + 36 + 9) = √54 ≈ 7.35 **Properties:** | Property | Statement | |---|---| | Anti-commutative | A × B = -(B × A) | | Distributive | A × (B + C) = A × B + A × C | | Scalar multiple | (kA) × B = k(A × B) | | Magnitude | \|A × B\| = \|A\|\|B\|sin(θ) | | Parallel vectors | A × B = 0 if A \|\| B | | Perpendicular | A × B ⟂ both A and B | | Right-hand rule | Direction by right-hand rule | **Magnitude formula:** |A × B| = |A| × |B| × sin(θ) Where θ = angle between vectors (0 to π). For perpendicular: sin(90°) = 1, max magnitude. For parallel: sin(0) = 0, zero magnitude. **Geometric meaning:** |A × B| = area of parallelogram with sides A and B. Half this area = area of triangle with these two sides. **Right-hand rule:** To find direction of A × B: 1. Point fingers in direction of A. 2. Curl them toward B. 3. Thumb points in direction of A × B. Equivalently: if you screw a right-handed screw from A to B, the screw advances in the direction of A × B. **Standard cross products of unit vectors:** i × j = k j × k = i k × i = j j × i = -k k × j = -i i × k = -j i × i = j × j = k × k = 0 **Mnemonic ("xyzxyz"):** x × y = z y × z = x z × x = y Reverse: gives negative. **Worked example: torque** A 0.5 m wrench held perpendicular to a vertical bolt; you apply 50 N force horizontally. Position vector r = (0.5, 0, 0). Force vector F = (0, 50, 0). Torque τ = r × F = (0×0 - 0×50, 0×0 - 0.5×0, 0.5×50 - 0×0) = (0, 0, 25) Torque magnitude: 25 N·m, directed along z-axis (right-hand rule from r toward F). **Vector triple product:** A × (B × C) = B(A·C) - C(A·B) Also known as BAC-CAB rule. **Scalar triple product:** A · (B × C) = (A × B) · C = determinant of matrix [A, B, C] Geometrically: volume of parallelepiped with edges A, B, C. Sign indicates handedness (positive = right-handed system). **Worked example: parallelepiped volume** Vectors A = (1, 0, 0), B = (0, 1, 0), C = (0, 0, 1): A · (B × C) = (1,0,0) · (1×1 − 0×0, 0×0 − 0×1, 0×0 − 1×0) = (1,0,0) · (1, 0, 0) = 1 This is a unit cube → volume 1. **Plane normal vector:** For plane through three points P, Q, R: - Vector PQ = Q - P - Vector PR = R - P - Normal n = PQ × PR Used extensively in computer graphics for surface normals. **Cross product vs dot product:** | Property | Dot | Cross | |---|---|---| | Type | Scalar | Vector | | Symmetry | Commutative | Anti-commutative | | Parallel vectors | Maximum | Zero | | Perpendicular vectors | Zero | Maximum | | Formula | a₁b₁ + a₂b₂ + a₃b₃ | (a₂b₃ - a₃b₂, ...) | | Geometric | \|A\|\|B\|cos(θ) | \|A\|\|B\|sin(θ) | **Physical applications:** | Physics | Formula | |---|---| | Torque | τ = r × F | | Angular momentum | L = r × p | | Magnetic force on charge | F = qv × B | | Angular velocity (rigid body) | ω = (1/2)∇ × v | | Magnetic field of moving charge | B ∝ qv × r̂/r² | | Poynting vector | S = E × H | **Computer graphics:** - **Surface normals**: cross product of edge vectors. - **Lighting**: dot product of normal with light vector. - **Camera orientation**: cross products for up/right/forward. - **Collision detection**: parallelogram and triangle areas. - **Tangent vectors**: cross product of normal and another vector. **Common applications:** - **Physics**: rotational dynamics, electromagnetism. - **Engineering**: structural analysis with rotating components. - **Graphics**: 3D rendering, animation. - **Robotics**: orientation, path planning. - **Navigation**: heading calculations. - **Crystallography**: lattice vector relationships. - **Astronomy**: orbital mechanics.

How to use this calculator

  1. Enter components of vector A: Aₓ, Aᵧ, Aᵤ.
  2. Enter components of vector B: Bₓ, Bᵧ, Bᵤ.
  3. Calculator returns A × B = (resultant x, y, z), magnitude, and parallelogram area.
  4. Magnitude equals parallelogram area: |A × B| = |A||B|sin(θ).
  5. Direction follows right-hand rule.
  6. A × B = 0 means vectors are parallel.

Worked examples

Torque on a wrench

**Scenario:** Wrench arm vector r = (0.3, 0, 0) m. Force F = (0, 100, 0) N (downward push on horizontal handle). **Calculation:** τ = r × F = (0×0 - 0×100, 0×0 - 0.3×0, 0.3×100 - 0×0) = (0, 0, 30). Magnitude: 30 N·m, directed along z-axis. **Result:** 30 N·m torque, rotating about the vertical axis (z). Positive (counterclockwise viewed from above by right-hand rule). Maximum because r ⟂ F (sin 90° = 1).

Triangle area

**Scenario:** Triangle vertices P = (0,0,0), Q = (3,0,0), R = (0,4,0). Area using vectors? **Calculation:** PQ = (3,0,0). PR = (0,4,0). PQ × PR = (0×0 - 0×4, 0×0 - 3×0, 3×4 - 0×0) = (0, 0, 12). |PQ × PR| = 12. Triangle area = ½ × 12 = 6. **Result:** Triangle area = 6 sq units. Verifies: it's a 3-4-5 right triangle, ½ × 3 × 4 = 6. Cross product method works for any 3D triangle (not just axis-aligned).

Surface normal

**Scenario:** Triangle with vertices A = (1,0,0), B = (0,1,0), C = (0,0,1). Surface normal? **Calculation:** AB = (-1,1,0). AC = (-1,0,1). AB × AC = (1×1 - 0×0, 0×(-1) - (-1)×1, (-1)×0 - 1×(-1)) = (1, 1, 1). Normalize: |n| = √3. Unit normal: (1/√3, 1/√3, 1/√3). **Result:** Surface normal points in direction (1,1,1) — symmetric since triangle is symmetric. Used in 3D graphics for lighting calculations (Lambertian shading uses dot product with light direction).

When to use this calculator

**Use cross product for:**

- **Physics**: torque, angular momentum, magnetic force. - **Engineering**: rotational analysis, structural mechanics. - **Computer graphics**: surface normals for shading. - **Navigation**: 3D orientation calculations. - **Game development**: collision detection, physics. - **Robotics**: joint orientations, end-effector poses. - **CAD**: geometric calculations, normal vectors. - **Crystallography**: lattice operations.

**Key properties to remember:**

- **Anti-commutative**: A × B = -(B × A). - **Zero if parallel**: A × B = 0 when A and B are parallel. - **Maximum if perpendicular**: |A × B| max when A ⟂ B. - **Right-hand rule**: gives direction.

**Cross product vs dot product:**

Use cross product when you need: - A perpendicular vector. - A vector measuring rotation or "rotational tendency". - The area of a parallelogram or triangle. - A right-handed orthogonal coordinate system.

Use dot product when you need: - A scalar (single number). - The angle between vectors. - Projection of one onto another. - A measure of alignment.

**Coordinate system handedness:**

Right-handed (standard math/physics): i × j = +k. Left-handed (some graphics like DirectX): i × j = -k.

Be careful about handedness convention in your software/textbook.

**Common applications:**

- **Mechanical engineering**: torque calculations on machinery. - **Electromagnetism**: Lorentz force on charged particles. - **Aerospace**: aircraft rotational dynamics. - **Robotics**: end-effector orientation. - **Computer graphics**: lighting via surface normals + light vector. - **Game physics**: rigid body rotation. - **3D modeling**: face normals for rendering.

**Higher dimensional generalizations:**

- **7D**: only other dimension supporting traditional cross product (uses octonions). - **Wedge product** (exterior algebra): generalizes cross product to any dimension. - **Geometric algebra**: unified framework for inner and outer products.

For most practical work, 3D cross product is what's needed.

**Numerical considerations:**

- **Magnitude of small vectors**: cross product of nearly-parallel vectors gives small magnitude vector, sensitive to rounding errors. - **Normalization**: often normalize cross product result for direction-only uses (e.g., surface normals). - **Stability**: prefer vectors with reasonable magnitudes to avoid floating-point issues.

**Software:**

- **Python (NumPy)**: numpy.cross(a, b) - **MATLAB**: cross(a, b) - **C++ (Eigen, GLM)**: cross product functions - **JavaScript (THREE.js, GL-Matrix)**: built-in cross - **OpenGL/DirectX shaders**: cross() function

**Pitfalls:**

- **Sign error**: A × B vs B × A differ in sign. - **Confusing with dot product**: cross gives vector, dot gives scalar. - **Forgetting right-hand rule**: matters for direction. - **Using on parallel vectors**: gives zero (degenerate case). - **2D cross product**: only gives scalar (z-component of would-be 3D cross). - **Left vs right-handed**: graphics frameworks may differ. - **Order of operations**: A × B × C is ambiguous without parentheses.

Common mistakes to avoid

  • Forgetting cross product is anti-commutative (A × B ≠ B × A).
  • Confusing cross product with dot product (vector vs scalar result).
  • Using cross product on parallel vectors (always gives zero).
  • Wrong sign due to mishandling right-hand rule.
  • Mixing left-handed and right-handed coordinate systems.
  • Computing cross product in 2D (need 3D for traditional formula).
  • Forgetting to normalize for direction-only applications.
  • Computing A × B × C without parentheses (operation isn't associative).

Frequently Asked Questions

Sources & further reading

SponsoredShop Top Deals on AmazonSupport CalcMountain — browse top-rated products at no extra cost to you.

Related Calculators