Pure · Vectors · Year 2

Unit Vectors

Strip a vector down to pure direction — divide by its own magnitude, and length one is all that's left.

10 min read 5 worked examples

What a unit vector is

A unit vector is any vector with magnitude exactly $1$. Unit vectors carry pure directional information — no sense of length or scale, only "which way." The vectors $\mathbf{i}$, $\mathbf{j}$ and $\mathbf{k}$ are themselves unit vectors, each of magnitude $1$ along its own axis; but a unit vector can point in any direction, not just along an axis.

Given any non-zero vector $\mathbf{a}$, the unit vector in the same direction as $\mathbf{a}$, written $\hat{\mathbf{a}}$, is found by dividing $\mathbf{a}$ by its own magnitude:

$\hat{\mathbf{a}} = \dfrac{\mathbf{a}}{|\mathbf{a}|}$

This works identically in 2D and 3D — the formula never refers to the number of components, only to the magnitude, so it applies unchanged regardless of dimension.

Proofâ really does have magnitude 1
1
Dividing a vector by a positive scalar $k$ scales its magnitude by the same factor: $|k\mathbf{a}| = k|\mathbf{a}|$ for $k>0$.
Scalar multiplication scales every component, and hence the magnitude, by |k|.
2
Here $\hat{\mathbf{a}} = \dfrac{1}{|\mathbf{a}|}\,\mathbf{a}$, a scalar multiple of $\mathbf{a}$ with $k=\dfrac{1}{|\mathbf{a}|}>0$.
Since |a| is a positive number (a is non-zero), 1/|a| is a valid positive scalar.
3
$|\hat{\mathbf{a}}| = \dfrac{1}{|\mathbf{a}|}\times|\mathbf{a}| = 1$.
Apply the scaling rule from step 1 with k = 1/|a|.
4
Since $k>0$, $\hat{\mathbf{a}}$ points in exactly the same direction as $\mathbf{a}$ — only its length has changed.
A positive scalar multiple never reverses direction.
▪ proven
The zero vector is the one exception

The formula $\hat{\mathbf{a}}=\mathbf{a}/|\mathbf{a}|$ breaks down for the zero vector, since $|\mathbf{0}|=0$ and division by zero is undefined. The zero vector has no direction to speak of, so it simply has no associated unit vector.

Worked example 1

Finding a unit vector in 2D
Find the unit vector in the direction of $\mathbf{a} = 5\mathbf{i}-12\mathbf{j}$.
MethodFind the magnitude, then divide every component by it
1
$|\mathbf{a}| = \sqrt{5^2+(-12)^2} = \sqrt{25+144} = \sqrt{169} = 13$.
Compute the magnitude first, using the 2D magnitude formula.
2
$\hat{\mathbf{a}} = \dfrac{1}{13}(5\mathbf{i}-12\mathbf{j}) = \dfrac{5}{13}\mathbf{i}-\dfrac{12}{13}\mathbf{j}$.
Divide every component by the magnitude.
3
Check: $|\hat{\mathbf{a}}|^2 = \left(\dfrac{5}{13}\right)^2+\left(\dfrac{12}{13}\right)^2 = \dfrac{25+144}{169} = \dfrac{169}{169}=1$.
Confirms the result is genuinely a unit vector.
▪ solved

Worked example 2

Finding a unit vector in 3D
Find the unit vector in the direction of $\mathbf{b} = 2\mathbf{i}-2\mathbf{j}+\mathbf{k}$.
MethodThe same process, now with a third component to carry through
1
$|\mathbf{b}| = \sqrt{2^2+(-2)^2+1^2} = \sqrt{4+4+1} = \sqrt{9} = 3$.
Compute the magnitude using the 3D formula — one extra term under the root, nothing else changes.
2
$\hat{\mathbf{b}} = \dfrac{1}{3}(2\mathbf{i}-2\mathbf{j}+\mathbf{k}) = \dfrac{2}{3}\mathbf{i}-\dfrac{2}{3}\mathbf{j}+\dfrac{1}{3}\mathbf{k}$.
Divide every component — all three of them — by the magnitude.
▪ solved

Worked example 3

