Vector Calculator
Calculators · Added
Enter two vectors in two or three dimensions and get every standard operation at once — sum, difference, dot and cross products, magnitudes, unit vectors, the angle between them and the projection of one onto the other, each with a note on what it means.
How to use the vector calculator
- 1Choose two or three dimensions.
- 2Enter the components of each vector.
- 3Read the results — dot and cross products, magnitudes, angle and projection are all computed together.
- 4Check the notes for what a zero dot product or a zero cross product is telling you.
Examples
A 2D pair
- Input
- A = (3, 4), B = (1, 0)
- Result
- Dot 3, cross magnitude 4 with the z-component negative, |A| = 5, angle 53.13°, projection of A onto B is (3, 0), distance between the tips 4.472.
The negative cross component says B turns clockwise to reach A.
A 3D cross product
- Input
- A = (1, 2, 3), B = (4, 5, 6)
- Result
- A × B = (−3, 6, −3), dot 32, angle 12.93°, cross magnitude 7.348 — the area of the parallelogram they span.
About the vector calculator
Two products, two different questions
The dot product answers 'how aligned are these?' and returns a plain number. The cross product answers 'what plane do these span, and how much of it?' and returns a vector perpendicular to both, whose length is the area of the parallelogram they make.
One immediate consequence is that the cross product is not commutative: swapping the inputs reverses the result, because the right-hand rule that fixes its direction depends on the order. The dot product is symmetric and does not care. Both facts drop straight out of the geometry rather than being conventions to memorise.
The two degenerate cases
A dot product of zero means the vectors are perpendicular. A cross product of zero means they are parallel or antiparallel — pointing along the same line, and spanning no area at all. Those two conditions between them cover most of what you actually want to test about a pair of vectors, and both are exact checks rather than comparisons against a threshold.
There is a third degenerate case worth naming: the zero vector. It has no direction, so the angle between it and anything else is undefined, and normalising it is a division by zero. This page reports that rather than returning a plausible-looking number, which is the failure mode that tends to survive into production code.
Frequently asked questions
What does the dot product actually measure?
Why is the cross product only defined in three dimensions?
What is the projection for?
How is the angle computed?
Related tools
Matrix Calculator
Calculators
Determinant, inverse, transpose, product, sum and scalar multiple for matrices up to 6×6.
Triangle Calculator
Calculators
Solve a triangle from any three parts — sides, angles, area, altitudes and the ambiguous case.
Slope Calculator
Calculators
Slope, angle, distance, midpoint and the equation of the line through two points.