standarddeviationcalculator.net SD Calculator

Cross product calculator

Share this page

Favorites

    No favorites yet. Press Favorite on any page to keep it here.

    Methodology

    Enter two vectors to get a × b, the vector perpendicular to both. The working shows the determinant expanded term by term, the length of the result (the area of the parallelogram the vectors span) and a check that its dot product with each input is 0.

    3 components, or 2 for a vector in the xy-plane.

    a × b ⟨−3, 6, −3⟩
    |a × b| = parallelogram area3√6 ≈ 7.34847
    Triangle area (half)3.67423
    Angle between a and b7.4758°
    Unit normal⟨−0.4082, 0.8165, −0.4082⟩
    b × a⟨3, −6, 3⟩
    a × b =−3i + 6j − 3k
    xyzaba × b
    Show the working, step by step
    1. Write the determinant with the unit vectors i, j, k in the top row, a in the middle and b at the bottom.

      a × b = detijk234567
    2. Expand along the top row. Each unit vector multiplies the 2×2 determinant left when its row and column are covered. The j term takes a minus sign.

      i · [3×7 − 4×6] = i · (21 − 24) = −3i −j · [2×7 − 4×5] = −j · (14 − 20) = 6j k · [2×6 − 3×5] = k · (12 − 15) = −3k

    3. Collect the components.

      a × b = ⟨−3, 6, −3⟩

    4. Its length is the area of the parallelogram with sides a and b.

      |a × b| = √((−3)² + 6² + (−3)²) = 3√6 ≈ 7.34847 Check: |a||b| sin θ = 5.38516 × 10.4881 × 0.130107 = 7.34847

    5. Check that the result is perpendicular to both vectors. Both dot products must be 0.

      (a × b) · a = (−3)×2 + 6×3 + (−3)×4 = 0 (a × b) · b = (−3)×5 + 6×6 + (−3)×7 = 0

    Right-hand rule: point your fingers along a, curl them towards b, and your thumb points along a × b. Swapping the order reverses it. b × a = ⟨3, −6, 3⟩.

    Cross product formula

    | i j k | a × b = | a₁ a₂ a₃ | = (a₂b₃ − a₃b₂) i − (a₁b₃ − a₃b₁) j + (a₁b₂ − a₂b₁) k | b₁ b₂ b₃ | |a × b| = |a| |b| sin θ

    The middle term carries a minus sign because of the checkerboard of signs in a cofactor expansion (+ − +). Written without it, the j component is a₃b₁ − a₁b₃, which is the same thing.

    Cross product: a worked example

    The calculator's default vectors are a = ⟨2, 3, 4⟩ and b = ⟨5, 6, 7⟩.

    1. i component: cover the i column. 3×7 − 4×6 = 21 − 24 = −3.
    2. j component: cover the j column and change the sign. −(2×7 − 4×5) = −(14 − 20) = 6.
    3. k component: cover the k column. 2×6 − 3×5 = 12 − 15 = −3.
    4. So a × b = ⟨−3, 6, −3⟩, or −3i + 6j − 3k.
    5. Length: √(9 + 36 + 9) = √54 = 3√6 ≈ 7.34847. That is the area of the parallelogram. The triangle on a and b has area 3.67423.
    6. Check: (a × b) · a = −6 + 18 − 12 = 0 and (a × b) · b = −15 + 36 − 21 = 0, so it is perpendicular to both.

    The angle between a and b is small, about 7.48°, which is why the parallelogram is thin compared with the lengths |a| ≈ 5.385 and |b| ≈ 10.488. 5.385 × 10.488 × sin 7.48° ≈ 7.35.

    The right-hand rule

    Point the fingers of your right hand along a, then curl them towards b through the smaller angle. Your thumb points along a × b. For the unit vectors this gives the cycle

    i × j = k j × k = i k × i = j j × i = −k k × j = −i i × i = j × j = k × k = 0

    Going round the cycle i → j → k gives a positive result. Going against it gives a negative one. In physics the same rule gives the direction of torque (r × F), angular momentum (r × p) and the magnetic force on a moving charge (qv × B).

    Properties worth knowing

    PropertyStatement
    Anticommutativeb × a = −(a × b)
    Parallel vectorsa × b = 0 exactly when a and b are parallel (or one is 0)
    Distributivea × (b + c) = a × b + a × c
    Scalars pull out(ka) × b = k(a × b)
    Not associativea × (b × c) ≠ (a × b) × c in general
    Lagrange's identity|a × b|² = |a|²|b|² − (a · b)²

    Lagrange's identity gives a second check on the example. |a|² = 29, |b|² = 110 and a · b = 56, so |a × b|² = 29 × 110 − 56² = 3190 − 3136 = 54.

    Common mistakes

    • Dropping the minus on the j term. This is the most common slip. The perpendicularity check catches it. The dot products will not both be 0.
    • Reversing the order. a × b and b × a point in opposite directions.
    • Confusing it with the dot product. The cross product is a vector and uses sin θ. The dot product is a number and uses cos θ.
    Cross product calculator: the worked example on this page, with its result and chart
    Cross product calculator: the worked example above, at a glance.

    Common questions

    How do you calculate a cross product?

    Put i, j, k in the top row of a 3×3 determinant, a in the second row and b in the third, and expand along the top row. A × b = (a₂b₃ − a₃b₂)i − (a₁b₃ − a₃b₁)j + (a₁b₂ − a₂b₁)k. For ⟨2, 3, 4⟩ × ⟨5, 6, 7⟩ that is (21 − 24)i − (14 − 20)j + (12 − 15)k = ⟨−3, 6, −3⟩.

    What does the magnitude of the cross product mean?

    |a × b| = |a||b| sin θ is the area of the parallelogram with sides a and b. Halve it for the triangle. For the default vectors, |⟨−3, 6, −3⟩| = √54 = 3√6 ≈ 7.34847, so the parallelogram has area 7.34847 and the triangle 3.67423.

    Why is the cross product perpendicular to both vectors?

    Expand (a × b) · a and every term cancels in pairs, so it is always 0, and the same for b. The calculator shows both dot products as a check. For the default vectors, (−3)(2) + 6(3) + (−3)(4) = −6 + 18 − 12 = 0.

    Is a × b the same as b × a?

    No: b × a = −(a × b). Swapping the order swaps two rows of the determinant, which flips its sign. Geometrically the result has the same length but points the opposite way, as the right-hand rule predicts.

    Can you take the cross product of 2D vectors?

    Not strictly: the cross product is defined for 3D vectors. The usual convention is to give 2D vectors a z-component of 0. The result then points along the z-axis, ⟨0, 0, a₁b₂ − a₂b₁⟩, and that single number a₁b₂ − a₂b₁ is sometimes called the 2D cross product. Its sign tells you whether b is anticlockwise (+) or clockwise (−) from a.

    What does a cross product of zero mean?

    The vectors are parallel (sin θ = 0) or one of them is the zero vector. ⟨1, 2, 3⟩ × ⟨2, 4, 6⟩ = ⟨0, 0, 0⟩ because the second vector is twice the first.