Vector Calculator
Dot product, cross product, magnitude, and unit vectors.
About this tool
Enter one or two vectors and choose add, subtract, dot, cross, magnitude or unit. (1, 2, 3) × (4, 5, 6) is (−3, 6, −3), and the length of (3, 4) is 5.
How to use
How it works
The dot product multiplies matching components and adds them, giving a number that is zero for perpendicular vectors. The cross product, defined in 3D, gives a vector perpendicular to both inputs. Magnitude is the square root of the sum of squares, and the unit vector divides by it.
a·b = Σ aᵢbᵢ |a| = √(Σ aᵢ²) a × b = (a₂b₃ − a₃b₂, a₃b₁ − a₁b₃, a₁b₂ − a₂b₁)
Worked example
Cross product
- Input
- A = (1, 2, 3), B = (4, 5, 6)
- Output
- (−3, 6, −3)
- Walkthrough
- 2×6 − 3×5 = −3; 3×4 − 1×6 = 6; 1×5 − 2×4 = −3.
Limitations
- Both vectors must have the same number of components, otherwise you get a dimension mismatch.
- Cross product needs 3D vectors.
- The zero vector has no unit vector.
Questions
What is the dot product of (1,2,3) and (4,5,6)?
What is the magnitude of (3, 4)?
What is the unit vector of (3, 4)?
What is (2, −1, 4) + (1, 3, 0)?
Features
- Six operations
- Dot product in any dimension
- Runs in your browser
Related resources
Guides and videos from around the web—opens on YouTube or the publisher’s site.
The essence of calculus
3Blue1Brown
Visual calculus story that complements symbolic solvers.
Watch on YouTubeFinding mean, median, and mode
Khan Academy
Stats buttons on scientific calculators need this framing.
Watch on YouTube
- Math is Fun
Math is Fun
Clear explainers that pair well with calculator-style tools.
- OpenStax Math
OpenStax
Free textbooks for algebra through calculus.