# Elementary Vector Analysis

Page
Elementary Vector Analysis – HMC Calculus Tutorial

$\newcommand{\vecb}[1]{{\bf #1}} \newcommand{\ihat}{\hat{\vecb{i}}} \newcommand{\jhat}{\hat{\vecb{j}}} \newcommand{\khat}{\hat{\vecb{k}}}$ In order to measure many physical quantities, such as force or velocity, we need to determine both a magnitude and a direction. Such quantities are conveniently represented as vectors.

The direction of a vector $\vecb{v}$ in 3-space is specified by its components in the $x$, $y$, and $z$ directions, respectively: $$(x,y,z) \quad {\small\textrm{or}} \quad x\ihat + y\jhat + z\khat,$$

where $\ihat$, $\jhat$, and $\khat$ are the coordinate vectors along the $x$, $y$, and $z$-axes.

$\ihat=(1,0,0)$
$\jhat=(0,1,0)$
$\khat=(0,0,1)$

The magnitude of a vector $\vecb{v}=(x,y,z)$, also called its length or norm, is given by $$\left\| \vecb{v} \right\| = \sqrt{x^{2}+y^{2}+z^{2}}.$$

#### Notes

• Vectors can be defined in any number of dimensions, though we focus here only on 3-space.
• When drawing a vector in 3-space, where you position the vector is unimportant; the vector’s essential properties are just its magnitude and its direction. Two vectors are equal if and only if corresponding components are equal.
• A vector of norm 1 is called a unit vector. The coordinate vectors are examples of unit vectors.
• The zero vector, $\vecb{0} = (0,0,0)$, is the only vector with magnitude 0.

#### Basic Operations on Vectors

To add or subtract vectors $\vecb{u} = (u_{1},u_{2},u_{3})$ and $\vecb{v} = (v_{1},v_{2},v_{3})$, add or subract the corresponding coordinates: \begin{eqnarray*} \vecb{u}+\vecb{v} &= & (u_{1}+v_{1},u_{2}+v_{2},u_{3}+v_{3}) \\ \vecb{u}-\vecb{v} &= & (u_{1}-v_{1},u_{2}-v_{2},u_{3}-v_{3}). \end{eqnarray*}

To multiply vector $\vecb{u}$ by a scalar $k$, multiply each coordinate of $\vecb{u}$ by $k$: $$k\vecb{u}=(ku_{1},ku_{2},ku_{3}).$$

###### Example

The vector $\vecb{v}= (2,1,-2) = 2\ihat + \jhat -2\khat$ has magnitude $$\left\| \vecb{v} \right\| = \sqrt{2^2 +1^2 -(-2)^2} = 3.$$

Thus, the vector $\frac{1}{3}\vecb{v} = \left(\frac{2}{3},\frac{1}{3},\frac{-2}{3}\right)$ is a unit vector in the same direction as $\vecb{v}$.

In general, for $\vecb{v} \not= \vecb{0}$, we can scale (or normalize) $\vecb{v}$ to the unit vector $\frac{\vecb{v}}{\left\| \vecb{v} \right\|}$ pointing in the same direction as $\vecb{v}$.

#### Dot Product

Let $\vecb{u} = (u_{1},u_{2},u_{3})$ and $\vecb{v} = (v_{1},v_{2},v_{3})$. The dot product $\vecb{u} \cdot \vecb{v}$ (also called the scalar product or Euclidean inner product) of $\vecb{u}$ and $\vecb{v}$ is defined in two distinct (though equivalent) ways:

\begin{eqnarray*} \vecb{u} \cdot \vecb{v} & = & u_1v_1+u_2v_2+u_3v_3 \\ & = & \left\{ \begin{array}{cl} \left\| \vecb{u} \right\| \left\| \vecb{v} \right\| \cos \theta & {\small\textrm{if }} \vecb{u} \not= \vecb{0}, \vecb{v} \not= \vecb{0}\\ 0 & {\small\textrm{if }} \vecb{u} = \vecb{0} {\small\textrm{ or }} \vecb{v} = \vecb{0}\\ \end{array} \right.\\ & & \qquad{\small\textrm{where }} 0 \le \theta \le \pi {\small\textrm{ is the angle between }} \vecb{u} {\small\textrm{ and }} \vecb{v} . \end{eqnarray*}

$\newcommand{\vecb}[1]{{\bf #1}}$ By the Law of Cosines, for $\vecb{u} \not= \vecb{0}, \quad \vecb{v} \not= \vecb{0}$, $$\left\| \vecb{u}-\vecb{v} \right\|^{2} = \left\| \vecb{u} \right\|^{2} + \left\| \vecb{v} \right\|^{2} – 2 \left\| \vecb{u} \right\|\left\| \vecb{v} \right\|\cos\theta .$$ So, for $\vecb{u} = (u_{1},u_{2},u_{3})$ and $\vecb{v} = (v_{1},v_{2},v_{3})$, $$(u_1-v_1)^{2}+(u_2-v_2)^2 + (u_3-v_3)^2 = u_1^2+u_2^2+u_3^2+ v_1^2+v_2^2+v_3^2 -2\left\| \vecb{u} \right\|\left\| \vecb{v} \right\|\cos\theta .$$ Squaring the expessions on the left and simpliying, \begin{eqnarray*} -2u_1v_1-2u_2v_2-2u_3v_3 & = & -2\left\| \vecb{u} \right\|\left\| \vecb{v} \right\|\cos\theta \\ u_1v_1 + u_2v_2+u_3v_3 & = & \left\| \vecb{u} \right\|\left\| \vecb{v} \right\|\cos\theta \\ \vecb{u} \cdot \vecb{v} & = & \left\| \vecb{u} \right\|\left\| \vecb{v} \right\|\cos\theta. \end{eqnarray*}

If $\vecb{u} = \vecb{0}$ or $\vecb{v} = \vecb{0}$, both definitions immediately give $\vecb{u} \cdot \vecb{v} = 0$. Thus, the two definitions of $\vecb{u} \cdot \vecb{v}$ are equivalent.

#### Properties of the Dot Product

• $\vecb{u} \cdot \vecb{v} = \vecb{v} \cdot \vecb{u}$
• $\vecb{u} \cdot (\vecb{v} + \vecb{w}) = (\vecb{u} \cdot \vecb{v}) + (\vecb{u} \cdot \vecb{w})$
• $\vecb{u} \cdot \vecb{u} = \left\| \vecb{u} \right\|^{2}$
See if you can verify each of these!
###### Example

If $\vecb{u}=(1,-2,2)$ and $\vecb{v}=(-4,0,2)$, then $\begin{array}{rcl} \vecb{u} \cdot \vecb{v} &=& (1)(-4)+(-2)(0)+(2)(2)\\ &=&-1+0+4\\ &=&0. \end{array}$

Using the second definition of the dot product with $\left\| \vecb{u} \right\|=3$ and $\left\| \vecb{v} \right\|=2\sqrt{5}$, $$\vecb{u} \cdot \vecb{v} = 0 = 6\sqrt{5}\cos\theta$$ so $\cos\theta=0$, yielding $\theta = \frac{\pi}{2}$.

Though we might not have guessed it, $\vecb{u}$ and $\vecb{v}$ are perpendicular to each other!

In general,

$\qquad$ Two non-zero vectors $\vecb{u}$ and $\vecb{v}$ are perpendicular (or orthogonal) if and only if $\vecb{u} \cdot \vecb{v} = 0$.

Let $\vecb{u}$ and $\vecb{v}$ be non-zero vectors. Suppose $\vecb{u}$ is orthogonal to $\vecb{v}$. Then the angle between $\vecb{u}$ and $\vecb{v}$ is $\frac{\pi}{2}$. Thus, \begin{eqnarray*} \vecb{u} \cdot \vecb{v} & = & \left\| \vecb{u} \right\|\left\| \vecb{v} \right\| \cos \frac{\pi}{2} \\ & = & \left\| \vecb{u} \right\|\left\| \vecb{v} \right\| (0)\\ & = & 0. \end{eqnarray*}

Suppose now that $\vecb{u} \cdot \vecb{v} = 0$. Then \begin{eqnarray*} \left\| \vecb{u} \right\|\left\| \vecb{v} \right\| \cos\theta & = & 0\\ \cos\theta & = & \frac{0}{\left\| \vecb{u} \right\|\left\| \vecb{v} \right\|} \\ \cos\theta & = & 0. \end{eqnarray*}

So $\theta = \frac{\pi}{2}$. Thus $\vecb{u}$ is orthogonal to $\vecb{v}$.

#### Projection of a Vector

It is often useful to resolve a vector $\vecb{v}$ into the sum of vector components parallel and perpendicular to a vector $\vecb{u}$.

Consider first the parallel component, which is called the projection of $\vecb{v}$ onto $\vecb{u}$. This projection should be in the direction of $\vecb{u}$ and should have magnitude $\left\| \vecb{v} \right\|\cos\theta$, where $0 \le \theta \le \pi$ is the angle between $\vecb{u}$ and $\vecb{v}$. Let’s normalize $\vecb{u}$ to $\frac{\vecb{u}}{\left\| \vecb{u} \right\|}$ and then scale this by the magnitude $\left\| \vecb{v} \right\|\cos\theta$:

$\begin{array}{rl} = & \left(\left\| \vecb{v} \right\|\cos\theta\right)\frac{\vecb{u}}{\left\| \vecb{u} \right\|} \\ = & \frac{\left\| \vecb{v} \right\|\left\| \vecb{u}\right\|\cos\theta}{\left\| \vecb{u} \right\|^{2}}\vecb{u}\\ = & \frac{\vecb{v} \cdot \vecb{u}}{\left\| \vecb{u} \right\|^{2}}\vecb{u}. \end{array}$

The perpendicular vector component of $\vecb{v}$ is then just the difference between $\vecb{v}$ and the projection of $\vecb{v}$ onto $\vecb{u}$.

In summary,

projection of $\vecb{v}$ onto $\vecb{u}$

vector component of $\vecb{v}$ perpendicular to $\vecb{u}$

#### Cross Product

Let $\vecb{u} = (u_{1},u_{2},u_{3})$ and $\vecb{v} = (v_{1},v_{2},v_{3})$. The cross product $\vecb{u} \times \vecb{v}$ yields a vector perpendicular to both $\vecb{u}$ and $\vecb{v}$ with direction determined by the right-hand rule. Specifically, $$\vecb{u} \times \vecb{v} = (u_{2}v_3-u_3v_2)\ihat – (u_1v_3-u_3v_1)\jhat + (u_1v_2-u_2v_1)\khat.$$ It can also be shown that $$\left\| \vecb{u} \times \vecb{v} \right\| = \left\| \vecb{u} \right\|\left\| \vecb{v} \right\|\sin\theta \quad {\small\textrm{for }} \vecb{u} \not= \vecb{0}, \quad \vecb{v} \not= \vecb{0}$$

Let $\vecb{u}$ and $\vecb{v}$ be non-zero vectors. We will use Lagrange’s Identity, which says that $$\left\| \vecb{u} \times \vecb{v} \right\|^{2} = \left\| \vecb{u} \right\|^{2}\left\| \vecb{v} \right\|^{2} – \left( \vecb{u} \cdot \vecb{v} \right)^{2}.$$ Since $\vecb{u} \cdot \vecb{v} =\left\| \vecb{u} \right\|\left\| \vecb{v} \right\| \cos\theta$, \begin{eqnarray*} \left\| \vecb{u} \times \vecb{v} \right\|^{2} &= &\left\| \vecb{u} \right\|^{2}\left\| \vecb{v} \right\|^{2}-\left( \left\| \vecb{u} \right\|\left\| \vecb{v} \right\| \cos\theta \right)^{2} \\ & = & \left\| \vecb{u} \right\|^{2}\left\| \vecb{v} \right\|^{2} – \left\| \vecb{u} \right\|^{2}\left\| \vecb{v} \right\|^{2} \cos^{2}\theta\\ & = & \left\| \vecb{u} \right\|^{2}\left\| \vecb{v} \right\|^{2} \left ( 1 – \cos^{2}\theta \right) \\ & = & \left\| \vecb{u} \right\|^{2}\left\| \vecb{v} \right\|^{2} \sin^{2}\theta. \end{eqnarray*} So $$\left\| \vecb{u} \times \vecb{v} \right\| = \left\| \vecb{u} \right\|\left\| \vecb{v} \right\|\sin\theta.$$

Thus, the magnitude $\left\| \vecb{u} \times \vecb{v} \right\|$ gives the area of the parallelogram formed by $\vecb{u}$ and $\vecb{v}$.

As implied by the geometric interpretation,

Non zero vectors $\vecb{u}$ and $\vecb{v}$ are parallel if and only if $\vecb{u} \times \vecb{v}=\vecb{0}$.

Let $\vecb{u}$ and $\vecb{v}$ be non-zero vectors.

Suppose $\vecb{u}$ is parallel to $\vecb{v}$. Then the angle $\theta$ is 0 of $\pi$. So \begin{eqnarray*} \left\| \vecb{u} \times \vecb{v} \right\| & = & \left\| \vecb{u} \right\|\left\| \vecb{v} \right\| \sin\theta \\ & = & \left\| \vecb{u} \right\|\left\| \vecb{v} \right\| (0)\\ & = & 0. \end{eqnarray*} Thus $\vecb{u} \times \vecb{v} = \vecb{0}$.

Suppose now that $\vecb{u} \times \vecb{v} = \vecb{0}$. Then \begin{eqnarray*} \left\| \vecb{u} \times \vecb{v} \right\| & = & 0 \\ \left\| \vecb{u} \right\|\left\| \vecb{v} \right\| \sin\theta & = & 0 \\ \sin\theta & = & \frac{0}{\left\| \vecb{u} \right\|\left\| \vecb{v} \right\|} \\ \sin\theta & = & 0. \end{eqnarray*} So $\theta = 0$ or $\pi$. In either case, $\vecb{u}$ is parallel to $\vecb{v}$.

#### Properties of the Cross Product

• $\vecb{u} \times \vecb{v} = – \left( \vecb{v} \times \vecb{u} \right)$

• $\vecb{u} \times \left( \vecb{v} + \vecb{w} \right) = \left(\vecb{u} \times \vecb{v} \right) + \left( \vecb{u} \times \vecb{w} \right)$

• $\vecb{u} \times \vecb{u} = \vecb{0}$

Again, see if you can verify each of these.

• Lagrange’s Identity $$\left\| \vecb{u} \times \vecb{v} \right\|^{2} = \left\| \vecb{u} \right\|^{2}\left\| \vecb{v} \right\|^{2} – \left( \vecb{u} \cdot \vecb{v} \right)^{2}.$$

• Volume of a Parallelepiped Consider the parallelepiped with adjacent sides $\vecb{a}$, $\vecb{b}$, and $\vecb{c}$. The area of the base is $\left\|\vecb{b}\times\vecb{c}\right\|$. The height of the parallelepiped is $\left\|\vecb{a}\right\|\cos\theta$. Thus, the parallelepiped has volume $$V = \left\|\vecb{b}\times\vecb{c}\right\|\left\|\vecb{a}\right\|\cos\theta.$$ But recall that $\vecb{u} \cdot \vecb{v} =\left\|\vecb{u}\right\|\left\|\vecb{v}\right\|\cos\theta$ for $\vecb{u} \not= \vecb{0}, \quad \vecb{v} \not= \vecb{0}$.
Thus, $$V = \vecb{a} \cdot \left( \vecb{b} \times \vecb{c} \right).$$ It doesn’t matter which two vectors define the “base” of the parallelepiped:
$\vecb{a} \cdot \left( \vecb{b} \times \vecb{c} \right) =$
$\vecb{c} \cdot \left( \vecb{a} \times \vecb{b} \right) =$
$\vecb{b} \cdot \left( \vecb{c} \times \vecb{a} \right)$.

#### Key Concepts

Let $\vecb{u} = (u_{1},u_{2},u_{3})$ and $\vecb{v} = (v_{1},v_{2},v_{3})$.

• Basic Operations, Norm of a vector

\begin{eqnarray*} \vecb{u}+\vecb{v} &= & (u_{1}+v_{1},u_{2}+v_{2},u_{3}+v_{3}) \\ \vecb{u}-\vecb{v} &= & (u_{1}-v_{1},u_{2}-v_{2},u_{3}-v_{3}) \\ k\vecb{u} & = & (ku_{1},ku_{2},ku_{3}) \\ \left\| \vecb{v} \right\| & = & \sqrt{x^{2}+y^{2}+z^{2}} \end{eqnarray*}

• Dot Product

\begin{eqnarray*} \vecb{u} \cdot \vecb{v} & = & u_1v_1+u_2v_2+u_3v_3 \\ & = & \left\{ \begin{array}{cl} \left\| \vecb{u} \right\| \left\| \vecb{v} \right\| \cos \theta & {\small\textrm{if }} \vecb{u} \not= \vecb{0}, \vecb{v} \not= \vecb{0}\\ 0 & {\small\textrm{if }} \vecb{u} = \vecb{0} {\small\textrm{ or }} \vecb{v} = \vecb{0}\\ \end{array} \right.\\ & & \qquad{\small\textrm{where }} 0 \le \theta \le \pi {\small\textrm{ is the angle between }} \vecb{u} {\small\textrm{ and }} \vecb{v} \end{eqnarray*} $\qquad$ For $\vecb{u} \not= \vecb{0}, \quad \vecb{v} \not= \vecb{0}$, $\qquad\qquad \vecb{u} \cdot \vecb{v} = 0$ if and only if $\vecb{u}$ is orthogonal to $\vecb{v}$.

• Projection of a Vector

projection of $\vecb{v}$ onto $\vecb{u}$ vector component of $\vecb{v}$ perpendicular to $\vecb{u}$

• Cross Product

\begin{eqnarray*} \vecb{u} \times \vecb{v} & = & (u_{2}v_3-u_3v_2)\ihat – (u_1v_3-u_3v_1)\jhat + (u_1v_2-u_2v_1)\khat\\ \left\| \vecb{u} \times \vecb{v} \right\| & = & \left\| \vecb{u} \right\|\left\| \vecb{v} \right\|\sin\theta \quad {\small\textrm{for }} \vecb{u} \not= \vecb{0}, \quad \vecb{v} \not= \vecb{0} \end{eqnarray*}