🧮
🧮 Math & statistics

Unit Vector & Direction Angles Calculator

Results update as you type.

Your numbers

Understanding the unit vector and direction angles calculator — concept and principle

A unit vector has length 1 and keeps only the direction of the original vector. This calculator normalises a 3D vector v, reports its magnitude, and gives the direction angles α, β and γ that v makes with the positive x, y and z axes. Unit vectors are needed for surface normals in graphics, direction of forces in mechanics, the direction cosines used in surveying and structural analysis, and anywhere a formula asks for "a direction" rather than a full vector.

Unit vector of (3, 4, 12)Two Pythagoras steps give the length: 3-4-5, then 5-12-13. Dividing each component by 13 gives (0.231, 0.308, 0.923), whose arccos values are the direction angles 76.66°, 72.08° and 22.62°.Shrink (3, 4, 12) to length 143551213√(3² + 4²)= 5√(5² + 12²) = √169|v| = 13length 13÷ 13length 1 = unit vector3 ÷ 130.2308α 76.66°4 ÷ 130.3077β 72.08°12 ÷ 130.9231γ 22.62°direction angle = arccos(component), e.g. γ = arccos 0.923
Same direction, length shrunk from 13 to 1 — every component divided by 13.

How it is calculated

The zero vector has no direction, so the calculator reports it as an error.

The principle

Dividing every component by the same positive number shrinks or stretches the vector without turning it, so û points the same way as v and has length exactly 1. The components of û are called the direction cosines because, from the dot product, cos α = (v · i) ÷ |v| = x ÷ |v|, and similarly for the y and z axes. Since û has length 1, cos²α + cos²β + cos²γ = 1, so the three angles are not independent; two of them determine the third up to sign.

Worked example

  1. Default input: v = (3, 4, 12).
  2. |v| = √(9 + 16 + 144) = √169 = 13.
  3. û = (3/13, 4/13, 12/13) = (0.2307692308, 0.3076923077, 0.9230769231).
  4. α = arccos(0.230769) = 76.6576362°.
  5. β = arccos(0.307692) = 72.07978686°.
  6. γ = arccos(0.923077) = 22.61986495°.

Check: 0.230769² + 0.307692² + 0.923077² = 0.0533 + 0.0947 + 0.8521 = 1.

How to read the result

A small direction angle means the vector lies close to that axis: here γ ≈ 22.6°, so v points mostly along +z. An angle of 90° means the vector is perpendicular to that axis, and an angle above 90° means its component on that axis is negative. To build a vector of any length L in the same direction, multiply û by L; for example 26û = (6, 8, 24).

Common mistakes

Keep in mind: Results are rounded to 10 significant digits, so the unit vector's length may differ from 1 in the last digit. The zero vector cannot be normalised.

Frequently asked questions

How do I find a unit vector between two points?

Subtract the coordinates, v = B − A, and divide by |v|.

Is a unit vector the same as a normal vector?

No. A normal vector is perpendicular to a surface and can have any length; a unit normal is a normal vector that has been normalised.

What are i, j and k?

The unit vectors along the x, y and z axes: (1, 0, 0), (0, 1, 0) and (0, 0, 1).

Sources: Gilbert Strang, Introduction to Linear Algebra, Chapter 1 (lengths and unit vectors) · James Stewart, Calculus: Early Transcendentals, section on vectors and direction angles

Checked 8 Nov 2026. Standard formulas, computed in your browser with double-precision numbers.

🧮 All math & statistics tools →🌍 Calculators by country →