%display latex
latex.matrix_delimiters(left='[', right=']')
$\newcommand{\la}{\langle}$ $\newcommand{\ra}{\rangle}$ $\newcommand{\vu}{\mathbf{u}}$ $\newcommand{\vv}{\mathbf{v}}$ $\newcommand{\vw}{\mathbf{w}}$ $\newcommand{\nc}{\newcommand}$ $\nc{\Cc}{\mathbb{C}}$ $\nc{\Rr}{\mathbb{R}}$ $\nc{\sp}[1]{\la #1 \ra}$ $\nc{\ol}[1]{\overline{#1} }$ $\nc{\norm}[1]{\left\| #1 \right\|}$
Geometry of Vectors II¶
First let us recall that
For $\alpha, \beta \in \Cc$, the transpose of $\alpha$ (regarded as a $1\times 1$ matrix) is simply $\alpha$ itself.
Hence $\alpha^* = \ol{\alpha^T} = \ol{\alpha}$.
Also, $\ol{\alpha +\beta} = \ol{\alpha} + \ol{\beta}$ and $\ol{\alpha\beta} = \ol{\alpha}\ \ol{\beta}$.
Moreover $\ol{\alpha}{\alpha} = \norm{\alpha}^2 \ge 0$ for all $\alpha \in \Cc$ and $\norm{\alpha} = 0$ if and only if $\alpha= 0$.
For matrices $A$ and $B$, $\ol{\ol{A}} = A$, $(A^T)^T = A$.
If $AB$ is defined, then
$(AB)^T = B^TA^T$ and $\ol{AB} = \ol{A}\ \ol{B}$
It follows that $(A^*)^* = A$ and $(AB)^* = \ol{(AB)^T} = \ol{B^TA^T} = \ol{B^T}\ \ol{A^T} = B^*A^*$
Properties of inner product¶
- $\sp {\vu,\vv} = \sp {\vv,\vu}^*$
- $\sp {\vu,\vv+\vw} = \sp {\vu, \vv} + \sp {\vu, \vw}$
- $\sp {\alpha \vu, \vv} = \alpha^*\sp {\vu, \vv}$
- $\sp{\vu,\vu} \ge 0$ (is a nonnegative real number) and $\sp{\vu,\vu} = 0 \iff \vu = \mathbf{0}$. (positive definite)
Any function from $\Cc^n \times \Cc^n$ to $\Cc$ satisfying these 4 properties is called an inner product.
It is straight-forward to check that the function defined by $\sp{\vu,\vv} = \vu^*\vv$ is an inner product.
- $\sp{\vv, \vu}^* = (\vv^* \vu)^* = \vu^*\vv^{**} = \vu^*\vv = \sp{\vu, \vv}$
- $\sp{\vu, \vv + \vw} = \vu^*(\vv+ \vw) = \vu^*\vv + \vu^*\vw = \sp{\vu,\vv} + \sp{\vu,\vw}$
- $\sp {\alpha \vu, \vv} = (\alpha u)^* \vv = (\alpha^*\vu^*)\vv = \alpha^*(\vu^*\vv) = \alpha^*\sp {\vu, \vv}$
- $\sp{\vu,\vu} = \sum_{i=1}^n \ol{u_i}{u_i} = \sum_{i=1}^n \norm{u_i}^2$ is a sum of squares of real numbers hence $\ge 0$
and the sum is zero if and only if each $\norm{u_i} = 0$ if and only if each $u_i = 0$ and that means $\vu$ is the zero vector in $\Cc^n$.
Note that for any inner product
$\sp{\vv + \vw, \vu} = \sp{\vu,\vv+\vw}^* = (\sp{\vu,\vv}+\sp{\vu,\vw})^* = \sp{\vu,\vv}^* + \sp{\vu,\vw}^* = \sp{\vv,\vu} + \sp{\vw,\vu}$.
and for any $\beta \in \Cc$, $\sp{\vu,\beta\vv} = \sp{\beta \vv,\vu}^* = (\beta^*\sp{\vv,\vu})^* = \beta^{**}\sp{\vv,\vu}^* = \beta\sp{\vu,\vv}$.
Moreover, in the real case ($\Rr^n$), Property (1) and (3) become $\sp{\vu,\vv} = \sp{\vv,\vu}$ and $\sp{\alpha \vu,\vv} = \alpha\sp{\vu,\vv}$, respectively.
Exercise¶
Verify the above properties for the vectors the following $\alpha, \vu$ and $\vv$.
#instead of typing it out all the time, we define a function called inner_product
def inner_product(uu,vv):
p = uu.conjugate_transpose()*vv
return(p[0,0])
alpha = 2*I; uu = column_matrix([-1,I]); vv = column_matrix([2*I,1]);
alpha, uu, vv
#use uu instead of u is a typographical way to remind myself that uu is a vector
For instance, let's verify the first properties for these particular $\alpha, \vu$, and $\vv$:
LHS1 = inner_product(uu,vv); RHS1 = inner_product(vv,uu).conjugate(); (LHS1, RHS1, bool(LHS1==RHS1))
#test if <u,v> = <v,u>^*
inner_product(uu,uu), bool(inner_product(uu,uu) >= 0) #test if <u,u> >=0
Now you can verify yours by hand or using the sagemathcell