# Unit Vector Calculator

Enter the X,Y, and Z coordinates of your vector to calculate the equivalent unit vector as a ratio of the magnitude of that vector. This calculator also calculates the magnitude of the original vector, and the angle of the vector.

## What is the unit vector?

A unit vector is the equivalent vector of your original vector that has a magnitude of 1. In other words, it has the same direction as your original vector but the total magnitude is equal to one. Since the unit vector is the originally vector divided by magnitude, this means that it can be described as the directional vector. Therefore, if you have the direction vector and the magnitude, you can calculate the actual vector.

## Unit Vector Formula

The formula for the unit vector is as follows:

u = U / |U|

Where u is the unit vector, U is the original vector, and |U| is the magnitude of the original vector. To calculate the magnitude you must use the following formula.

|U| = Sqaure Root ( X^2 + Y^2+Z^2)

Keep in mind that these vectors always originate at the origin. Otherwise the formula becomes a little more complicated.

You can also use our distance calculator to determine the magnitude, since distance is another word for magnitude in coordinate systems.

## How to calculate a unit vector

We will now take a look at en example of how you can calculate a unit vector from a normal vector. Let’s take a vector u = (5,-4,2).

1. First, you must calculate the magnitude of the vector. This is done through the following formula. |u| = √(x₁² + y₁² + z₁²)
2. Plug in the values into the formula above, and you should get 6.708.
3. Next, you need to divide each unit vector point by the magnitude. This is because the unit vector has a magnitude of 1. Dividing the original vector by it’s magnitude achieves that rule.
4. This should yield X = .706, Y= – .596, Z = .298
5. Check the result with the calculator above.

Now you know how to calculate a unit vector, but what happens if the vector is given as two points and neither are position at the origin? If this is the case, the steps for solving the unit vector are a little different. Let’s take a vector with points (7,8,9) and (2,5,1)

1. First, you must understand that a vector, as mentioned earlier, describes a direction and magnitude. Since both these values are independent of position, you can manipulate a vector to re-position it at the origin
2. Now that you know this, you can place the vector at the origin simply by subtracting one vector from the other. In this case (7,8,9) – (2,5,1) = (5,3,8). You just subtract each coordinate point from the other.
3. Now that you have the vector placed at the origin, complete steps 1-5 from above and you have your unit vector!