Skip to content
Math & Stats

Vector Calculator

Compute dot product, cross product, magnitude, unit vector, angle between vectors, addition, and subtraction for 2D and 3D vectors.

Enter vector components and click Calculate

Vector Formulas
Dot Product: A·B = a₁b₁ + a₂b₂ + a₃b₃
Cross Product: A×B = (a₂b₃−a₃b₂, a₃b₁−a₁b₃, a₁b₂−a₂b₁)
Magnitude: |A| = √(a₁² + a₂² + a₃²)
Unit Vector: Â = A / |A|
Angle: θ = arccos(A·B / (|A|·|B|))

FAQ

Frequently asked questions about vectors

What is the dot product of two vectors?
The dot product (scalar product) of vectors A and B is A·B = a₁b₁ + a₂b₂ + a₃b₃. It returns a scalar value and equals |A||B|cos(θ) where θ is the angle between the vectors.
What is the cross product?
The cross product A×B produces a vector perpendicular to both A and B. It's only defined for 3D vectors: A×B = (a₂b₃−a₃b₂, a₃b₁−a₁b₃, a₁b₂−a₂b₁). Its magnitude equals |A||B|sin(θ).
How do I find the angle between two vectors?
The angle θ between vectors A and B is found using: θ = arccos(A·B / (|A|·|B|)). The result is in radians; multiply by 180/π for degrees. The angle ranges from 0° to 180°.
What is a unit vector?
A unit vector has magnitude 1 and points in the same direction as the original vector. Calculate it by dividing each component by the vector's magnitude: û = v/|v|.
When is the dot product zero?
The dot product is zero when the vectors are perpendicular (orthogonal). This is because cos(90°) = 0, so A·B = |A||B|cos(90°) = 0. This property is used to test orthogonality.
What's the difference between 2D and 3D vectors?
2D vectors have two components (x, y) and exist in a plane. 3D vectors have three components (x, y, z) and exist in space. Cross product is only defined for 3D vectors; all other operations work for both.

Related calculators