Choose mode and dimension
Select Normalize a vector to find the unit vector, or Find a missing component to solve for the value that makes the length 1. Set the dimension to 2D or 3D.
Normalize any vector <x, y, z> to length 1, or recover a missing unit-vector component. Watch the geometry update live as you type.
Enter the known components of a unit vector. Leave the unknown one blank and the tool will solve it so the length equals 1.
Drag the orange point to change x and y.
Drag to rotate and scroll to zoom in the interactive 3D view.
Every step recomputes live from the numbers above.
Using the unit vector calculator takes 3 steps: pick the setup, enter the components, and read the result. The calculator recomputes the moment you type, so there is no submit button to press, and a full step-by-step solution appears below the tool.
Select Normalize a vector to find the unit vector, or Find a missing component to solve for the value that makes the length 1. Set the dimension to 2D or 3D.
Type x, y, and z into the input fields. You can paste a preset or drag the orange point on the diagram to set the values.
The result panel shows the unit vector, the magnitude, and a length check equal to 1. Use the copy button to grab the components.
Enter a 2D vector by filling the x and y fields after setting the dimension to 2D. Enter a 3D vector by switching to 3D, which reveals the z field for a vector in the form <x, y, z>. The fields accept decimals, negatives, and short expressions such as sqrt(2) or 3^2. The Cartesian coordinate system frames both cases, so a 2D vector sits in the plane while a 3D vector points anywhere in 3D space.
The calculator returns 4 outputs for every nonzero vector you enter, listed in the table below.
| Output | Notation | Meaning |
|---|---|---|
| Magnitude | ||v|| | The length of the original vector. |
| Unit vector | <x/||v||, ...> | The normalized vector with length 1. |
| i, j, k form | a i + b j + c k | The same unit vector in basis notation. |
| Direction angles | α, β, γ | The angles the vector makes with each axis. |
The vector magnitude ||v|| is the length of the vector, found with ||v|| = sqrt(x^2 + y^2 + z^2). The number tells you how far the arrow reaches from the origin to its tip. A magnitude of 5 means the vector is 5 units long. This is the same value a vector magnitude calculator or a distance calculator returns, and it comes straight from the Pythagorean theorem applied to the components.
The unit vector in component form lists each original component divided by the magnitude, written <x/||v||, y/||v||, z/||v||>. Each unit vector component sits between -1 and 1, and the squares of all components sum to 1. This form keeps the vector direction unchanged while setting the length to exactly 1.
The same unit vector appears in i, j, k notation, where i = <1, 0, 0>, j = <0, 1, 0>, and k = <0, 0, 1> are the basis vectors. A unit vector <0.6, 0.8> reads as 0.6 i + 0.8 j. The two forms hold the same numbers, so pick whichever notation your course or codebase uses.
The direction angles α, β, and γ are the angles the vector makes with the x, y, and z axes. Their cosines, the direction cosines, equal the unit vector components. For a 2D vector the calculator reports a single direction angle theta = atan2(y, x) measured from the positive x-axis.
A unit vector is a vector of length equal to 1. It marks a pure direction without carrying any size. Dividing any nonzero vector by its magnitude produces the unit vector along the same line. In a Cartesian coordinate system, the 3 unit vectors that build 3D space are <1, 0, 0> for the x-direction, <0, 1, 0> for the y-direction, and <0, 0, 1> for the z-direction. Every vector in 3D space equals a sum of these unit vectors.
Hat notation writes a unit vector with a circumflex, or hat, above the letter, so the unit vector of v is written v̂ and read “v-hat.” The hat is the standard signal that a vector has length 1. The basis vectors carry the same mark, as in î, ĵ, and k̂.
A unit vector and a direction vector describe the same idea from two angles. A direction vector points a chosen way and can have any length. A unit vector is a direction vector scaled to length 1. The table below sets them side by side.
| Property | Unit vector | Direction vector |
|---|---|---|
| Length | Always 1 | Any positive value |
| Carries direction | Yes | Yes |
| Carries size | No | Yes |
| Made by | Dividing by the magnitude | Any nonzero vector |
A basis vector is a unit vector locked to a coordinate axis, while a unit vector can point any way. The 3 basis vectors i, j, and k each have length 1 and align with the x, y, and z axes. A unit vector like <0.6, 0.8> also has length 1 but points between the axes. Every basis vector is a unit vector, yet most unit vectors are not basis vectors.
The unit vector formula is û = v / |v|, where û is the unit vector, v is the original vector in the form <x, y, z>, and |v| is the magnitude. Applying the formula takes 3 steps.
Find the magnitude by squaring each component, adding the squares, and taking the square root: |v| = sqrt(x^2 + y^2 + z^2). For v = <8, -3, 5>, the magnitude is sqrt(64 + 9 + 25) = sqrt(98) ≈ 9.8995.
Divide each component by the magnitude to get the unit vector components. For the same vector, x = 8 / 9.8995 ≈ 0.8081, y = -3 / 9.8995 ≈ -0.3030, and z = 5 / 9.8995 ≈ 0.5051, so û = <0.8081, -0.3030, 0.5051>.
Verify the result by computing its magnitude, which should equal 1. Squaring and adding the components above gives 0.6530 + 0.0918 + 0.2552 = 1.0000, so the length check passes. The calculator runs this unit vector check for you and prints the value next to the result.
The 4 worked examples below cover a 2D vector, a 3D vector, a vector from two points, and a vector with negative components. Enter any of them in the calculator above to see the same steps run live.
For v = <2, 3>: ||v|| = sqrt(4 + 9) = sqrt(13) ~= 3.6056, so u = <0.5547, 0.83205>.
The unit vector of <3, 4> is <0.6, 0.8>. The magnitude is sqrt(3^2 + 4^2) = sqrt(25) = 5, so dividing gives <3/5, 4/5> = <0.6, 0.8>. The length check returns 0.36 + 0.64 = 1.
| Step | Value |
|---|---|
| Magnitude | sqrt(9 + 16) = 5 |
| Divide x | 3 / 5 = 0.6 |
| Divide y | 4 / 5 = 0.8 |
| Check | 0.36 + 0.64 = 1 |
The unit vector of <1, 1, 1>, the cube diagonal, is <0.5774, 0.5774, 0.5774>. The magnitude is sqrt(1 + 1 + 1) = sqrt(3) ≈ 1.7321, so each component becomes 1 / sqrt(3) ≈ 0.5774. All 3 components match because the vector points equally along every axis.
Find the unit vector from point A to point B by subtracting coordinates, then normalizing. For A = (2, 1, 3) and B = (5, 5, 15), the displacement is B - A = <3, 4, 12>. The magnitude is sqrt(9 + 16 + 144) = sqrt(169) = 13, so the unit vector is <3/13, 4/13, 12/13> ≈ <0.2308, 0.3077, 0.9231>.
The unit vector of <-5, 12> is <-0.3846, 0.9231>. The magnitude is sqrt(25 + 144) = sqrt(169) = 13, so the components are -5/13 and 12/13. The negative sign carries through, and the length check still returns 0.1479 + 0.8521 = 1.
Direction angles and direction cosines tie a unit vector to the coordinate axes. The angles measure orientation, and their cosines are the unit vector components themselves.
| Axis | Direction angle | Direction cosine |
|---|---|---|
| x | α | cos α = x/|v| |
| y | β | cos β = y/|v| |
| z | γ | cos γ = z/|v| |
Direction angles α, β, and γ are the angles a vector makes with the positive x, y, and z axes, each between 0° and 180°. For the cube diagonal <1, 1, 1>, all 3 angles equal 54.74° (0.9553 rad), because the vector leans equally toward every axis.
Each unit vector component equals the cosine of its direction angle, the values known as direction cosines, so cos α = x/|v|, cos β = y/|v|, and cos γ = z/|v|. The unit vector <0.6, 0.8> therefore has direction cosines 0.6 and 0.8, giving angles of 53.13° and 36.87°. The squares of the direction cosines sum to 1, the same rule that defines a unit vector.
Two related vectors build on normalization: the unit normal vector and the unit tangent vector.
A unit normal vector is a vector of length 1 that points perpendicular to a surface or curve. You find it by taking a normal vector, often from a cross product of two edge vectors, then dividing by its magnitude. A unit normal vector calculator returns this value for lighting, collision, and surface math. In 2D, rotating <x, y> to <-y, x> and normalizing gives a unit normal.
A unit tangent vector is a vector of length 1 that points along the direction of motion on a curve. For a curve r(t), it equals the derivative r'(t) divided by its magnitude, T(t) = r'(t) / |r'(t)|. A unit tangent vector calculator handles this for paths in 2D and 3D space, and the result feeds curvature and motion calculations.
4 cases trip people up most often: the zero vector, an already-normalized vector, negative components, and dividing by the wrong magnitude.
The zero vector <0, 0, 0> cannot be normalized. Its magnitude is 0, and dividing by zero is undefined, so it has no unit vector. The zero vector also has no direction, which is the reason the rule holds. The calculator flags this case instead of returning a result.
A vector that already has length 1 stays the same after normalization. Check by computing the magnitude: if it equals 1, the vector is its own unit vector. The vector <0.6, 0.8> returns <0.6, 0.8> because sqrt(0.36 + 0.64) = 1.
Yes, unit vectors can have negative components. A negative sign sets the direction along an axis, not the length. The vector <-0.6, 0.8> is a valid unit vector because 0.36 + 0.64 = 1. The length stays positive even when components turn negative.
Dividing by the wrong magnitude is the most common error and gives a result whose length is not 1. It usually comes from forgetting to square a component, dropping the square root, or mixing 2D and 3D terms. Run the unit vector check after dividing: square the components and confirm the sum is 1.
Normalizing a vector separates direction from size, which matters whenever a calculation needs a pure direction. The 3 fields below rely on it most.
Physics and engineering use unit vectors to state the direction of a force, velocity, or field while keeping the magnitude separate. A force of 20 newtons (N) along a ramp splits into a unit vector for direction and a scalar for strength. The same split appears before stress analysis, during aerodynamic lift calculations, and for magnetic field lines. The matrix norm even uses unit vectors to measure how much a linear transformation stretches an input.
Game development and 3D graphics normalize vectors to move characters at a steady speed, compute lighting, and store surface normals. A movement vector divided by its magnitude keeps speed constant in every direction. Unit normals drive shading in game engine physics, and quaternion rotations rely on normalized vectors to avoid drift.
Robotics, GPS, and machine learning normalize vectors to compare direction without size bias. Robotics uses unit vectors for robotic joint angles and end-effector aiming. GPS works with geodetic coordinates and direction vectors for heading. Machine learning normalizes feature vectors for neural network gradients and in spectral clustering, where only the angle between vectors should count.
Unit vectors share 6 defining properties, listed below.
| # | Property |
|---|---|
| 1 | The magnitude equals 1 for every unit vector. |
| 2 | The squares of the components sum to 1. |
| 3 | Each component lies between -1 and 1. |
| 4 | The components equal the direction cosines of the vector. |
| 5 | The dot product of a unit vector with itself equals 1. |
| 6 | Dividing any nonzero vector by its magnitude returns a unit vector. |
Divide the vector by its magnitude. Compute |v| = sqrt(x^2 + y^2 + z^2), then divide each component by that number. For <2, 3>, the magnitude is sqrt(13) ≈ 3.6056, so the unit vector is <0.5547, 0.8321>.
Yes, the unit vector calculator is free. It runs in your browser with no sign-up, no download, and no usage limit.
Yes. Set the dimension to 2D for a vector <x, y> or 3D for a vector <x, y, z>. The calculator normalizes both and draws the matching diagram.
No. The zero vector has a magnitude of 0 and no direction, so dividing by zero is undefined. Every nonzero vector has a unit vector.
A unit vector has length 1 and points in a chosen direction. A normal vector points perpendicular to a surface or curve. A unit normal vector is both, perpendicular and scaled to length 1.
A basis vector is one of the axis directions i, j, and k. A unit vector can point any way, while a basis vector points along a coordinate axis.
Yes. A unit vector can have negative components as long as the squares of all components sum to 1. For example, <-0.6, 0.8> is a valid unit vector.
Yes. The calculator prints the magnitude calculation, the division of each component, and the length check, and all 3 steps recompute live as you change the input.
Enter a 2D or 3D vector and watch the unit vector, magnitude, and direction angles update live. For more worked guides on vectors and geometry, visit our blog.
Open the calculator