Skip to main content
Logo image

Section 12.4 Examples

Subsection 12.4.1 The norm of a vector

Example 12.4.1. Basic computation examples.

Here are a few examples of computing the norm of a vector, in various dimensions.
  1. Consider \(\uvec{u} = (1,2)\) in \(\R^2\text{.}\) Then,
    \begin{equation*} \unorm{u} = \sqrt{1^2 + 2^2} = \sqrt{5} \text{.} \end{equation*}
  2. Consider \(\uvec{v} = (1,2,-1)\) in \(\R^3\text{.}\) Then,
    \begin{equation*} \unorm{v} = \sqrt{1^2 + 2^2 + (-1)^2} = \sqrt{6} \text{.} \end{equation*}
  3. Consider \(\uvec{w} = (1,2,-1,5)\) in \(\R^4\text{.}\) Then,
    \begin{equation*} \unorm{w} = \sqrt{1^2 + 2^2 + (-1)^2 + 5^2} = \sqrt{31} \text{.} \end{equation*}

Example 12.4.2. Norms of the standard basis vectors.

The standard basis vectors in \(\R^n\) are always unit vectors:
\begin{align*} \norm{\uvec{e}_1} \amp= \sqrt{1^2 + 0^2 + \dotsb + 0^2} = \sqrt{1} = 1,\\ \norm{\uvec{e}_2} \amp= \sqrt{0^2 + 1^2 + 0^2 + \dotsb + 0^2} = \sqrt{1} = 1,\\ \amp\vdots\\ \norm{\uvec{e}_n} \amp= \sqrt{0^2 + \dotsb + 0^2 + 1^2} = \sqrt{1} = 1. \end{align*}

Example 12.4.3. Normalizing vectors.

We can scale any nonzero vector to a unit vector by dividing by its norm, and this normalized version of the vector will always be parallel to the original.
Let’s carry this out for the vectors from Example 12.4.1 above.
  1. We computed the norm of \(\uvec{u} = (1,2)\) to be \(\unorm{u} = \sqrt{5}\text{.}\) Therefore, the scaled vector
    \begin{equation*} \uvec{u}' = \frac{1}{\sqrt{5}} \uvec{u} = \left( \frac{1}{\sqrt{5}}, \frac{2}{\sqrt{5}} \right) \end{equation*}
    is a unit vector (i.e. \(\norm{\uvec{u}'} = 1\)).
  2. We computed the norm of \(\uvec{v} = (1,2,-1)\) to be \(\unorm{v} = \sqrt{6}\text{.}\) Therefore, the scaled vector
    \begin{equation*} \frac{1}{\sqrt{6}} \uvec{v} = \left( \frac{1}{\sqrt{6}}, \frac{2}{\sqrt{6}}, -\frac{1}{\sqrt{6}} \right) \end{equation*}
    is a unit vector.
  3. We computed the norm of \(\uvec{w} = (1,2,-1,5)\) to be \(\unorm{w} = \sqrt{31}\text{.}\) Therefore, the scaled vector
    \begin{equation*} \frac{1}{\sqrt{31}} \uvec{v} = \left( \frac{1}{\sqrt{31}}, \frac{2}{\sqrt{31}}, -\frac{1}{\sqrt{31}}, \frac{5}{\sqrt{31}}, \right) \end{equation*}
    is a unit vector.

Subsection 12.4.2 Dot product and the angle between vectors

Here is an example of using the dot product to determine the angle between vectors.

Example 12.4.4. Computing angle from dot product.

What is the angle between vectors \(\uvec{u} = (1,2)\) and \(\uvec{v} = (-1,3)\) in \(\R^2\text{?}\)
From Discovery 12.7, we know that the angle \(\theta\) between \(\uvec{u}\) and \(\uvec{v}\) satisfies
\begin{equation*} \cos\theta = \frac{\udotprod{u}{v}}{\unorm{u}\unorm{v}} \text{.} \end{equation*}
So compute
\begin{align*} \udotprod{u}{v} \amp= 1 \cdot (-1) + 2 \cdot 3 = 5, \amp \unorm{u} \amp= \sqrt{1^2 + 2^2} = \sqrt{5}, \amp \unorm{v} \amp= \sqrt{(-1)^2 + 3^2} = \sqrt{10}. \end{align*}
Therefore,
\begin{equation*} \cos \theta = \frac{5}{\sqrt{5}\sqrt{10}} = \frac{1}{\sqrt{2}} \text{.} \end{equation*}
The only angle in the domain \(0 \le \theta \le \pi\) with this cosine value is \(\theta = \pi/4\text{.}\)