Mathematics/Lessons/Vectors/Magnitude & Direction
Pure · Vectors · Year 1

Magnitude & Direction

A vector's length is Pythagoras on its components; its direction is an angle from tan⁻¹. Divide by the length to get a unit vector — pure direction, length one.

9 min read 3 worked examples

The magnitude of a vector

The magnitude of a vector is its length — written $|\mathbf{a}|$ (or $|\overrightarrow{AB}|$ for a vector between points). Since the components of a 2D vector form the two legs of a right-angled triangle, the length is just the hypotenuse, found by Pythagoras:

$\left|\begin{pmatrix} x \\ y \end{pmatrix}\right| = \sqrt{x^2 + y^2}.$

For example, $\left|\begin{pmatrix} 3 \\ 4 \end{pmatrix}\right| = \sqrt{3^2 + 4^2} = \sqrt{25} = 5$. The magnitude is always positive (or zero for the zero vector) — it's a length, so it can't be negative.

A vector drawn from the origin to a point, with its horizontal component x and vertical component y shown as the two legs of a right-angled triangle. The vector itself is the hypotenuse, labelled with its magnitude. The angle theta between the vector and the horizontal is marked.
A vector's components x and y are the legs of a right-angled triangle; the vector is the hypotenuse, so |a| = √(x² + y²). The direction angle θ comes from tan θ = y/x.
Why it's just Pythagoras

A vector $\begin{pmatrix} x \\ y \end{pmatrix}$ is "$x$ across and $y$ up". Draw that as a right-angled triangle: the horizontal leg is $x$, the vertical leg is $y$, and the vector itself is the hypotenuse connecting start to end. Pythagoras gives its length directly as $\sqrt{x^2+y^2}$. This is the same right-triangle idea behind the distance formula in coordinate geometry — vectors and coordinates are two views of the same picture.

Unit vectors

A unit vector is a vector of magnitude exactly $1$. It captures pure direction with a standard length. To find the unit vector in the direction of $\mathbf{a}$, divide $\mathbf{a}$ by its own magnitude:

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

The "hat" symbol $\hat{\mathbf{a}}$ denotes a unit vector. Dividing by the length rescales the vector to length $1$ without changing its direction — because dividing by a positive scalar keeps the line of direction.

Finding the direction angle

The direction of a 2D vector is the angle it makes with a reference direction (usually the positive $x$-axis, or measured as a bearing). From the right-angled triangle, the angle $\theta$ from the horizontal satisfies

$\tan\theta = \dfrac{y}{x}, \qquad \theta = \tan^{-1}\!\left(\dfrac{y}{x}\right).$

Always sketch the vector first to see which quadrant it's in — the calculator's $\tan^{-1}$ only returns angles between $-90°$ and $90°$, so you often need to adjust for vectors pointing left or down.

Strategy — magnitude, then direction

For "find the magnitude and direction" questions: (1) magnitude is $\sqrt{x^2+y^2}$, done straight from components. (2) For direction, sketch the vector to fix the quadrant, compute the acute angle from $\tan^{-1}\!\left|\tfrac{y}{x}\right|$, then adjust to the correct angle or bearing based on the sketch. The sketch is what stops quadrant errors.

Worked example 1

Magnitude of a vector
Find the magnitude of $\mathbf{a} = \begin{pmatrix} 5 \\ -12 \end{pmatrix}$, giving an exact value.
MethodApply Pythagoras to the components
1
$|\mathbf{a}| = \sqrt{5^2 + (-12)^2}$.
Square each component.
2
$= \sqrt{25 + 144} = \sqrt{169}$.
The negative squares to positive.
3
$= 13$.
Exact value.
▪ solved
Examiner's eye

The sign of a component vanishes when you square it — $(-12)^2 = 144$, positive — which is why magnitude is always positive. Leave surds exact unless told otherwise: $\sqrt{169}$ happens to be the whole number $13$, but many magnitudes stay as e.g. $\sqrt{20} = 2\sqrt5$.

Worked example 2

