➡️ Vector Calculator
Enter two vectors (comma-separated, 2D or 3D) to compute their dot product, cross product (3D only), magnitudes, the angle between them, and their sum and difference.
Dot for the angle, cross for the perpendicular
Both products come straight from the components, and the angle follows from the dot product once the magnitudes are known:
A · B = a₁b₁ + a₂b₂ + a₃b₃ |A| = √(A · A)
cos θ = (A · B) / (|A| |B|)
A × B = (a₂b₃ − a₃b₂, a₃b₁ − a₁b₃, a₁b₂ − a₂b₁)
The defaults (1, 2, 3) and (4, 5, 6) give a dot product of 4 + 10 + 18 = 32, magnitudes of 3.7417 and 8.775, and an angle of 12.93°. The cross product is (−3, 6, −3), which points at right angles to both.
What each row is telling you
- A dot product of zero means perpendicular - the angle row reads 90°. A negative one means the vectors point more than a right angle apart.
- The cross product's length is an area: 7.3485 here, the parallelogram the two vectors span. Reverse the order and every sign flips, because B × A points the opposite way.
- 2D or 3D, comma separated. Both vectors need the same number of components, and the cross product row appears only in 3D.
Frequently asked questions
What is the dot product of (1, 2, 3) and (4, 5, 6)?
32. Multiply the matching components and add: 1x4 = 4, 2x5 = 10 and 3x6 = 18.
How do I tell whether two vectors are perpendicular?
Their dot product is zero. (1, 2, 3) and (2, -1, 0) give 2 - 2 + 0 = 0, and the angle row confirms 90 degrees.
What does the cross product actually give you?
A third vector at right angles to both, its length equal to the area of the parallelogram they form. For the defaults that is (-3, 6, -3), 7.3485 long.