Vector Calculator

Dimensions
Dot Product (A · B)32.0000
Cross Product (A × B)(-3.0000, 6.0000, -3.0000)
Magnitude |A|3.7417
Magnitude |B|8.7750
Angle Between12.93°

The Vector Calculator takes two vectors in two or three dimensions and returns their magnitudes, dot product, cross product, and the angle between them. These operations underpin physics, computer graphics, and engineering, where direction matters as much as size — the dot product measures alignment while the cross product produces a vector perpendicular to both inputs.

Formula

|v| = √(Σvᵢ²) ; A · B = Σaᵢbᵢ ; θ = arccos((A · B) / (|A||B|))

vᵢ
The ith component of a vector
A · B
Dot product of vectors A and B
A × B
Cross product, a vector perpendicular to both (3D only)
θ
Angle between the two vectors

How it works

  1. Choose 2D or 3D, then enter the components of vector A and vector B as comma-separated numbers (for example 1, 2, 3).
  2. The calculator finds each magnitude with √(Σvᵢ²), the dot product as the sum of component products Σaᵢbᵢ, and the cross product using the standard 3D determinant rule.
  3. The angle between the vectors comes from the dot product and magnitudes via θ = arccos((A · B) / (|A| · |B|)), reported in degrees.

Worked example

Compute the dot and cross products of A = (1, 2, 3) and B = (4, 5, 6).

  1. Dot product: 1×4 + 2×5 + 3×6 = 4 + 10 + 18 = 32.
  2. Cross product: (2×6 − 3×5, 3×4 − 1×6, 1×5 − 2×4) = (−3, 6, −3).
  3. Magnitudes: |A| = √(1+4+9) = √14 ≈ 3.7417, |B| = √(16+25+36) = √77 ≈ 8.7750.

Dot product 32, cross product (−3, 6, −3), and an angle of about 12.93°.

Frequently asked questions

Why is the cross product only available for 3D vectors?
The cross product as a single perpendicular vector is uniquely defined in three dimensions. For 2D inputs the calculator reports that the cross product is unavailable rather than returning a misleading value.
What does the dot product tell me?
The dot product measures how much two vectors point in the same direction. It is positive for acute angles, zero when the vectors are perpendicular, and negative when they point in roughly opposite directions.
What happens if one vector is the zero vector?
Magnitude and dot product are still defined, but the angle between the vectors is undefined because the formula would divide by a zero magnitude, so the calculator reports the angle as undefined.
How is this different from the matrix calculator?
This tool works on one-dimensional vectors and their geometric products, whereas the matrix calculator handles two-dimensional arrays and operations like multiplication, determinant, and inverse.