Ad Space — Top Banner

Vector Operations Formulas

Essential vector formulas for dot product, cross product, and magnitude.
Learn vector math with clear explanations and worked examples.

Magnitude (Length) of a Vector

|v| = √(v₁² + v₂² + v₃²)

The magnitude of a vector tells you its length. For a 2D vector (v₁, v₂), the formula simplifies to |v| = √(v₁² + v₂²).

Dot Product (Scalar Product)

a · b = a₁b₁ + a₂b₂ + a₃b₃ = |a||b| cos θ

The dot product takes two vectors and returns a single number (a scalar). It measures how much two vectors point in the same direction.

When the dot product is zero, the vectors are perpendicular. When it is positive, they point in similar directions. When negative, they point in roughly opposite directions.

Cross Product (Vector Product)

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

The cross product takes two vectors and returns a new vector that is perpendicular to both. Its magnitude equals |a||b| sin θ, which is the area of the parallelogram formed by the two vectors.

The cross product only exists in 3D. The direction follows the right-hand rule: point your fingers from a toward b, and your thumb points in the direction of a × b.

Variables

SymbolMeaning
a, bVectors with components (a₁, a₂, a₃) and (b₁, b₂, b₃)
|v|Magnitude (length) of vector v
θAngle between the two vectors
a · bDot product — a scalar (single number)
a × bCross product — a vector perpendicular to both a and b

Example 1: Dot Product

Find the dot product of a = (3, −2, 5) and b = (1, 4, −3). Then find the angle between them.

Dot product: a · b = (3)(1) + (−2)(4) + (5)(−3) = 3 − 8 − 15 = −20

Magnitudes: |a| = √(9 + 4 + 25) = √38 ≈ 6.16

|b| = √(1 + 16 + 9) = √26 ≈ 5.10

cos θ = (a · b) / (|a||b|) = −20 / (6.16 × 5.10) = −20 / 31.42 = −0.6366

θ = arccos(−0.6366) ≈ 129.5° (the vectors point in roughly opposite directions)

Example 2: Cross Product

Find the cross product of a = (2, 3, 4) and b = (5, 6, 7).

First component: a₂b₃ − a₃b₂ = (3)(7) − (4)(6) = 21 − 24 = −3

Second component: a₃b₁ − a₁b₃ = (4)(5) − (2)(7) = 20 − 14 = 6

Third component: a₁b₂ − a₂b₁ = (2)(6) − (3)(5) = 12 − 15 = −3

a × b = (−3, 6, −3)

When to Use These

Vector operations appear throughout science, engineering, and computer graphics.

  • Dot product: calculating work done by a force, projecting one vector onto another, checking if vectors are perpendicular
  • Cross product: finding normal vectors to surfaces, calculating torque, determining the area of triangles in 3D
  • Magnitude: finding distances, normalizing vectors to unit length, calculating speed from velocity components

Ad Space — Bottom Banner

Embed This Calculator

Copy the code below and paste it into your website or blog.
The calculator will work directly on your page.