This vector calculator does the core 3D vector operations in one place: addition, subtraction, scalar multiplication, magnitude, dot product, cross product and the angle between two vectors — the toolkit of physics, graphics and engineering.

The Operations, Decoded

Dot product A·B = a₁b₁ + a₂b₂ + a₃b₃ = |A||B|cos θ — a scalar measuring alignment: work done by a force, light on a surface, similarity in ML embeddings. Cross product A×B — a vector perpendicular to both, magnitude |A||B|sin θ (the spanned parallelogram’s area): torque, angular momentum, surface normals. Magnitudes are the 3D Distance Formula wearing vector clothes. Part of our Math Calculators collection.

Worked Example (Verified)

  • A = ⟨1, 2, 3⟩, B = ⟨4, 5, 6⟩ (widget defaults): A + B = ⟨5, 7, 9⟩ · A − B = ⟨−3, −3, −3⟩
  • Dot: 1×4 + 2×5 + 3×6 = 32 · |A| = √14 ≈ 3.742, |B| = √77 ≈ 8.775 → angle = cos⁻¹(32 ÷ 32.83) ≈ 12.9° — nearly parallel, as their proportionality hints
  • Cross: ⟨2×6−3×5, 3×4−1×6, 1×5−2×4⟩ = ⟨−3, 6, −3⟩, magnitude √54 ≈ 7.35 — verify: it’s perpendicular to both (dot with A: −3 + 12 − 9 = 0 ✔)
  • The cross-product check above is the habit to keep: A×B must dot to zero with both parents, always

Where Each Product Rules

  • Dot: projections (shadow lengths), work (F·d), checking perpendicularity (= 0), cosine similarity.
  • Cross: torque (r×F), magnetic force direction, 3D rotations’ axes, triangle areas (½|A×B|), plane normals.
  • Order matters for cross (B×A = −(A×B)) and not for dot — the right-hand rule is the mnemonic that keeps directions honest.
  • 2D work? Set z = 0: the cross product collapses to its z-component — the signed area scalar 2D programmers know.

Related Tools

Frequently Asked Questions

How do you calculate a dot product?

Multiply corresponding components and sum: ⟨1,2,3⟩·⟨4,5,6⟩ = 4 + 10 + 18 = 32. The result is a scalar whose sign reports alignment: positive acute, zero perpendicular, negative obtuse — the angle follows from cos θ = dot/(|A||B|).

How do you calculate a cross product?

By the determinant pattern: (a₂b₃ − a₃b₂, a₃b₁ − a₁b₃, a₁b₂ − a₂b₁). For ⟨1,2,3⟩ × ⟨4,5,6⟩ that gives ⟨−3, 6, −3⟩ — a vector perpendicular to both inputs, directed by the right-hand rule.

What does a dot product of zero mean?

The vectors are perpendicular (orthogonal) — provided neither is the zero vector. It’s the fastest orthogonality test in mathematics and the reason projection formulas simplify so nicely on perpendicular axes.

What is a unit vector?

A vector of length 1 pointing the same way: A/|A|. Here A’s unit vector ≈ ⟨0.267, 0.535, 0.802⟩. Unit vectors carry pure direction — basis vectors î, ĵ, k̂ are the canonical examples, and every vector is a sum of components along them.

Can I use this for 2D vectors?

Yes — enter z = 0 for both. Addition, dot, magnitudes and angle work identically; the cross product reduces to a single z-value equal to the signed parallelogram area, the quantity 2D geometry and game physics actually use.

Is this vector calculator free?

Yes — free, instant, no sign-up.