Unit Vector Calculator

A unit vector (also called a normalized vector) points in the same direction as a given vector but has a magnitude of exactly 1. To compute it, divide each component of the vector by the vector's Euclidean magnitude, which is the square root of the sum of the squares of all components. Unit vectors are fundamental in physics (describing direction of force, velocity, or electric field), computer graphics (surface normals), and linear algebra (orthonormal bases). Enter the components of a 2D or 3D vector below to find its unit vector and magnitude instantly.

5.00
0.60
0.80
0.00

Unit vector formula

|v| = sqrt(x^2 + y^2 + z^2)
v-hat = v / |v| = (x/|v|, y/|v|, z/|v|)

The resulting vector v-hat satisfies |v-hat| = 1. The unit vector is defined for any nonzero vector; it is undefined for the zero vector because division by zero is not defined.

Unit vectors in practice

  • Standard Cartesian unit vectors: i = (1,0,0), j = (0,1,0), k = (0,0,1).
  • A force F in direction d with magnitude m: F = m * d-hat where d-hat is the unit vector of d.
  • Surface normals in computer graphics are unit vectors perpendicular to a surface.
  • Direction cosines are the components of the unit vector (the cosines of angles with each axis).
  • The dot product of two unit vectors equals the cosine of the angle between them.

Unit vector calculator: frequently asked questions

What is a unit vector?

A unit vector is a vector with a magnitude (length) of exactly 1. It points in the same direction as the original vector but has been scaled so its length equals 1. Unit vectors are used to represent directions without carrying magnitude information.

How do you normalize a vector?

Divide each component of the vector by the vector's magnitude. For a vector v = (x, y, z), the magnitude is |v| = sqrt(x^2 + y^2 + z^2). The unit vector is v_hat = (x/|v|, y/|v|, z/|v|).

Why are unit vectors important?

Unit vectors are used to define direction without a specific scale. Standard unit vectors i = (1,0,0), j = (0,1,0), k = (0,0,1) form the basis of 3D Cartesian coordinates. In physics, direction cosines and surface normals are expressed as unit vectors.

What happens if the input vector is the zero vector?

The zero vector (0, 0, 0) has magnitude zero and no defined direction. Division by zero means the unit vector is undefined. This calculator returns n/a for the zero vector.

Can I use unit vectors to decompose force or velocity?

Yes. If you know the direction of a force as a unit vector v_hat and its magnitude F, then the force vector is F * v_hat. This decomposition is fundamental in resolving forces into components, computing work (dot product with displacement unit vector), and many other physics applications.

Official sources

Reviewed by the CalculatorHub team, edited by James Graham, 15 June 2026. See our methodology.