A vector of given magnitude in a given direction
Find the vector of magnitude $20$ that has the same direction as $\mathbf{d} = 3\mathbf{i}-4\mathbf{j}$.
MethodFind the unit vector first, then scale it up to the required length
1
$|\mathbf{d}| = \sqrt{3^2+(-4)^2} = \sqrt{9+16} = \sqrt{25} = 5$.
Find the magnitude of d, exactly as before.
2
$\hat{\mathbf{d}} = \dfrac{1}{5}(3\mathbf{i}-4\mathbf{j}) = \dfrac{3}{5}\mathbf{i}-\dfrac{4}{5}\mathbf{j}$.
Reduce to the unit vector — pure direction, magnitude 1.
3
The required vector is $20\hat{\mathbf{d}} = 20\left(\dfrac{3}{5}\mathbf{i}-\dfrac{4}{5}\mathbf{j}\right) = 12\mathbf{i}-16\mathbf{j}$.
Scaling a unit vector by any positive number k gives a vector of magnitude exactly k, in the same direction.
4
Check: $|12\mathbf{i}-16\mathbf{j}| = \sqrt{144+256} = \sqrt{400} = 20$. ✓
Confirms the scaled vector really does have magnitude 20.
▪ solved
The general pattern

To find the vector of any magnitude $m$ in the direction of $\mathbf{a}$, compute $m\hat{\mathbf{a}} = m\left(\dfrac{\mathbf{a}}{|\mathbf{a}|}\right)$ — find the unit vector first, then scale. This single two-step process (unit vector, then scale) solves every "vector of magnitude ... in the direction of ..." question, in 2D or 3D alike.

Worked example 4

Finding an unknown component of a unit vector · Challenge
Given that $\mathbf{u} = \dfrac{1}{7}(3\mathbf{i}+p\mathbf{j}+6\mathbf{k})$ is a unit vector, where $p>0$, find the exact value of $p$.
MethodUse the defining property |u| = 1 to form an equation in p
1
Since $\mathbf{u}$ is a unit vector, $|\mathbf{u}|=1$, so $|\mathbf{u}|^2=1$.
Squaring avoids working with a square root directly.
2
$|\mathbf{u}|^2 = \dfrac{1}{49}(3^2+p^2+6^2) = \dfrac{9+p^2+36}{49} = \dfrac{45+p^2}{49}$.
Apply the magnitude formula to the full vector, including the 1/7 scale factor squared.
3
$\dfrac{45+p^2}{49} = 1 \Rightarrow 45+p^2 = 49 \Rightarrow p^2 = 4$.
Set the expression equal to 1 and rearrange.
4
$p = 2$ (taking the positive root, since $p>0$).
The negative root p = −2 is rejected by the given condition.
▪ solved
Look deeper — a different kind of equation

Unlike a "find t given the magnitude" question with an arbitrary target magnitude, a unit-vector condition always sets the sum of squares of the components (before dividing) equal to the square of whatever overall scale factor sits outside the bracket — here $7^2=49$. Spotting this shortcut saves re-deriving the magnitude formula from scratch each time.

The angle a vector makes with each axis

Every non-zero 3D vector makes some angle with each of the three coordinate axes — call these the vector's direction angles, $\alpha$ (to the x-axis), $\beta$ (to the y-axis) and $\gamma$ (to the z-axis). Since $\mathbf{i}$, $\mathbf{j}$, $\mathbf{k}$ are themselves unit vectors along those axes, the angle between $\mathbf{a}$ and, say, the x-axis can be found from the dot product $\mathbf{a}\cdot\mathbf{i} = |\mathbf{a}||\mathbf{i}|\cos\alpha = |\mathbf{a}|\cos\alpha$ — but $\mathbf{a}\cdot\mathbf{i}$ is simply $\mathbf{a}$'s x-component, since the dot product with $\mathbf{i}$ just picks that component out. This gives a clean formula for each angle, straight from the components of $\mathbf{a}=x\mathbf{i}+y\mathbf{j}+z\mathbf{k}$:

