An inner product space is a vector space with an inner product.

An inner product is an operation that assigns a scalar to a pair of vectors \(\langle\boldsymbol{u}\vert\boldsymbol{v}\rangle\), functions \(\langle f\vert g\rangle\), or matrices \(\langle A\vert B\rangle\). For vectors, the inner product is computed using matrix multiplication:
$$\langle\boldsymbol{u}\vert\boldsymbol{v}\rangle=\begin{pmatrix} u_{1}^{*} &u_{2}^{*}& \cdots &u_{N}^{*} \end{pmatrix}\begin{pmatrix} v_1\\v_2 \\ \vdots \\ v_N \end{pmatrix}=\sum_{i=1}^{N}u_{i}^{*}v_i\; \; \; \; \; \; \; \; 3$$
For functions, the inner product is defined by the integral
$$\langle f\vert g\rangle=\int_{-\infty}^{\infty}f(x)^{*}g(x)dx$$
You may notice that eq3 resembles a dot product. The dot product pertains to vectors in \(\mathbb{R}^{3}\), where \(\boldsymbol{A}\cdot\boldsymbol{B}=\sum_{i=1}^{3}A_iB_i\), which can be extended to \(N\)-dimensions, where \(\langle\boldsymbol{A}\vert\boldsymbol{B}\rangle=\sum_{i=1}^{N}A_iB_i\), and to include complex and real functions, \(\langle f\vert g\rangle=\int_{-\infty}^{\infty}f(x)^{*}g(x)dx\). Therefore, an inner product is a generalisation of the dot product.
An inner product space has the following properties:
-
- Conjugate symmetry: \(\langle f\vert g\rangle=\langle g\vert f\rangle^{*}\)
- Additivity: \(\langle f+g\vert h\rangle=\langle f\vert h\rangle+\langle g\vert h\rangle\)
- Positive semi-definiteness: \(\langle f\vert f\rangle\geq 0\), with \(\langle f\vert f\rangle= 0\) if \(f=0\)

