3.5. Vector magnitude#

The magnitude of a vector \(\vec{a}\) is the distance between the head and tail of \(\vec{a}\) which we can calculate using an extension of Pythagoras’ theorem.

Definition 3.4 (Vector magnitude)

The magnitude of a vector \(\vec{a} = (a_1, a_2, \ldots, a_n)^\mathsf{T}\) denoted by \(|\vec{a}|\) is calculated using

(3.1)#\[ |\vec{a}| = \sqrt{\sum_{i=1}^n a_i^2} = \sqrt{a_1^2 + a_2^2 + \cdots + a_n^2}. \]

Vector magnitude is also known as the Euclidean norm. Note that \(|\vec{a}|=0\) if and only if \(\vec{a}=(0, 0, \ldots, 0)^\mathsf{T}\).

Example 3.2

Calculate the magnitudes of the following vectors

(i)   \(\vec{u} = \begin{pmatrix} 1 \\ 2 \\ 3 \end{pmatrix}\);

Solution (click to show)
\[ |\vec{u}| = \sqrt{1^2 + 2^2 + 3^2} = \sqrt{1+4+9} = \sqrt{14} \]

(ii)   \(\vec{v} = \begin{pmatrix} 5 \\ -12 \\ 0 \end{pmatrix}\);

Solution (click to show)
\[ |\vec{v}| = \sqrt{5^2 + (-12)^2 + 0^2} = \sqrt{25+144+0} = \sqrt{169} = 13\]

(iii)   \(\vec{w} = \begin{pmatrix} 1 \\ 0 \\ 1 \end{pmatrix}\).

Solution (click to show)
\[|\vec{w}| = \sqrt{1^2 + 0^2 + 1^2} = \sqrt{1+0+1} = \sqrt{2}\]

3.5.1. Unit vectors#

For every non-zero vector \(\vec{a}\) there exist a unique unit vector which is a vector in the same direction as \(\vec{a}\) and whose magnitude is 1.

Definition 3.5 (Unit vectors)

A unit vector is a vector with a magnitude of 1.

Theorem 3.2 (Normalising a vector)

Any non-zero vector can be scaled to transform it into a unit vector by dividing all its coordinates by its magnitude

(3.2)#\[ \hat{\vec{a}} = \frac{\vec{a}}{|\vec{a}|}. \]

This process is called normalising a vector. Unit vectors are denoted with a caret above the vector name, i.e., \(\hat{\vec{a}}\) which is read as ‘a hat’.

Proof. Let \(\vec{a}\) be a non-zero vector

\[\begin{split} \begin{align*} \left|\frac{1}{|\vec{a}|}\vec{a}\right| &= \left|\frac{1}{|\vec{a}|}\right| |\vec{a}| \\ &= \frac{1}{|\vec{a}|} |\vec{a}| \qquad \text{(since $|\vec{a}|>0$)}\\ &= 1. \end{align*} \end{split}\]

Example 3.3

Find the unit vector parallel to the following:

(i)   \(\vec{u} = \begin{pmatrix} 1 \\ 2 \\ 3 \end{pmatrix}\);

Solution (click to show)
\[\begin{split} \hat{\vec{u}} = \dfrac{\vec{u}}{|\vec{u}|} = \dfrac{1}{\sqrt{14}} \begin{pmatrix} 1 \\ 2 \\ 3 \end{pmatrix} = \begin{pmatrix} \frac{\sqrt{14}}{14} \\ \frac{\sqrt{14}}{7} \\ \frac{3\sqrt{14}}{14} \end{pmatrix} \end{split}\]

Check magnitude of \(\hat{\vec{u}}\)

\[\begin{split} \begin{align*} |\hat{\vec{u}}| &= \sqrt{ \left( \frac{\sqrt{14}}{14} \right)^2 + \left( \frac{\sqrt{14}}{7} \right)^2 + \left(\frac{3\sqrt{14}}{14} \right)^2} \\ &= \sqrt{ \frac{14}{196} +\frac{14}{49} + \frac{126}{196}} = \sqrt{1} = 1 \qquad \checkmark \end{align*} \end{split}\]

(ii)   \(\vec{v} = \begin{pmatrix} 5 \\ -12 \\ 0 \end{pmatrix}\).

Solution (click to show)
\[\begin{split} \hat{\vec{v}} = \dfrac{\vec{v}}{|\vec{v}|} = \dfrac{1}{13} \begin{pmatrix} 5 \\ -12 \\ 0 \end{pmatrix} = \begin{pmatrix} \frac{5}{13} \\ -\frac{12}{13} \\ 0 \end{pmatrix} \end{split}\]

Check magnitude of \(\hat{\vec{v}}\)

\[\begin{split} \begin{align*} |\hat{\vec{v}}| &= \sqrt{ \left(\frac{5}{13} \right)^2 + \left( -\frac{12}{13} \right)^2 + 0^2} \\ &= \sqrt{ \frac{25}{169} + \frac{144}{169} + 0} = \sqrt{1} = 1 \qquad \checkmark \end{align*} \end{split}\]

(iii)   $\vec{w} = \begin{pmatrix} 1 \\ 0 \\ 1 \end{pmatrix}$.

````{dropdown} Solution (click to show)
$$ \hat{\vec{w}} = \dfrac{\vec{w}}{|\vec{w}|} = \dfrac{1}{\sqrt{2}} \begin{pmatrix} 1 \\ 0 \\ 1 \end{pmatrix} = \begin{pmatrix} \frac{\sqrt{2}}{2} \\ 0 \\ \frac{\sqrt{2}}{2} \end{pmatrix} $$

Check magnitude of $\hat{\vec{w}}$

$$ \begin{align*}
    |\hat{\vec{w}}| &= \sqrt{ \left( \frac{\sqrt{2}}{2} \right)^2 + 0^2 + \left( \frac{\sqrt{2}}{2} \right)^2 } \\
    &= \sqrt{ \frac{2}{4} + 0 + \frac{2}{4} } = \sqrt{1} = 1 \qquad \checkmark
\end{align*} $$