$\cos\alpha = \dfrac{x}{|\mathbf{a}|}, \qquad \cos\beta = \dfrac{y}{|\mathbf{a}|}, \qquad \cos\gamma = \dfrac{z}{|\mathbf{a}|}$
A vector a drawn from the origin O on a set of x, y, z axes, with small labelled arcs alpha, beta and gamma marking the angle it makes with each of the three axes.
The direction angles α, β, γ that a vector $\mathbf{a}$ makes with the x-, y- and z-axes respectively.

Worked example 5

Finding the angle to each axis
(a) Find, to 1 decimal place, the angles that $\mathbf{a}=\mathbf{i}+2\mathbf{j}+2\mathbf{k}$ makes with each of the x, y and z axes. (b) The vector $\mathbf{b}=6\mathbf{i}-2\mathbf{j}-3\mathbf{k}$ makes an obtuse angle with one of the axes. Identify which axis, and find that angle to 1 decimal place.
MethodFind |a|, then apply cosα = x/|a| (and similarly for β, γ)
1
$|\mathbf{a}| = \sqrt{1^2+2^2+2^2} = \sqrt{9} = 3$.
Find the magnitude first — every direction angle depends on it.
2
$\cos\alpha=\dfrac13 \Rightarrow \alpha = 70.5°$; $\cos\beta=\dfrac23 \Rightarrow \beta=48.2°$; $\cos\gamma=\dfrac23 \Rightarrow \gamma=48.2°$.
Apply the three formulas directly, using each component in turn.
3
Check: $\cos^2\alpha+\cos^2\beta+\cos^2\gamma = \left(\tfrac13\right)^2+\left(\tfrac23\right)^2+\left(\tfrac23\right)^2 = \tfrac{1+4+4}{9}=1$. ✓
Confirms the three angles via the direction-cosine identity.
4
(b) $|\mathbf{b}| = \sqrt{6^2+(-2)^2+(-3)^2}=\sqrt{49}=7$. The y- and z-components are negative, so $\cos\beta=-\tfrac27$ and $\cos\gamma=-\tfrac37$ are both negative.
A negative component means a negative cosine for that axis's angle.
5
The most negative cosine gives the largest (most obtuse) angle: $\cos\gamma=-\tfrac37$ is more negative than $\cos\beta=-\tfrac27$, so the angle to the z-axis is the obtuse one, with $\gamma = \arccos\left(-\tfrac37\right) = 115.4°$.
arccos is a decreasing function, so the most negative cosine corresponds to the largest angle.
▪ solved
Why a negative component means an obtuse angle

Since $\cos(\text{angle})=(\text{component})/|\mathbf{a}|$ and $|\mathbf{a}|$ is always positive, the sign of $\cos\alpha,\cos\beta,\cos\gamma$ matches the sign of the corresponding component exactly. A negative cosine corresponds to an angle between $90°$ and $180°$ — so whenever a component is negative, the vector leans away from that axis's positive direction, and the angle to it is obtuse.

Common mistake

Dividing only the first component by the magnitude, and leaving the rest unchanged. Every single component — all two of them in 2D, all three in 3D — must be divided by $|\mathbf{a}|$; skipping components produces a vector that isn't parallel to the original one at all, let alone a unit vector.

Check yourself

Find the unit vector in the direction of $\mathbf{c}=6\mathbf{i}+2\mathbf{j}-3\mathbf{k}$, and hence find the vector of magnitude $35$ in the same direction as $\mathbf{c}$.
(Hint: find |c| first, divide to get ĉ, then scale ĉ by 35.)

Method
1
$|\mathbf{c}| = \sqrt{6^2+2^2+(-3)^2} = \sqrt{36+4+9} = \sqrt{49}=7$.
Compute the magnitude.
2
$\hat{\mathbf{c}} = \dfrac17(6\mathbf{i}+2\mathbf{j}-3\mathbf{k}) = \dfrac67\mathbf{i}+\dfrac27\mathbf{j}-\dfrac37\mathbf{k}$.
Divide each component by the magnitude.
3
$35\hat{\mathbf{c}} = 35\left(\dfrac67\mathbf{i}+\dfrac27\mathbf{j}-\dfrac37\mathbf{k}\right) = 30\mathbf{i}+10\mathbf{j}-15\mathbf{k}$.
Scale the unit vector by 35 to reach the required magnitude.
▪ solved