<aside> <img src="/icons/reorder_gray.svg" alt="/icons/reorder_gray.svg" width="40px" />
Table of Contents
</aside>

A unit vector is a vector with magnitude(length) of exactly $1$. It represents only the direction of the original vector without scaling.
<aside> <img src="/icons/warning_yellow.svg" alt="/icons/warning_yellow.svg" width="40px" />
Unit Vector vs Direction Vector
A direction vector can have any magnitude and indicates a specific direction.
To convert a direction vector to a unit vector, you divide it by its magnitude.
| Aspect | Direction Vector | Unit Vector |
|---|---|---|
| Definition | Represents the direction of a line. | Represents pure direction without length. |
| Magnitude | Can have any non-zero magnitude | Always exactly 1 |
| Example | $v=(3,4)$ | $v=(\frac{3}{5},\frac{4}{5})$ |
https://www.quora.com/What-is-the-difference-between-the-unit-vector-and-the-direction-vector
</aside>
When we make a vector unit length, we say $normalize$.
To normalize $v=(x,y,z)$ into a unit vector $v̂$, divide each component by the magnitude of the vector.
$$ \hat{v}=\frac{v}{||v||} $$
Here is a vector $v=(1,2,3)$. Let’s normalize into a unit vector.
$$ ||v|| = \sqrt{1^2 + 2^2 + 3^2} = \sqrt{14} $$
$$ \hat{v} = \frac{v}{||v||} = \left(\frac{1}{\sqrt{14}}, \frac{2}{\sqrt{14}}, \frac{3}{\sqrt{14}}\right) $$
Verify
Let's verify that normalized vector is indeed a unit vector by calculating its magnitude.
$$ ||\hat{v}|| = \sqrt{\left(\frac{1}{\sqrt{14}}\right)^2 + \left(\frac{2}{\sqrt{14}}\right)^2 + \left(\frac{3}{\sqrt{14}}\right)^2} $$
$$ = \sqrt{\frac{1}{14} + \frac{4}{14} + \frac{9}{14}} $$
$$ = \sqrt{\frac{14}{14}} = \sqrt{1} = 1 $$