Math

Vector Calculator

Calculate vector magnitude, direction, dot product, and angle between vectors.

CALCULATOR

Enter your numbers

Instant results
5.0000
Result
v = (3, 4)
|v| = √(3² + 4²)
|v| = √(9 + 16)
|v| = 5.0000

THE NUMORIX GUIDE

How to use the Vector Calculator

Last reviewed September 14, 2026

What this calculator does

The operation selector computes 2D magnitude sqrt(x^2+y^2), direction atan2(y,x) in degrees, dot product x1*x2+y1*y2, or angle arccos((v1 dot v2)/(|v1||v2|)) in degrees.

Formula and method

The operation selector computes 2D magnitude sqrt(x^2+y^2), direction atan2(y,x) in degrees, dot product x1*x2+y1*y2, or angle arccos((v1 dot v2)/(|v1||v2|)) in degrees.

Variables and inputs

Mode defaults to Magnitude. Vector 1 defaults to (3,4); Vector 2 defaults to (0,0) and is needed only for dot product or angle mode.

Worked example

For magnitude of (3,4): |v| = sqrt(3^2+4^2) = sqrt(25) = 5. For v1=(3,4) and v2=(1,2), dot product = 3*1+4*2 = 11.

How to interpret the result

Magnitude is length, direction is the counterclockwise angle from the positive x-axis, dot product measures alignment, and angle mode returns the smaller angle between nonzero vectors.

Common mistakes to avoid

Do not use the dot product as a magnitude, and do not forget that angle requires two nonzero vectors. The direction result is in degrees even though atan2 is evaluated in radians.

Assumptions and limitations

Only two-dimensional vectors are supported. The angle branch clamps the cosine to [-1,1] for floating-point safety but does not provide a useful answer for a zero vector.

Practical use and checks

The Vector Calculator works with two-dimensional components and can return a magnitude, direction, dot product, or angle between vectors. Enter v1 = (3, 4) and choose magnitude as a check; the result should be 5. For v1 = (1, 0) and v2 = (0, 1), choose dot product to get 0 and angle to get 90 degrees. A direction result for (1, 1) should be 45 degrees, measured counterclockwise from the positive x-axis by atan2. Use magnitude for a resultant size, direction for orientation, dot product for projection or perpendicularity, and the angle for geometric comparison. Components must use the same coordinate system and units before they are combined. A zero vector has no unique direction and cannot define an angle with another vector; the engine may produce a nonfinite or guarded value in that edge case. Dot product zero indicates orthogonality in ordinary Euclidean coordinates, not that the vectors are absent. The page is two-dimensional and does not handle cross products, coordinate transforms, uncertainty, or time-varying components. For a physical force or velocity, preserve the sign of each component rather than entering magnitudes only, because direction is part of the vector's meaning.

Sources and references

COMMON QUESTIONS

Frequently asked questions

What does a negative direction angle mean?

It means the vector lies below the positive x-axis under atan2's signed-angle convention; add 360 degrees if a [0,360) heading is preferred.

Why can a dot product be negative?

It is negative when the vectors point more than 90 degrees apart, indicating opposing components.