CALVOFull Calculator →

Vector Calculator

Enter two vectors and get the sum, difference, dot and cross product, magnitudes, unit vector, angle and projection.

Vector calculator (2D and 3D)

same number of components as A
Try:
The results will appear here.

Formulas

QuantityFormula
Magnitude|A| = √(a₁² + a₂² + a₃²)
Dot productA · B = a₁b₁ + a₂b₂ + a₃b₃ = |A||B| cos θ
Cross product (3D)A × B = (a₂b₃ − a₃b₂, a₃b₁ − a₁b₃, a₁b₂ − a₂b₁)
Angleθ = cos−1[(A · B)/(|A||B|)]
Unit vectorâ = A/|A|
Projection of A on B[(A · B)/|B|²] B

Worked example

A = (1, 2, 3), B = (4, −1, 2). A · B = 4 − 2 + 6 = 8. A × B = (2·2 − 3·(−1), 3·4 − 1·2, 1·(−1) − 2·4) = (7, 10, −9). |A| = √14 ≈ 3.7417.

FAQ

How do I find the dot product?

Multiply matching components and add them. For (1,2,3) and (4,-1,2) it is 1*4 + 2*(-1) + 3*2 = 8.

What does the cross product give?

A vector perpendicular to both A and B, defined in 3D. Its length is the area of the parallelogram they span.

How do I enter a 2D vector?

Type two numbers such as 3, 4. For 2D vectors Calvo shows the scalar z-part of the cross product.

How is the angle found?

From the dot product: the angle is the inverse cosine of A dot B divided by the product of the magnitudes.

What if a vector is zero?

Angle, unit vector and projection are undefined for a zero vector, and Calvo tells you so.

More Calvo tools

Open the full Calvo Scientific Calculator