zaro

How to do the cross product of two vectors?

Published in Vector Operations 2 mins read

The cross product of two vectors results in a new vector that is perpendicular to both original vectors; its magnitude is equal to the area of the parallelogram formed by the two original vectors. Here's how to calculate it:

Understanding the Cross Product

The cross product, denoted as a × b, is only defined for three-dimensional vectors. It produces a vector that is orthogonal (perpendicular) to both a and b. This resulting vector's direction is determined by the right-hand rule. Its magnitude is given by |a × b| = |a| |b| sin(θ), where θ is the angle between a and b.

Calculation Method

Let's say we have two vectors:

a = (a₁, a₂, a₃)
b = (b₁, b₂, b₃)

The cross product a × b is calculated as follows:

a × b = (a₂b₃ - a₃b₂, a₃b₁ - a₁b₃, a₁b₂ - a₂b₁)

This can be easier to remember using the determinant of a matrix:

a × b = | i j k |
| a₁ a₂ a₃ |
| b₁ b₂ b₃ |

Where i, j, and k are the unit vectors along the x, y, and z axes, respectively.

Expanding the determinant gives:

a × b = (a₂b₃ - a₃b₂) i - (a₁b₃ - a₃b₁) j + (a₁b₂ - a₂b₁) k

Which simplifies to:

a × b = (a₂b₃ - a₃b₂, a₃b₁ - a₁b₃, a₁b₂ - a₂b₁)

Step-by-Step Example

Let's take two vectors:

a = (1, 2, 3)
b = (4, 5, 6)

Then,

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)

So, the cross product of a and b is the vector (-3, 6, -3).

Key Properties

  • The cross product is not commutative: a × b = - (b × a)
  • The cross product is distributive: a × (b + c) = a × b + a × c
  • If a and b are parallel, then a × b = 0

Applications

The cross product has applications in various fields, including:

  • Physics: Calculating torque, angular momentum, and the force on a moving charge in a magnetic field.
  • Computer Graphics: Determining surface normals and creating realistic lighting effects.
  • Engineering: Analyzing rotational motion and calculating areas of parallelograms.

In summary, the cross product is a fundamental operation in vector algebra, used to find a vector perpendicular to two given vectors. The determinant method provides a structured way to calculate it accurately.