Vector Calculator
Magnitude, unit vector, dot, cross and angle between — 2D or 3D.
The formula behind it
a·b = |a||b|cos θ · a×b = |a||b|sin θ · n̂- a·b
- dot product — a scalar; measures how much the vectors align
- a×b
- cross product (3D) — a perpendicular vector; magnitude = parallelogram area
- θ
- angle between the vectors, from cos θ = a·b ÷ (|a||b|)
- â
- unit vector — a's direction at length 1
Vectors carry magnitude and direction. The dot product compresses a pair into one number (alignment), the cross product into a perpendicular vector (plane orientation). Between them you can reconstruct angles, areas, projections and work done — the daily vocabulary of physics and 3D graphics.
How to use this calculator
- 1
Choose 2D or 3D — the dimension toggle relabels the inputs.
- 2
Enter both vectors as comma-separated components (e.g. 3, 4 or 1, 2, 2).
- 3
Read magnitudes, the unit vector, dot and cross products, the angle, and sum/difference.
- 4
Check the steps — every formula is written with your numbers substituted.
- 5
Use |a × b| as the parallelogram area, or the 2D scalar cross for clockwise/counter-clockwise tests.
Worked examples
Perpendicular test, a=(3,4), b=(−4,3)
Dot = 3×(−4) + 4×3 = 0 → cos θ = 0 → θ = 90°. A zero dot product is the algebraic definition of perpendicularity — no protractor needed.
3D cross product, a=(1,0,0), b=(0,1,0)
a × b = (0·0−0·1, 0·0−1·0, 1·1−0·0) = (0,0,1) — the unit z-vector. The right-hand rule confirms: x cross y is z.
Frequently asked questions
Related calculators
Pythagorean Theorem Calculator
Compute the hypotenuse a² + b² = c², spotting Pythagorean triples.
Distance Between Two Points Calculator
Apply the distance formula in 2D — with midpoint included.
Slope Calculator
Find the slope through two points — rise over run with interpretation.
Scientific Calculator
A full expression calculator with trigonometry, powers, roots, logarithms, constants and keyboard input.