A unit vector is a vector that has magnitude 1 and points in the same direction as the original vector. The purpose of normalization
is to separate direction from size. If a vector tells you both how large something is and which way it points,
then the corresponding unit vector tells you only which way it points.
If
\(A = \langle A_x, A_y \rangle\)
in 2D or
\(A = \langle A_x, A_y, A_z \rangle\)
in 3D, then the normalized vector is written
\(\hat{u}\)
or sometimes
\(\hat{A}\).
The hat reminds us that this new vector has been scaled to length 1.
Definition of normalization
The basic normalization formula is
Unit-vector formula.
\[
\begin{aligned}
\hat{u} &= \frac{A}{|A|}
\end{aligned}
\]
This means: first compute the magnitude of the original vector, then divide every component by that magnitude. In 2D, the magnitude is
\[
\begin{aligned}
|A| &= \sqrt{A_x^2 + A_y^2}
\end{aligned}
\]
and in 3D it is
\[
\begin{aligned}
|A| &= \sqrt{A_x^2 + A_y^2 + A_z^2}
\end{aligned}
\]
Once the magnitude is known, the components of the unit vector follow immediately. For a 2D vector:
\[
\begin{aligned}
\hat{u} &= \left(\frac{A_x}{|A|},\ \frac{A_y}{|A|}\right)
\end{aligned}
\]
and for a 3D vector:
\[
\begin{aligned}
\hat{u} &= \left(\frac{A_x}{|A|},\ \frac{A_y}{|A|},\ \frac{A_z}{|A|}\right)
\end{aligned}
\]
Why the normalized vector has length 1
The normalization process divides all components by the same number, namely the magnitude of the original vector. That rescales the
vector without changing its direction. If you compute the magnitude of
\(\hat{u}\),
you get:
\[
\begin{aligned}
|\hat{u}| &= \sqrt{\left(\frac{A_x}{|A|}\right)^2 + \left(\frac{A_y}{|A|}\right)^2}
\end{aligned}
\]
in 2D, or the corresponding 3D version. Because the numerator becomes exactly the square of the original magnitude, the result reduces
to 1. This is why normalization is so useful: it preserves direction but standardizes the length.
Direction cosines
In 3D, the components of the unit vector are called the direction cosines. If
\(\alpha\),
\(\beta\),
and
\(\gamma\)
are the angles the vector makes with the positive x-, y-, and z-axes, then
\[
\begin{aligned}
\cos\alpha &= \frac{A_x}{|A|} \\
\cos\beta &= \frac{A_y}{|A|} \\
\cos\gamma &= \frac{A_z}{|A|}
\end{aligned}
\]
These are exactly the x-, y-, and z-components of the unit vector:
\[
\begin{aligned}
\hat{u} &= (\cos\alpha,\ \cos\beta,\ \cos\gamma)
\end{aligned}
\]
In 2D, the same idea still works with two axis angles. If a 2D vector makes an angle
\(\alpha\)
with the x-axis and
\(\beta\)
with the y-axis, then the two unit-vector components act as the corresponding direction cosines.
Direction angles
Once the direction cosines are known, the actual axis angles are found with inverse cosine:
\[
\begin{aligned}
\alpha &= \cos^{-1}\!\left(\frac{A_x}{|A|}\right) \\
\beta &= \cos^{-1}\!\left(\frac{A_y}{|A|}\right) \\
\gamma &= \cos^{-1}\!\left(\frac{A_z}{|A|}\right)
\end{aligned}
\]
These angles are useful when you want to describe a direction geometrically instead of by components. In mechanics, field theory,
graphics, and geometry, both representations are common.
Worked 2D example
Consider the sample vector
\(A = \langle 3,4 \rangle\).
Step 1. Compute the magnitude.
\[
\begin{aligned}
|A| &= \sqrt{3^2 + 4^2} \\
&= \sqrt{9 + 16} \\
&= \sqrt{25} \\
&= 5
\end{aligned}
\]
Step 2. Divide each component by the magnitude.
\[
\begin{aligned}
\hat{u} &= \left(\frac{3}{5},\ \frac{4}{5}\right) \\
&= (0.6,\ 0.8)
\end{aligned}
\]
So the vector
\(\langle 3,4 \rangle\)
and the vector
\((0.6,0.8)\)
point in the same direction, but the second one has length 1.
Worked 3D example
Let
\(A = \langle 1,1,1 \rangle\).
Step 1. Compute the magnitude.
\[
\begin{aligned}
|A| &= \sqrt{1^2 + 1^2 + 1^2} \\
&= \sqrt{3}
\end{aligned}
\]
Step 2. Normalize.
\[
\begin{aligned}
\hat{u} &= \left(\frac{1}{\sqrt{3}},\ \frac{1}{\sqrt{3}},\ \frac{1}{\sqrt{3}}\right)
\end{aligned}
\]
In this example, all three direction cosines are equal because the vector points equally toward the x-, y-, and z-directions.
Important warning: the zero vector
The zero vector cannot be normalized. If
\(A = \langle 0,0 \rangle\)
or
\(A = \langle 0,0,0 \rangle\),
then its magnitude is 0, and the normalization formula would require division by zero:
\[
\begin{aligned}
\hat{u} &= \frac{A}{|A|} = \frac{A}{0}
\end{aligned}
\]
Since division by zero is undefined, a zero vector has no unit vector associated with it. Geometrically, this makes sense because the
zero vector has no direction.
Why unit vectors matter
| Use |
Why normalization helps |
| Mechanics |
Separate force direction from force magnitude |
| Computer graphics |
Store directions for lighting, camera rays, and surface normals |
| Geometry |
Describe orientation independently of scale |
| Physics fields |
Express direction of electric, magnetic, or velocity vectors clearly |
Summary
| Concept |
Main formula |
Meaning |
| Magnitude in 2D |
\(|A| = \sqrt{A_x^2 + A_y^2}\) |
Original vector length |
| Magnitude in 3D |
\(|A| = \sqrt{A_x^2 + A_y^2 + A_z^2}\) |
Original vector length |
| Normalization |
\(\hat{u} = A/|A|\) |
Same direction, unit length |
| Direction cosines |
\((\cos\alpha,\cos\beta,\cos\gamma)\) |
Components of the 3D unit vector |
| Restriction |
\(|A| \neq 0\) |
The zero vector cannot be normalized |