2D and 3D Vector Calculator
Enter vectors by components or magnitude and direction, visualize them, and calculate common vector operations.
Vector arithmetic with a live diagram
Enter vectors by components or by magnitude and direction, in two or three dimensions, and see them drawn together with their resultant. The tool computes the resultant, magnitudes, directions, dot products, angles between vectors, and — in 3D — the cross product and its magnitude.
Equations used
The standard vector relationships:
- Resultant: Σv = v₁ + v₂ + … + vₙ, added component by component
- Magnitude: |v| = √(vₓ² + v_y² + v_z²)
- Dot product: a · b = aₓbₓ + a_yb_y + a_zb_z = |a||b|·cos θ
- Angle between vectors: θ = arccos((a · b) / (|a||b|))
- Cross product magnitude: |a × b| = |a||b|·sin θ
Frequently asked questions
- What is the difference between the dot product and the cross product?
- The dot product returns a scalar and measures how much two vectors point in the same direction; it is zero when they are perpendicular. The cross product, defined in three dimensions, returns a vector perpendicular to both inputs whose magnitude equals the area of the parallelogram they span; it is zero when they are parallel.
- How do you find the angle between two vectors?
- Take the dot product and divide by the product of the magnitudes, then take the inverse cosine: θ = arccos((a · b) / (|a|·|b|)). The result is between 0° and 180°. A negative dot product means the angle is obtuse.