Normalize a 2D or 3D vector while preserving its direction.
Vector normalization
Choose a dimension and enter each vector component.
About unit vectors
A unit vector is a vector with magnitude exactly one. It represents direction without carrying the original vector's scale. Any nonzero vector can be normalized by dividing every component by the vector's Euclidean magnitude. The resulting components point in the same direction, and the square root of their squared sum equals one apart from ordinary decimal rounding.
For a two-dimensional vector with components x and y, magnitude is the square root of x squared plus y squared. For three dimensions, z squared is added under the square root. The calculator first computes that magnitude and then divides x, y, and optionally z by it. A vector such as (3, 4) has magnitude 5, so its unit vector is (0.6, 0.8). Multiplying that unit vector by 5 reconstructs the original vector.
The zero vector is the important exception. Its magnitude is zero, and dividing its components by zero is undefined. It also has no direction to preserve, so there is no unique unit vector associated with it. Negative components are valid and indicate direction along negative coordinate axes. Decimal components are also supported. Displayed results are rounded to six decimal places, while calculation uses the browser's full floating-point precision.
Unit vectors appear throughout linear algebra, geometry, physics, engineering, graphics, and navigation. They describe coordinate axes, force directions, surface normals, camera orientation, velocity headings, and bases for coordinate systems. Separating direction from magnitude makes it easier to apply a desired length or physical intensity later. In mechanics, a force magnitude multiplied by a unit direction creates the force vector. In computer graphics, normalized surface normals are needed for consistent lighting calculations. Use this calculator to verify normalization steps, inspect a vector's original magnitude, or prepare directional components for a larger calculation. Remember that rounding the displayed components can make their recomputed magnitude differ very slightly from one.
Examples
Vector
Unit vector
Magnitude
(3, 4)
(0.6, 0.8)
Magnitude 5.
(1, 2, 2)
(0.333333, 0.666667, 0.666667)
Magnitude 3.
(-5, 0)
(-1, 0)
Direction along the negative x-axis.
How to use the calculator
Choose whether the vector has two or three dimensions.
Enter every component, including negative or decimal values when needed.
Select Calculate Unit Vector.
Review the magnitude and normalized components.
Frequently asked questions
How do you find a unit vector?
Find the original vector's magnitude, then divide every component by that magnitude. This preserves direction while changing the length to one.
Can the zero vector be normalized?
No, normalization would require division by zero. The zero vector also has no defined direction.
Does normalization change direction?
No, dividing all components by the same positive magnitude preserves direction. It changes only the vector's length.
Why does the rounded magnitude sometimes differ from one?
Displayed components are rounded to a finite number of decimal places. Calculations before display retain more precision.
What are unit vectors used for?
They represent pure direction in physics, engineering, graphics, and navigation. They are also used to build orthonormal bases in linear algebra.