Vector Calculator

Perform 2D and 3D vector operations: addition, subtraction, dot product, cross product (3D only), magnitude, unit vector, and angle between two vectors.

Vector A
Vector B
Vector Operation Formulas
Magnitude: |A| = √(x² + y² + z²) Unit vector: Â = A / |A| Dot product: A·B = axbx + ayby + azbz (scalar) Cross product: A×B = (aybz−azby, azbx−axbz, axby−aybx) (3D only) Angle: θ = arccos(A·B / (|A||B|))
RelationshipCondition
Parallel vectorsCross product = zero vector
Perpendicular vectorsDot product = 0
Same directionDot product > 0
Opposite directionDot product < 0
How to use
Dot product

A scalar value equal to |A||B|cos(θ). If the dot product is 0, the vectors are perpendicular. If positive, the angle between them is less than 90°.

Cross product (3D only)

Returns a vector perpendicular to both A and B. Its magnitude equals |A||B|sin(θ). Used in physics for torque, angular momentum, and finding surface normals.

Unit vector

A vector with magnitude 1 pointing in the same direction as A. Found by dividing each component by the magnitude.

Angle

Calculated from the dot product formula: θ = arccos(A·B / (|A||B|)). Returns both degrees and radians.

Formula
Magnitude: |A| = √(x² + y² + z²) Dot: A·B = axbx + ayby + azbz Cross: A×B = (aybz−azby, azbx−axbz, axby−aybx) Angle: θ = arccos(A·B / |A||B|)
Tips
  • Two vectors are parallel if their cross product is the zero vector.
  • Two vectors are perpendicular (orthogonal) if their dot product is 0.
  • The cross product is not commutative: A×B = −(B×A).