Module 1: Magnitude of a Vector

The last useful computation included in this module is magnitude. The magnitude (or length or norm) of a vector LaTeX: \vec{v} \in \mathbb{R} ^nvRn is

LaTeX:  \|\vec{v} \| = \left\| \begin{pmatrix} v_1 \\ v_2 \\ 
  \vdots \\ v_n \end{pmatrix} \right\|:= \left( \sum_{i=1}^n v_i^2 \right)^{\frac{1}{2}}.v=(v1v2vn):=(ni=1v2i)12.

For example: 

LaTeX:   \left\| \begin{pmatrix} 3 \\ 4 \end{pmatrix} \right\| = \left( 3^2 + 4^2 \right)^{\frac{1}{2}} = \sqrt{25} = 5.(34)=(32+42)12=25=5.

The magnitude computation is important because it allows us to define the distance between two vectors: Let LaTeX: \vec{u}u and LaTeX: \vec{v}v be vectors. Then the distance between them is given by

LaTeX: \|\vec{u} - \vec{v} \|.uv.

Using this computation we can argue that the smaller the value of LaTeX: \|\vec{u} - \vec{v} \|uv then the "closer'' the vectors LaTeX: \vec{u}u and LaTeX: \vec{v}v are to each other (or alternatively, how well the vector LaTeX: \vec{u}u approximates LaTeX: \vec{v}v). For example, let's find a vector of the form

LaTeX:  \begin{pmatrix}
  1 \\ t \\ 2
  \end{pmatrix}(1t2)

which is as close as possible to

LaTeX:  \begin{pmatrix}
  0 \\ 1 \\ 1
  \end{pmatrix}.(011).

We compute

LaTeX: \left\| \begin{pmatrix}  1 \\ t \\ 2
  \end{pmatrix}
  -
   \begin{pmatrix}
  0 \\ 1 \\ 1
  \end{pmatrix} \right\| = \left\| \begin{pmatrix}
  1 \\ t-1 \\ 1
  \end{pmatrix} \right\|
  =
  \left( (t-1)^2 + 1+1 \right)^{\frac{1}{2}}.(1t2)(011)=(1t11)=((t1)2+1+1)12.

This is them minimized when LaTeX: t=1t=1.