Unit Vector Calculator

A unit vector keeps a vector’s direction but has length 1. Divide every component by the vector’s magnitude.

Also called: Vector normalisation calculator · Normalize vector calculator

  • Last updated
  • Formula tested against reference values

Your numbers

Components separated by commas, e.g. 3, 4 or 1, -2, 2. Any number of dimensions from 2 to 50.

Result

Unit vector û
—

Calculating…

Original magnitude |v|
—
Direction angle (2D only)
—
Number of components
—

How to use this calculator

  1. Enter or choose vector.
  2. The unit vector û updates as you type. Use Copy result or Share to keep it.

Method

û = v ÷ |v| = (v₁/|v|, v₂/|v|, …, vₙ/|v|); |v| = √(Σ vᵢ²)

v
the vector
|v|
its magnitude
û
the unit vector

Worked example

  1. |v| = √(3² + 4²) = √25 = 5.
  2. Divide each component by 5: 3 ÷ 5 = 0.6 and 4 ÷ 5 = 0.8.
  3. Check: 0.6² + 0.8² = 0.36 + 0.64 = 1.

The unit vector in the direction of (3, 4) is (0.6, 0.8).

What the result means

The components of a unit vector are the direction cosines: the cosines of the angles it makes with each axis. Multiply the unit vector by any length to get a vector of that length in the same direction.

Assumptions and limits

  • Components are in an ordinary Cartesian basis.
  • The zero vector has no direction, so it cannot be normalised.
  • Components are shown to 6 decimal places, so their squares may sum to 1 only after rounding.

Questions

How do I get a vector of length 10 in the same direction?

Multiply each component of the unit vector by 10.

Is the unit vector unique?

For a given direction, yes. The opposite direction gives −û.