Vector Direction Calculator
Calculate the direction angle and unit vector for 2D and 3D vectors with quadrant-aware angle formulas and step-by-step math.
Vector Direction and Unit Vector
The direction of a vector tells you which way it points. In 2D, the direction angle $\theta$ is measured counterclockwise from the positive x-axis. The unit vector $\hat{\mathbf{v}} = \mathbf{v}/|\mathbf{v}|$ has the same direction but length 1.
See also: Unit Vector Calculator, Vector Magnitude Calculator, and Angle Between Two Vectors Calculator.
2D Direction Angle
For $\mathbf{v} = (x, y)$, use $\theta = \arctan(y/x)$ adjusted for the correct quadrant so $0° \leq \theta < 360°$.
Frequently Asked Questions
How do I find the direction of a vector?
In 2D, compute the angle from the positive x-axis using arctan(y/x) with quadrant correction. In 3D, use the unit vector or spherical angles.
What is a unit vector in the direction of v?
Divide each component by the magnitude: $\hat{\mathbf{v}} = \mathbf{v}/|\mathbf{v}|$.
Why does quadrant matter for direction angle?
arctan(y/x) alone only gives an angle relative to the nearest horizontal axis. Quadrant rules ensure the full 0° to 360° direction.
Can a zero vector have a direction?
No. The zero vector has magnitude 0, so division is undefined and direction is not defined.