Skip to content
math

Unit Vector Calculator

Find the unit vector (normalized direction) of any 2D or 3D vector by dividing each component by its magnitude.

Unit vector v̂
(1, 0, 0)
Original magnitude |v| = 1. A unit vector always has magnitude 1. Normalization divides each component by |v|: v̂ = v ÷ 1.

How it works

  1. 1Enter the x, y (and optionally z) components of your vector and choose 2D or 3D mode.
  2. 2The calculator computes the Euclidean magnitude |v| = √(x² + y² + z²), then divides each component by |v| to produce v̂.
  3. 3The resulting unit vector always has magnitude 1 and points in the same direction as the original — except when the input is the zero vector, which has no defined direction.

Use cases

  • Graphics and game engines: convert a movement vector into a pure direction before applying a separate speed scalar.
  • Physics simulations: normalize force or velocity vectors to isolate directional components for projection and decomposition.
  • Machine learning: unit-normalize feature vectors before computing cosine similarity or feeding them into neural-network layers.

Frequently asked questions

What is a unit vector?

A unit vector is a vector with magnitude exactly 1. It encodes only direction, not scale. Any non-zero vector v can be normalized to v̂ = v ÷ |v|.

Why does the zero vector have no unit vector?

Normalization requires dividing by |v|. When |v| = 0 the division is undefined, and the zero vector carries no directional information, so no unit vector exists.

Does normalizing change the direction of the vector?

No. v̂ always points in the exact same direction as v; only the length changes to 1. Negative components remain negative and the proportions between components are preserved.

See all →