Find a unit vector
Find the unit vector in the direction of $\mathbf{b} = \begin{pmatrix} 6 \\ 8 \end{pmatrix}$.
MethodDivide the vector by its magnitude
1
Magnitude: $|\mathbf{b}| = \sqrt{6^2 + 8^2} = \sqrt{36 + 64} = \sqrt{100} = 10$.
Pythagoras first.
2
Unit vector: $\hat{\mathbf{b}} = \dfrac{1}{10}\begin{pmatrix} 6 \\ 8 \end{pmatrix} = \begin{pmatrix} 0.6 \\ 0.8 \end{pmatrix}$.
Divide each component by 10.
3
Check: $\sqrt{0.6^2 + 0.8^2} = \sqrt{0.36 + 0.64} = \sqrt{1} = 1$ ✓.
Confirm it has length 1.
▪ solved
The key insight

A unit vector always has magnitude $1$ — so verifying $\sqrt{0.6^2 + 0.8^2} = 1$ is a built-in check on your answer. Dividing by $|\mathbf{b}|$ scales the length down to exactly $1$ while every component keeps its proportion, preserving the direction. Unit vectors are how you strip a vector down to pure direction.

Worked example 3

Magnitude and direction together
The vector $\mathbf{v} = \begin{pmatrix} 4 \\ 3 \end{pmatrix}$. Find its magnitude and the angle it makes with the positive $x$-axis, to 1 decimal place.
MethodMagnitude by Pythagoras, angle by tan⁻¹
1
Magnitude: $|\mathbf{v}| = \sqrt{4^2 + 3^2} = \sqrt{25} = 5$.
Pythagoras.
2
Both components positive, so the vector points into the first quadrant (up and to the right).
Sketch fixes the quadrant.
3
Angle: $\theta = \tan^{-1}\!\left(\dfrac{3}{4}\right) = \tan^{-1}(0.75)$.
tan θ = y/x.
4
$\theta \approx 36.9°$ above the positive $x$-axis.
To 1 d.p.
▪ solved
Look deeper — why the quadrant matters

Here both components were positive, so $\tan^{-1}(0.75) \approx 36.9°$ is the answer directly. But if $\mathbf{v}$ had been $\begin{pmatrix} -4 \\ 3 \end{pmatrix}$ (second quadrant), the calculator would still give $-36.9°$ — and you'd need to add $180°$ to land in the correct quadrant, giving $143.1°$. Always sketch: $\tan^{-1}$ can't tell which of two opposite directions you meant, but a quick diagram can.

Common mistake

Magnitude is never negative — if you get a negative answer you've slipped a sign, probably forgetting that squaring removes it. And don't trust $\tan^{-1}$ blindly for direction: it only returns angles in $(-90°, 90°)$, so vectors pointing left or straight down need adjusting by $\pm180°$ after a sketch. Compute magnitude from components, but always draw to get direction right.

Check yourself

Find the magnitude of $\mathbf{c} = \begin{pmatrix} -7 \\ 24 \end{pmatrix}$, and hence the unit vector in the direction of $\mathbf{c}$.
(Hint: find $|\mathbf{c}|$ first, then divide each component by it.)

Method
1
$|\mathbf{c}| = \sqrt{(-7)^2 + 24^2} = \sqrt{49 + 576} = \sqrt{625} = 25$.
Pythagoras.
2
Unit vector: $\hat{\mathbf{c}} = \dfrac{1}{25}\begin{pmatrix} -7 \\ 24 \end{pmatrix} = \begin{pmatrix} -\tfrac{7}{25} \\ \tfrac{24}{25} \end{pmatrix}$.
Divide by the magnitude.
3
Check: $\sqrt{\left(\tfrac{7}{25}\right)^2 + \left(\tfrac{24}{25}\right)^2} = \sqrt{\tfrac{49 + 576}{625}} = \sqrt{1} = 1$ ✓.
Length 1 confirmed.
▪ solved

The magnitude $25$ came from recognising the $7$–$24$–$25$ Pythagorean triple. Dividing by it gives a unit vector, and the length check confirms it.