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}. \]
../_images/3_magnitude.svg

Vector magnitude is also known as the Euclidean norm.

Example 3.2

Calculate the magnitudes of the following vectors

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

Solution
\[ \|\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
\[ \|\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
\[\|\vec{w}\| = \sqrt{1^2 + 0^2 + 1^2} = \sqrt{1+0+1} = \sqrt{2}\]

Theorem 3.2 (Properties of vector magnitude)

  • The magnitude of a vector \(\vec{v}\) is always non-negative.

\[\| \vec{v} \| \geq 0\]
  • The magnitude of a vector \(\vec{v}\) is zero if and only if the vector is the zero vector.

\[\|\vec{v}\| = 0 \Leftrightarrow \vec{v} = \vec{0}.\]
  • If a vector \(\vec{v}\) is multiplied by a scalar \(k\) then the magnitude of the resulting vector is the absolute value of \(k\) multiplied by the magnitude of \(\vec{v}\).

\[\|k\vec{v}\| = |k| \| \vec{v} \|\]
  • For any two vectors \(\vec{u}\) and \(\vec{v}\) the magnitude of their sum is less than or equal to the sum of their magnitudes.

\[\| \vec{u} + \vec{v} \| \leq \|\vec{u}\| + \| \vec{v} \|\]

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.3 (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
\[\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
\[\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}\)

Solution
\[\begin{split} \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} \end{split}\]

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

\[\begin{split} \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*} \end{split}\]