17.1 Mathematic_Vector Methods

The CÆSAR Code Package uses the Mathematic_Vector class to contain and manipulate algebraic vectors. The following discussion assumes that x and y are vectors of length N.

The CÆSAR Code Package contains procedures to calculate norms and dot products of vectors. In parallel, these operations require global communication. Dot products are defined by

xTy = x . y = $\displaystyle \left(\vphantom{ x,y }\right.$x, y$\displaystyle \left.\vphantom{ x,y }\right)$ = $\displaystyle \sum_{{i=1,N}}^{}$xi yi  . (17.1)
A vector norm is any scalar-valued function on a vector, denoted by the double bar notation $ \left\Vert\vphantom{ x }\right.$x$ \left.\vphantom{ x }\right\Vert$, that satisfies these properties:

$\displaystyle \left\Vert\vphantom{ x }\right.$x$\displaystyle \left.\vphantom{ x }\right\Vert$ $\displaystyle \geq$ 0 $\displaystyle \mbox{($\left\Vert x \right\Vert = 0$ iff $x = 0$)}$  ,
$\displaystyle \left\Vert\vphantom{ x+y }\right.$x + y$\displaystyle \left.\vphantom{ x+y }\right\Vert$ $\displaystyle \leq$ $\displaystyle \left\Vert\vphantom{ x }\right.$x$\displaystyle \left.\vphantom{ x }\right\Vert$ + $\displaystyle \left\Vert\vphantom{ y }\right.$y$\displaystyle \left.\vphantom{ y }\right\Vert$  ,  
$\displaystyle \left\Vert\vphantom{ sx }\right.$sx$\displaystyle \left.\vphantom{ sx }\right\Vert$ = $\displaystyle \left\vert\vphantom{ s }\right.$s$\displaystyle \left.\vphantom{ s }\right\vert$$\displaystyle \left\Vert\vphantom{ x }\right.$x$\displaystyle \left.\vphantom{ x }\right\Vert$  , $\displaystyle \mbox{where $s$ is a scalar}$  .
The general class of vector norms known as the p-norms are defined by

$\displaystyle \left\Vert\vphantom{ x }\right.$x$\displaystyle \left.\vphantom{ x }\right\Vert _{p}^{}$ = $\displaystyle \sqrt[\raisebox{1ex}{$p$}]{{\sum_{i=1,N} \left\vert x_i \right\vert^p}}$ , p$\displaystyle \ge$1  . (17.3)
In particular, the 1, 2, and $ \infty$ norms are the most important:
$\displaystyle \left\Vert\vphantom{ x }\right.$x$\displaystyle \left.\vphantom{ x }\right\Vert _{1}^{}$ = $\displaystyle \sum_{{i=1,N}}^{}$$\displaystyle \left\vert\vphantom{ x_i }\right.$xi$\displaystyle \left.\vphantom{ x_i }\right\vert$  , (17.4)
$\displaystyle \left\Vert\vphantom{ x }\right.$x$\displaystyle \left.\vphantom{ x }\right\Vert _{2}^{}$ = $\displaystyle \sqrt{{\sum_{i=1,N} \left\vert x_i \right\vert^2}}$ = 160#34  , and (17.5)
$\displaystyle \left\Vert\vphantom{ x }\right.$x$\displaystyle \left.\vphantom{ x }\right\Vert _{{\infty}}^{}$ = $\displaystyle \max_{{1 \leq i \leq N}}^{}$$\displaystyle \left\vert\vphantom{ x_i }\right.$xi$\displaystyle \left.\vphantom{ x_i }\right\vert$  . (17.6)

The following vector norm relationships are verified by the Mathematic_Vector Valid_State procedure:

$\displaystyle \left\Vert\vphantom{ x }\right.$x$\displaystyle \left.\vphantom{ x }\right\Vert _{2}^{}$ $\displaystyle \leq$ $\displaystyle \left\Vert\vphantom{ x }\right.$x$\displaystyle \left.\vphantom{ x }\right\Vert _{1}^{}$ $\displaystyle \leq$ $\displaystyle \sqrt{{N}}$$\displaystyle \left\Vert\vphantom{ x }\right.$x$\displaystyle \left.\vphantom{ x }\right\Vert _{2}^{}$  ,
$\displaystyle \left\Vert\vphantom{ x }\right.$x$\displaystyle \left.\vphantom{ x }\right\Vert _{{\infty}}^{}$ $\displaystyle \leq$ $\displaystyle \left\Vert\vphantom{ x }\right.$x$\displaystyle \left.\vphantom{ x }\right\Vert _{2}^{}$ $\displaystyle \leq$ $\displaystyle \sqrt{{N}}$$\displaystyle \left\Vert\vphantom{ x }\right.$x$\displaystyle \left.\vphantom{ x }\right\Vert _{{\infty}}^{}$  ,
$\displaystyle \left\Vert\vphantom{ x }\right.$x$\displaystyle \left.\vphantom{ x }\right\Vert _{{\infty}}^{}$ $\displaystyle \leq$ $\displaystyle \left\Vert\vphantom{ x }\right.$x$\displaystyle \left.\vphantom{ x }\right\Vert _{1}^{}$ $\displaystyle \leq$ N$\displaystyle \left\Vert\vphantom{ x }\right.$x$\displaystyle \left.\vphantom{ x }\right\Vert _{{\infty}}^{}$  .
The Cauchy-Schwartz inequality is verified by the Mathematic_Vector DotProduct procedure:

$\displaystyle \left\vert\vphantom{ x^T y }\right.$xTy$\displaystyle \left.\vphantom{ x^T y }\right\vert$ $\displaystyle \leq$ $\displaystyle \left\Vert\vphantom{ x }\right.$x$\displaystyle \left.\vphantom{ x }\right\Vert _{2}^{}$$\displaystyle \left\Vert\vphantom{ y }\right.$y$\displaystyle \left.\vphantom{ y }\right\Vert _{2}^{}$  . (17.8)
For a similar but more complete discussion of vector operations see Golub & Van Loan (1989).

Michael L. Hall