{
  "id": "cross-product",
  "version": "24614ab6117a",
  "status": "published",
  "name": "Cross Product Calculator",
  "question": "What is the cross product?",
  "summary": "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.",
  "category": "math",
  "subcategory": "linear-algebra",
  "url": "https://www.acalculator.org/math/cross-product-calculator",
  "markdown": "https://www.acalculator.org/math/cross-product-calculator.md",
  "kind": "function",
  "method": "A × B = (a₂b₃ − a₃b₂, a₃b₁ − a₁b₃, a₁b₂ − a₂b₁); |A × B| = √(x² + y² + z²).",
  "assumptions": [
    "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)."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "ax": {
        "title": "A: x",
        "description": "The x component of vector A.",
        "type": "number"
      },
      "ay": {
        "title": "A: y",
        "description": "The y component of vector A.",
        "type": "number"
      },
      "az": {
        "title": "A: z",
        "description": "The z component of vector A.",
        "type": "number"
      },
      "bx": {
        "title": "B: x",
        "description": "The x component of vector B.",
        "type": "number"
      },
      "by": {
        "title": "B: y",
        "description": "The y component of vector B.",
        "type": "number"
      },
      "bz": {
        "title": "B: z",
        "description": "The z component of vector B.",
        "type": "number"
      }
    }
  },
  "outputs": {
    "vector": {
      "label": "A × B",
      "description": "The cross product as (x, y, z), each part rounded to 10 significant figures.",
      "format": "text"
    },
    "x": {
      "label": "x",
      "description": "The x component of A × B: a₂b₃ − a₃b₂.",
      "format": "number"
    },
    "y": {
      "label": "y",
      "description": "The y component of A × B: a₃b₁ − a₁b₃.",
      "format": "number"
    },
    "z": {
      "label": "z",
      "description": "The z component of A × B: a₁b₂ − a₂b₁.",
      "format": "number"
    },
    "magnitude": {
      "label": "Length |A × B|",
      "description": "The length of A × B, which is also the area of the parallelogram spanned by A and B.",
      "format": "number"
    },
    "steps": {
      "label": "Working",
      "description": "Each component of A × B worked out with the numbers.",
      "format": "text"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "ax": 2,
      "ay": 3,
      "az": 1,
      "bx": 1,
      "by": 2,
      "bz": 3
    },
    "outputs": {
      "vector": "(7, -5, 1)",
      "x": 7,
      "y": -5,
      "z": 1,
      "magnitude": 8.660254037844386,
      "steps": "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"
    },
    "text": "The cross product of A and B is (7, -5, 1), with length 8.660254."
  },
  "examples": [
    {
      "given": {
        "ax": 2,
        "ay": 3,
        "az": 1,
        "bx": 1,
        "by": 2,
        "bz": 3
      },
      "expect": {
        "x": 7,
        "y": -5,
        "z": 1,
        "vector": "(7, -5, 1)",
        "magnitude": 8.660254037844387
      },
      "source": "hand calculation in content.mdx: (3×3 − 1×2, 1×1 − 2×3, 2×2 − 3×1) = (7, −5, 1); √75 = 8.660254…; OpenStax, Calculus Volume 3, §2.4 The Cross Product. https://openstax.org/books/calculus-volume-3/pages/2-4-the-cross-product"
    },
    {
      "given": {
        "ax": 1,
        "ay": 0,
        "az": 0,
        "bx": 0,
        "by": 1,
        "bz": 0
      },
      "expect": {
        "x": 0,
        "y": 0,
        "z": 1,
        "magnitude": 1
      },
      "source": "unit vectors: i × j = k (Stewart, Calculus, 8th ed., section 12.4, example 3); OpenStax, Calculus Volume 3, §2.4 The Cross Product. https://openstax.org/books/calculus-volume-3/pages/2-4-the-cross-product"
    },
    {
      "given": {
        "ax": 1,
        "ay": 2,
        "az": 3,
        "bx": 4,
        "by": 5,
        "bz": 6
      },
      "expect": {
        "x": -3,
        "y": 6,
        "z": -3,
        "magnitude": 7.3484692283495345
      },
      "source": "hand calculation in content.mdx: (2×6 − 3×5, 3×4 − 1×6, 1×5 − 2×4) = (−3, 6, −3); √54 = 7.348469…; OpenStax, Calculus Volume 3, §2.4 The Cross Product. https://openstax.org/books/calculus-volume-3/pages/2-4-the-cross-product"
    },
    {
      "given": {
        "ax": 2,
        "ay": 4,
        "az": 6,
        "bx": 1,
        "by": 2,
        "bz": 3
      },
      "expect": {
        "x": 0,
        "y": 0,
        "z": 0,
        "magnitude": 0
      },
      "source": "parallel vectors (A = 2B) have a zero cross product (Stewart, Calculus, 8th ed., section 12.4, corollary 7); OpenStax, Calculus Volume 3, §2.4 The Cross Product. https://openstax.org/books/calculus-volume-3/pages/2-4-the-cross-product"
    }
  ],
  "sources": [
    "OpenStax, Calculus Volume 3, §2.4 The Cross Product. https://openstax.org/books/calculus-volume-3/pages/2-4-the-cross-product"
  ],
  "related": [],
  "changelog": [
    {
      "date": "2026-09-28",
      "note": "Negative numbers in the working are in brackets: 7 × (-1)."
    },
    {
      "date": "2026-09-29",
      "note": "Worked examples name a published reference for their rule."
    }
  ]
}