Question
i) Why is the inner product space positive semi-definite?
ii) Show that orthogonal vectors are linearly independent.
iii) Prove that \(\boldsymbol{A}\cdot\boldsymbol{B}=\vert\boldsymbol{A}\vert\vert\boldsymbol{B}\vert cos\theta\).
Answer
i) A general vector space of \(\langle\boldsymbol{a}\vert\boldsymbol{a}\rangle\) can be positive or negative. The inner product space is defined such that \(\langle f\vert f\rangle\geq 0\), with \(\langle f\vert f\rangle= 0\) if \(f=0\), which is useful in quantum mechanics.
ii) Let the set of vectors \(\left \{ \boldsymbol{v_k} \right \}\) in eq1 be orthogonal vectors. The dot product of eq1 with \(\boldsymbol{v_i}\) gives \(c_i\boldsymbol{v_i}\cdot\boldsymbol{v_i} =c_i\left |\boldsymbol{v_i} \right |^{2}=0\). Since the magnitudes of orthogonal vectors are non-zero, \(c_i=0\). Hence, orthogonal vectors are linearly independent.
iii) Let’s consider two vectors \(\boldsymbol{A}\) and \(\boldsymbol{B}\) as position vectors starting from the origin. Then the vector \(\boldsymbol{A-B}\) forms a triangle with them. According to the law of cosines, we have:
$$\vert\boldsymbol{A-B}\vert^2=\vert\boldsymbol{A}\vert^2+\vert\boldsymbol{B}\vert^2-2\vert\boldsymbol{A}\vert\vert\boldsymbol{B}\vert cos\theta$$
Substituting \(\vert\boldsymbol{A-B}\vert^2=(\boldsymbol{A-B})\cdot(\boldsymbol{A-B})=\vert\boldsymbol{A}\vert^2-2\boldsymbol{A}\cdot\boldsymbol{B}+\vert\boldsymbol{B}\vert^2\) into the above equation gives:
$$\boldsymbol{A}\cdot\boldsymbol{B}=\vert\boldsymbol{A}\vert\vert\boldsymbol{B}\vert cos\theta$$
which completes the proof.
Two functions (or two vectors) are orthogonal if \(\langle f\vert g\rangle= 0\). Elements of a set of basis functions are orthonormal if \(\langle \phi_i\vert \phi_j\rangle=\delta_{ij}\) where
$$\delta_{ij}= \{\; \begin{matrix} 1 & for\; \; i=j\\ 0 & for\; \; i\neq j \end{matrix}$$
In other words, two functions (or two vectors) are orthonormal if they are orthogonal and normalised.
Next, the norm (or length) of a vector \(\boldsymbol{u}\) is denoted by \(\left \|\boldsymbol{u}\right \|\) and is defined as \(\left \|\boldsymbol{u}\right \|=\sqrt{\langle\boldsymbol{u}\vert\boldsymbol{u}\rangle}=\sqrt{\left |\boldsymbol{u}\right |\left |\boldsymbol{u}\right |cos\: 0^{\circ} }=\left |\boldsymbol{u}\right |\). With this association of inner product and the length of a vector, we can relate the inner product \(\langle\boldsymbol{u}\vert\boldsymbol{v}\rangle\) and the Euclidean distance \(d(\boldsymbol{u},\boldsymbol{v})\) between 2 vectors \(\boldsymbol{u}\) and \(\boldsymbol{v}\). Using the \(\mathbb{R}^{2}\) space as an example, where \(\boldsymbol{u}=\begin{pmatrix} 6\\9 \end{pmatrix}\) and \(\boldsymbol{v}=\begin{pmatrix} 3\\5 \end{pmatrix}\), we have
$$d(\boldsymbol{u},\boldsymbol{v})=\left \|\boldsymbol{u}-\boldsymbol{v}\right \|=\sqrt{\langle\boldsymbol{u}- \boldsymbol{v}\vert\boldsymbol{u}- \boldsymbol{v}\rangle}=\sqrt{\langle\begin{pmatrix} 3\\4 \end{pmatrix}\vert \begin{pmatrix} 3\\4 \end{pmatrix}\rangle}$$
$$=\sqrt{\begin{pmatrix} 3 &4 \end{pmatrix}\begin{pmatrix} 3\\4 \end{pmatrix}}=5$$
Hence, the norm naturally comes from the inner product, i.e. every inner product space is a normed space, but not vice versa.
Finally, the Frobenius inner product of two matrices \(A\) and \(B\), both of the same size, is defined as:
$$\langle A\vert B\rangle=Tr(A^{\dagger}B)$$
where \(Tr(A^{\dagger}B)\) denotes the trace of \(A^{\dagger}B\).
To show that this is analogous to the inner product of vectors: \(\langle\boldsymbol{u}\vert\boldsymbol{v}\rangle=u_1^*v_1+u_2^*v_2+\cdots\), consider the \(2\times 2\) matrices \(A\) and \(B\), where
$$\begin{align*}\langle A\vert B\rangle&=Tr(A^{\dagger}B)=Tr\biggr[\begin{pmatrix}a_{11}^*&a_{21}^*\\a_{12}^*&a_{22}^*\end{pmatrix}\begin{pmatrix}b_{11}&b_{12}\\b_{21}&b_{22}\end{pmatrix}\biggr]\\&=Tr\begin{pmatrix}a_{11}^*b_{11}+a_{21}^*b_{21}&a_{11}^*b_{12}+a_{21}^*b_{22}\\a_{12}^*b_{11}+a_{22}^*b_{21}&a_{12}^*b_{12}+a_{22}^*b_{22}\end{pmatrix}\\&=a_{11}^*b_{11}+a_{21}^*b_{21}+a_{12}^*b_{12}+a_{22}^*b_{22}\end{align*}$$
which is the inner product of all the corresponding matrix entries when the matrices are rearranged into vectors:
$$\begin{pmatrix}a_{11}\\a_{12}\\a_{21}\\a_{22}\end{pmatrix}\;\;\;\;\;\;\;\;\begin{pmatrix}b_{11}\\b_{12}\\b_{21}\\b_{22}\end{pmatrix}$$
Just as the vector dot product defines the length (or norm) of a vector, the Frobenius inner product defines the Frobenius norm of a matrix:
$$\|A\|_F=\sqrt{\langle A\vert A\rangle}=\sqrt{Tr(A^{\dagger}A)}$$
with \(\|A\|_F=\sqrt{Tr(A^2)}\) if \(A\) is Hermitian.