%display latex
latex.matrix_delimiters(left='[', right=']')
$\newcommand{\la}{\langle}$ $\newcommand{\ra}{\rangle}$ $\newcommand{\vu}{\mathbf{u}}$ $\newcommand{\vv}{\mathbf{v}}$ $\newcommand{\nc}{\newcommand}$ $\nc{\Cc}{\mathbb{C}}$ $\nc{\Rr}{\mathbb{R}}$ $\nc{\sp}[1]{\la #1 \ra}$ $\nc{\ol}[1]{\overline #1}$
Geometry of Vectors I¶
We identify elements in $\Cc^n$ (called vectors, or column vectors) with $n \times 1$-matrices over $\Cc$, i.e. the elements of $M_{n \times 1}(\Cc)$.
$$ \vu = \begin{bmatrix} u_1 \\ \vdots \\u_n \end{bmatrix} \in \Cc^n \equiv M_{n \times 1}(\Cc).$$
So the usual operations on matrices (addition, scalar multiplication) apply on vectors.
We now introduce a new operation, called an inner product, on $\Cc^n$.
$$ \la \underline{\phantom{a}}, \underline{\phantom{a}}\ra \colon \Cc^n \times \Cc^n \to \Cc $$
defined by $\sp {\vu,\vv} = \vu^*\vv$.
The right side is the multiplication of the $1 \times n$ matrix $\vu^*$ (recall it is the conjugate transpose of $\vu$) and the $n \times 1$ matrix $\vv$. So the product is a $1 \times 1$ matrix over $\Cc$ which is identified with its only entry (a scalar).
Hence, inner product is as known as scalar product.
An Example¶
u = column_matrix([2,I]); v = column_matrix([I,-3*I]);
uh = u.conjugate_transpose(); #the conjugate transpose of u
u,v, uh #u,v, and u^*
So $\sp {\vu, \vv} = \begin{bmatrix} 2,-i\end{bmatrix} \begin{bmatrix} i \\ -3i \end{bmatrix} = (2)(i) + (-i)(-3i) = 2i-3 $
In terms of coordinates, $\vu = \begin{bmatrix} u_1 \\ \vdots \\ u_n \end{bmatrix}, \vv = \begin{bmatrix}v_1 \\ \vdots \\ v_n \end{bmatrix}$
So $$\sp {\vu,\vv} = \vu^*\vv = [\ol{u_1} \cdots \ol{u_n}]\begin{bmatrix}v_1\\ \vdots \\ v_n\end{bmatrix} = \ol{u_1}v_1 + \cdots + \ol{u_n}v_n = \sum_{i=1}^n \ol{u_i}v_i. $$
In case, $\vu$ is in $\Rr^n$, i.e. every entry of $\vu$ is a real number, then $\ol{u_i} = u_i$, so the inner product that we defined reduce to $$ \sp {\vu,\vv} = \sum_{i=1}^n u_iv_i $$ which is the familar dot product (in Calculus)
Another Example¶
u = column_matrix([1,-2,-1]); v = column_matrix([-1,3,2]); uh = u.conjugate_transpose()
u,v,uh # u,v and u^*. Note that u is a vector over the real numbers and hence u^* is simply the transpose of u
Then $$\sp {\vu, \vv} = \begin{bmatrix} 1 &-2 &-1\end{bmatrix} \begin{bmatrix} -1 \\ 3 \\ 2\end{bmatrix} = (1)(-1) + (-2)(3) +(-1)(2) = -9 $$
(uh*v)[0,0] #Just check.
You can find these notes via this link.
More general, this folder contains all notes that I posted.