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
Formula
How to use this calculator
- Enter components of vector A: Aₓ, Aᵧ, Aᵤ.
- Enter components of vector B: Bₓ, Bᵧ, Bᵤ.
- Calculator returns A × B = (resultant x, y, z), magnitude, and parallelogram area.
- Magnitude equals parallelogram area: |A × B| = |A||B|sin(θ).
- Direction follows right-hand rule.
- 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).