Vector Calculator
Dot product, cross product, magnitudes and the angle between two 3-D vectors.
The dot product a·b = |a||b|cos θ collapses two vectors into a single number that measures how much they point the same way.
How the vector calculator works
The dot product a·b = |a||b|cos θ collapses two vectors into a single number that measures how much they point the same way. It is zero exactly when they are perpendicular, which makes it the standard test for a right angle in any number of dimensions.
The cross product a×b is a vector instead, perpendicular to both, with length |a||b|sin θ — the area of the parallelogram they span. It only exists in three dimensions, and it is anti-commutative: a×b = −(b×a).
For 2-D work leave the z components at zero; the cross product then has only a z component, which is the signed area.
Formula: a·b = axbx + ayby + azbz; |a×b| = |a||b| sin θ
Worked examples
| Inputs | Dot product a·b | Note |
|---|---|---|
| (3, −2, 5) and (1, 4, −3) | -20 | dot product −20 |
| Two perpendicular unit vectors | 0 | dot 0, angle 90° |
| A 2-D pair | 24 | dot 24, angle 16.26° |
FAQFrequently asked questions
What is the dot product?
axbx + ayby + azbz — a single number measuring how much two vectors point the same way.
What does a zero dot product mean?
The vectors are perpendicular, in any number of dimensions.
What is the cross product for?
It gives a vector perpendicular to both, with length equal to the area of the parallelogram they span — used for normals, torque and angular momentum.
Is the cross product commutative?
No — a×b = −(b×a). Swapping the order reverses the direction.
How do I use this for 2-D vectors?
Leave both z components at zero. The cross product then has only a z component, which is the signed area.
Where these figures come from
- NIST Digital Library of Mathematical Functions — reference definitions for elementary and special functions
- Wolfram MathWorld — definitions and formulas for every topic on this page
- NIST/SEMATECH e-Handbook of Statistical Methods — the statistical formulas (mean, variance, z, confidence intervals, sample size)
- Common Core State Standards — Mathematics — the terms and methods taught in US schools
Last checked: September 2026. Formulas are fixed by mathematics and do not change with tax years or regulations.