Skip to content
Mathematics

Vector calculator in two or three dimensions

Calculate sums, differences, magnitudes, dot products and angles. Three-dimensional vectors also show the cross product.

Free & no registration Calculated in your browser
01

Your inputs

The starting values are an example.

Two or three components, separated by semicolons.
The same number of components as a.

Decimals: 12.5 · Thousands: 1,234.56. Follow the field instructions for lists.

02

Your result

Enter your values and select Calculate.

Your calculation will appear here.

Your result will include the relevant values and units.

Understand the calculation

Formula and example

How it is calculated

a·b=Σaᵢbᵢ; |a|=√(Σaᵢ²); cos(φ)=(a·b)/(|a|·|b|).

Worked example

a=(1;0;0) and b=(0;1;0) have dot product 0 and angle 90°. Their cross product is (0;0;1).

Things to check

  • The angle to a zero vector is undefined. The sum, difference and dot product can still be calculated.
  • For two-dimensional vectors, the signed parallelogram area is shown instead of a three-dimensional cross product.

Frequently asked questions

Why can a dot product be negative?

For two non-zero vectors, a negative dot product means their angle is greater than 90°.