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.

What the dot and cross product tell you

The dot product gives a single number and measures how much two vectors point the same way. If it is zero, the vectors are perpendicular. For example, (2, 3) · (−3, 2) = −6 + 6 = 0, so those two vectors meet at a right angle. The cross product gives a new vector perpendicular to both, and its length equals the area of the parallelogram the two vectors form.

Worked examples

Physics situations where each one appears

Work and power use the dot product, since only the part of a force along the motion does work. Torque (τ = r × F) and the magnetic force on a moving charge use the cross product. Resolving a force into components is a projection. Whenever a physics formula contains a “cos θ”, a dot product is usually hiding behind it, and a “sin θ” usually means a cross product.

Mistakes to avoid

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.

How do I know two vectors are parallel?

Their cross product is the zero vector, or one vector is a constant multiple of the other. For example (2, 4, 6) and (1, 2, 3) are parallel.

What is a unit vector used for?

It keeps only the direction. Dividing a vector by its magnitude gives a vector of length 1, useful for describing directions such as the axis of a force.

More Calvo tools

Open the full Calvo Scientific Calculator