Vector Calculator (Dot Product, Cross Product, Magnitude, Unit Vector, Angle)

Enter two 2D or 3D vectors to instantly calculate the dot product, cross product, magnitude (norm), unit vectors, and the angle between the two vectors — a free vector calculator.

Tips

  • Switch between 2D and 3D with the tabs above. Choosing 3D reveals the z-component input fields and the cross product result.
  • When the dot product is 0, the two vectors are orthogonal (perpendicular). A positive value means an acute angle between them; a negative value means an obtuse angle.
  • The resulting cross product vector points in a direction perpendicular to both input vectors, following the right-hand rule.
  • A unit vector is the original vector divided by its magnitude (norm) — it has a length of exactly 1 and represents direction only. Use it whenever you only care about direction, not magnitude.
  • Entering a zero vector (every component equal to 0) makes the magnitude 0, so the unit vector and the angle cannot be calculated for it.

Frequently Asked Questions

The dot product takes two vectors and produces a single number (a scalar), commonly used to measure similarity or find the angle between vectors. The cross product takes two vectors and produces a new vector perpendicular to both — and it is only defined in three dimensions.

A three-dimensional space is the only one where a direction perpendicular to two given vectors can be uniquely determined. In 2D there is no consistent perpendicular direction to pick, and in 4D and higher there are infinitely many, so the general cross product is naturally defined only in 3D.

Using the formula cosθ = (a·b) / (|a||b|). Dividing the dot product by the product of the two magnitudes gives cosθ, and taking its inverse cosine (arccos) yields the angle θ, in either degrees or radians.

A unit vector points in the same direction as the original vector but has a magnitude (length) of exactly 1. It is found by dividing a vector by its magnitude, and it is commonly used for surface normal vectors in computer graphics or whenever only direction, not magnitude, matters.

Calculate the dot product — if it equals 0, the two vectors are orthogonal (perpendicular). This tool calculates the dot product of your input vectors automatically, so you only need to check whether that value is 0.
ツールくん

Side Note — Vectors were born out of Hamilton's quaternions

The vector notation we use today traces back to "quaternions," a system invented by the 19th-century Irish mathematician William Rowan Hamilton to represent rotations in three dimensions. A quaternion consists of four numbers, and it was the three components of its "imaginary part" that eventually became the prototype for the modern vector.

It was the American physicist Josiah Willard Gibbs and the British engineer Oliver Heaviside who separated vectors from quaternions and organized them into the dot product and cross product we use today. Working independently in the late 19th century, they stripped away the parts of quaternion algebra that weren't needed for physics — especially electromagnetism — and built the vector analysis framework still taught today.

The cross product is generally defined only for 3D vectors because a three-dimensional space is uniquely suited to picking out a single direction perpendicular to two given vectors. Thanks to this property, the cross product shows up throughout physics — in torque and angular momentum — as well as in computer graphics, where it is used to compute the normal vector of a surface.