\section{Hilbert Spaces}
\label{section:hilbert-space}

\begin{definition}[Sesquilinear Form]
\label{definition:sesquilinear-form}
    Let $E$ be a vector space over $K \in \RC$ and $\lambda: E \times E \to \complex$, then $\lambda$ is a \textbf{sesquilinear form} if:
    \begin{enumerate}
        \item For each $x, y, z \in E$ and $\mu \in K$, $\lambda(\mu x + y, z) = \mu\lambda(x, z) + \lambda(y, z)$. 
        \item For each $x, y, z \in E$ and $\mu \in K$, $\lambda(x, \mu y + z) = \ol \mu\lambda(x, y) + \lambda(x, z)$. 
    \end{enumerate}
\end{definition}

\begin{proposition}[Polarisation Identity]
\label{proposition:polarisation-complex}
    Let $E$ be a vector space over $\complex$, $\lambda: E \times E \to \complex$ be a sesquilinear form, and
    \[
    q: E \to K \quad x \mapsto \lambda(z, z)
    \]

    be its quadratic form, then for any $x, y \in E$, 
    \begin{align*}
    \lambda(x, y) &= \frac{1}{4}\braks{q(x + y) - q(x - y) + iq(x + iy) - iq(x - iy)} \\
    &= \frac{1}{4}\sum_{k = 0}^3 i^k q(x + i^ky) 
    \end{align*}
\end{proposition}
\begin{proof}
    On the real side, 
    \begin{align*}
        q(x + y) &= \lambda(x, x) + \lambda(x, y) + \lambda(y, x) + \lambda(y, y) \\
        q(x - y) &= \lambda(x, x) - \lambda(x, y) - \lambda(y, x) + \lambda(y, y) \\
        q(x + y) - q(x - y) &= 2[\lambda(x, y) + \lambda(y, x)]
    \end{align*}

    On the imaginary side, 
    \begin{align*}
        q(x + iy) &= \lambda(x, x) - i\lambda(x, y) + i\lambda(y, x) + \lambda(y, y) \\
        q(x - iy) &= \lambda(x, x) + i\lambda(x, y) - i\lambda(y, x) + \lambda(y, y) \\
        q(x + iy) - q(x - iy) &= -2i[\lambda(x, y) - \lambda(y, x)] \\
        iq(x + iy) - iq(x - iy) &= 2[\lambda(x, y) + \lambda(y, x)]
    \end{align*}

    Therefore
    \[
    \sum_{k = 0}^3 i^k q(x + i^ky) = 4\lambda(x, y)
    \]
\end{proof}

\begin{definition}[Hermitian Form]
\label{definition:hermitian-form}
    Let $E$ be a vector space over $K \in \RC$ and $\lambda: E \times E \to K$, then $\lambda$ is a \textbf{Hermitian form} if 
    \begin{enumerate}[label=(H\arabic*)]
        \item For each $x, y, z \in E$, $\lambda(x + y, z) = \lambda(x, z) + \lambda(y, z)$. 
        \item For any $x, y \in E$ and $\mu \in K$, $\lambda(\mu x, y) = \mu \lambda(x, y)$. 
        \item For every $x, y \in E$, $\lambda(x, y) = \ol{\lambda(y, x)}$. 
    \end{enumerate}
\end{definition}

\begin{proposition}[Polarisation Identity (Real)]
\label{proposition:polarisation-real}
    Let $E$ be a vector space over $\real$, $\lambda: E \times E \to \real$ be a Hermitian form, and
    \[
    q: E \to K \quad x \mapsto \lambda(z, z)
    \]

    be its quadratic form, then for any $x, y \in E$, 
    \[
    \lambda(x, y) = \frac{1}{4}\braks{q(x + y) - q(x - y)}
    \]
\end{proposition}
\begin{proof}
    For each $x, y \in E$, by (H3),
    \begin{align*}
        q(x + y) &= \dpn{x, x}{E} + 2 \dpn{x, y}{E} + \dpn{y, y}{E} \\
        q(x - y) &= \dpn{x, x}{E} - 2 \dpn{x, y}{E} + \dpn{y, y}{E}
    \end{align*}

    so
    \[
    q(x + y) - q(x - y) = 4 \dpn{x, y}{E}
    \]
    
\end{proof}

\begin{definition}[Inner Product]
\label{definition:inner-product}
    Let $E$ be a vector space over $K$ and $\inp_E: E \times E \to K$, then $\inp_E$ is a \textbf{pseudo inner product} if:
    \begin{enumerate}[label=(H\arabic*)]
        \item For each $x, y, z \in E$, $\angles{x + y, z}_E = \dpn{x, z}{E} + \dpn{y, z}{E}$. 
        \item For any $x, y \in E$ and $\mu \in K$, $\dpn{\mu x, y}{E} = \mu \dpn{x, y}{E}$. 
        \item For every $x, y \in E$, $\dpn{x, y}{E} = \ol{\dpn{y, x}{E}}$. 
        \item[(I)] For each $x \in E$, $\dpn{x, x}{E} \ge 0$. 
    \end{enumerate}

    and an \textbf{inner product} if for each $x \in E$, $\dpn{x, x}{E} = 0$ if and only if $x = 0$. 
    

\end{definition}


\begin{proposition}[Cauchy-Schwarz Inequality]
\label{proposition:cauchy-schwarz}
    Let $H$ be a vector space over $K \in \RC$ and $\inp_H: E \times E \to K$ be a pseudo inner product, then for any $x, y \in H$, $\dpn{x, y}{H} \le \norm{x}_H\norm{y}_H$. 
\end{proposition}
\begin{proof}[Proof, {{\cite[Theorem 5.19]{Folland}}}. ]
    Assume without loss of generality that $\dpn{x, y}{H} > 0$, then for each $t \in \real$, 
    \[
    0 \le \dpn{x - ty,x - ty}{H} = \norm{x}_H^2 - 2t\dpn{x, y}{H} + t^2\norm{y}_H^2
    \]

    which is a quadratic function of $t$ with absolute minumum at $t = \dpn{x, y}{H}/\norm{y}_H^2$, so
    \[
    0 \le \norm{x}_H^2 - 2\dpn{x, y}{H}^2/\norm{y}_H^2 + \dpn{x, y}{H}^2/\norm{y}_H^2
    = \norm{x}_H^2 - \dpn{x, y}{H}^2/\norm{y}_H^2
    \]
\end{proof}



\begin{definition}[Hilbert Space]
\label{definition:hilbert-space}
    Let $(H, \norm{\cdot}_H)$ be a normed vector space over $K \in \RC$, then the following are equivalent:
    \begin{enumerate}
        \item There exists a unique inner product $\inp_H: H \times H \to K$ such that for every $x \in H$, $\norm{x}_H = \dpn{x, x}{H}^{1/2}$, and
        \begin{enumerate}[label=(\roman*)]
            \item If $K = \real$, then
            \[
            \dpn{x, y}{H} = \frac{1}{4}\braks{\norm{x + y}_H^2 - \norm{x - y}_H^2}
            \]
            \item If $K = \complex$, then
            \[
            \dpn{x, y}{H} = \frac{1}{4}\sum_{k = 0}^3 i^k \normn{x + i^ky}_H^2 
            \]
        \end{enumerate}

        \item (\textbf{Parallelogram Law}) For each $x, y \in H$, 
        \[
        \norm{x + y}_H^2 + \norm{x - y}_H^2 = 2\norm{x}_H^2 + 2\norm{y}_H^2
        \]
    \end{enumerate}

    If the above holds, then $(H, \inp_H)$ is an \textbf{inner product space}. If in addition $H$ is complete, then $(H, \inp_H)$ is a \textbf{Hilbert space}. 
    
\end{definition}
\begin{proof}[Proof, {{\cite[Theorem I.5.1]{Yosida}}}. ]
    (2) $\Rightarrow$ (1, Real): For each $x, y \in H$, let
    \[
    \dpn{x, y}{H} = \frac{1}{4}\braks{\norm{x + y}_H^2 - \norm{x - y}_H^2}
    \]

    then for every $x, y, z \in H$,
    \begin{align*}
        \dpn{x, z}{H} + \dpn{y, z}{H} &= \frac{1}{4}\braks{\norm{x + z}_H^2 - \norm{x - z}_H^2} \\
        &+ \frac{1}{4}\braks{\norm{y + z}_H^2 - \norm{y - z}_H^2}
    \end{align*}

    By (2) applied to the pairs $((x + y)/2 + z, (x - y)/2)$ and $((x + y)/2 - z, (x - y)/2)$, 
    \begin{align*}
        \norm{x + z}_H^2 + \norm{y + z}_H^2 &= 2\braks{\norm{\frac{x + y}{2} + z}_H^2 + \norm{\frac{x - y}{2}}_H^2} \\ 
        \norm{x - z}_H^2 + \norm{y - z}_H^2 &= 2\braks{\norm{\frac{x + y}{2} - z}_H^2 + \norm{\frac{x - y}{2}}_H^2}
    \end{align*}
    
    Thus
    \begin{align*}
        \dpn{x, z}{H} + \dpn{y, z}{H} &= \frac{1}{2}\braks{\norm{\frac{x + y}{2} + z}_H^2 - \norm{\frac{x + y}{2} - z}_H^2} \\
        &= 2\dpb{\frac{x + y}{2}, z}{H}
    \end{align*}

    and
    \begin{enumerate}
        \item[(H2)] By repeated application of the above equation, $\dpn{\mu x, z}{H} = \mu \dpn{x, z}{H}$ for all dyadic rational numbers $\mu \in \mathbb{D}$. Since the norm is continuous, $\dpn{\mu x, z}{H} = \mu \dpn{x, z}{H}$ for all $\mu \in \real$. 
        \item[(H1)] By (H2), $\dpn{x + y, z}{H} = \dpn{x, z}{H} + \dpn{y, z}{H}$.
        \item[(H3)] By definition, $\inp_H$ is symmetric. 
        \item[(I)] By non-negativity of the norm, 
        \[
        \dpn{x, x}{H} = \frac{1}{4}\braks{\norm{2x}_H^2 + 0} = \norm{x}_H^2 \ge 0
        \]

        with equality if and only if $x = 0$. 
    \end{enumerate}

    Therefore $\inp_H$ is a real-valued inner product with $\norm{x}_H = \dpn{x, x}{H}^{1/2}$ for all $x \in H$. By the \hyperref[polarisation identity]{proposition:polarisation-real}, this inner product is unique. 

    (2) $\Rightarrow$ (1, Complex): For each $x, y \in H$, let
    \[
    \dpn{x, y}{H_\real} = \frac{1}{4}\braks{\norm{x + y}_H^2 - \norm{x - y}_H^2}
    \]

    and

    \[
    \dpn{x, y}{H} = \frac{1}{4}\sum_{k = 0}^3 i^k \normn{x + i^ky}_H^2 = \dpn{x, y}{H_\real} + i \dpn{x, iy}{H_\real}
    \]

    then for any $x, y, z \in H$, 
    \begin{enumerate}
        \item[(H1)] By (H1) of the real case, $\dpn{x + y, z}{H} = \dpn{x, z}{H} + \dpn{y, z}{H}$.
        \item[(H3)] By absolute homogeneity of the norm, $\dpn{ix, iy}{H_\real} = \dpn{x, y}{H_\real}$, so
        \begin{align*}
            \dpn{x, y}{H} &= \dpn{x, y}{H_\real} + i \dpn{x, iy}{H_\real} \\
            &= \dpn{x, y}{H_\real} - i \dpn{ix, y}{H_\real} \\
            &= \dpn{y, x}{H_\real} - i \dpn{y, ix}{H_\real} = \ol{\dpn{y, x}{H}}
        \end{align*}
        
        \item[(H2)] By absolute homogeneity of the norm, 
        \begin{align*}
            \dpn{ix, y}{H} &= \dpn{ix, y}{H_\real} + i \dpn{ix, iy}{H_\real} \\
            &= -\dpn{x, iy}{H_\real} + i\dpn{x, y}{H_\real} = i\dpn{x, y}{H}
        \end{align*}

        so $\inp_H$ satisfies (H2) by (H2) of the real case. 

        \item[(I)] By absolute homogeneity of the norm, 
        \begin{align*}
            \dpn{x, ix}{H_\real} &= \frac{1}{4}\braks{\norm{x + ix}_H^2 - \norm{x - ix}_H^2} \\
            &= \frac{|1 + i|^2 - |1 - i|^2}{4} \norm{x}_H^2 = 0
        \end{align*}

        so
        \[
        \dpn{x, x}{H} = \dpn{x, x}{H_\real} + i \dpn{x, ix}{H_\real} = \dpn{x, x}{H_\real} = \norm{x}_H^2
        \]
    \end{enumerate}
    
    Therefore $\inp_H$ is a complex-valued inner product with $\norm{x}_H = \dpn{x, x}{H}^{1/2}$ for all $x \in H$. By the \hyperref[polarisation identity]{proposition:polarisation-complex}, this inner product is unique.

    (1) $\Rightarrow$ (2): For each $x, y \in H$, 
    \begin{align*}
        \norm{x + y}_H^2 &= \dpn{x + y, x + y}{H} \\
        &= \norm{x}_H^2 + \dpn{x, y}{H} + \dpn{y, x}{H} + \norm{y}_H^2 \\
        \norm{x - y}_H^2 &= \norm{x}_H^2 - \dpn{x, y}{H} - \dpn{y, x}{H} + \norm{y}_H^2 
    \end{align*}

    so
    \[
        \norm{x + y}_H^2 + \norm{x - y}_H^2 = 2\norm{x}_H^2 + 2\norm{y}_H^2
    \]
    
    By the \hyperref[Cauchy-Schwarz inequality]{proposition:cauchy-schwarz}, 
    \begin{align*}
        \norm{x + y}_H^2 &= \norm{x}_H^2 + 2\text{Re}\dpn{x, y}{H} + \norm{y}_H^2 \\
        &\le \norm{x}_H^2 + 2\norm{x}_H\norm{y}_H + \norm{y}_H^2 \\
        &= (\norm{x}_H + \norm{y}_H)^2
    \end{align*}

    so $\norm{\cdot}_H$ satisfies the triangle inequality, and is a norm. 
\end{proof}



\begin{definition}[Orthogonal]
\label{definition:orthogonal-hilbert}
    Let $H$ be an inner product space and $x, y \in H$, then $x$ and $y$ are \textbf{orthogonal}, denoted $x \perp y$, if $\dpn{x, y}{H} = 0$. 
    
    For any $A \subset H$, $A$ is \textbf{pairwise orthogonal} if for any $x, y \in A$, $x \perp y$. 
\end{definition}

\begin{definition}[Orthogonal Projection]
\label{definition:orthogonal-projection}
    Let $H$ be an inner product space and $P \in L(H; H)$, then $P$ is an \textbf{orthogonal projection} if:
    \begin{enumerate}
        \item $P$ is idempotent. 
        \item For any $x, y \in H$, $\dpn{Px, y}{H} = \dpn{x, Py}{H}$. 
    \end{enumerate}
\end{definition}


\begin{definition}[Orthogonal Complement]
\label{definition:orthogonal-complement}
    Let $H$ be an inner product space and $A \subset H$ be a subspace, then the closed subspace
    \[
    A^\perp = \bracsn{x \in H| \dpn{x, y}{H} = 0 \forall y \in A}
    \]

    is the \textbf{orthogonal complement} of $H$. 
\end{definition}


\begin{theorem}[Pythagorean Theorem]
\label{theorem:pythagoras}
    Let $H$ be an inner product space over $K \in \RC$ and $\seqf{x_j} \subset H$ be pairwise orthogonal, then
    \[
    \norm{\sum_{j = 1}^n x_j}_H^2 = \sum_{j = 1}^n \norm{x_j}_H^2
    \]
\end{theorem}

\begin{theorem}
\label{theorem:hilbert-complement-subspace}
    Let $H$ be a Hilbert space over $K \in \RC$ and $A \subset H$ be a closed subspace, then:
    \begin{enumerate}
        \item For each $x \in H$ and $y \in A$, then $\norm{x - y}_H = d(x, A)$ if and only if $x - y \perp A$. 
        \item For any $x \in H$ and $y, z \in A$, 
        \[
        \norm{y - z}_H^2 \le 2\norm{y - x}_H^2 + 2\norm{z - x}_H^2 - 4d(x, A)^2
        \]
        \item For each $x \in H$, there exists a unique $x_A \in A$ such that $\norm{x - x_A}_H = d(x, A)$, and the mapping $P_A: H \to A$ with $x \mapsto x_A$ is an orthogonal projection. 
        \item $H = A \oplus A^\perp$ as a direct sum of closed subspaces, where for every $x \in H$, $x = P_Ax + P_{A^\perp}x$. 
    \end{enumerate}
    
\end{theorem}
\begin{proof}[Proof, {{\cite[Theorem 5.24]{Folland}}}. ]
    (1): Suppose that $\norm{x - y}_H = d(x, A)$. Let $z \in A$ and assume without loss of generality that $\dpn{y, z}{H} > 0$, then
    \[
    f(t)= \norm{(x - y) + tz}_H^2 = \norm{(x-y)}_H^2 + 2t \dpn{(x-y), z}{H} + t^2\norm{z}_H^2
    \]

    is a quadratic function. Since $y - tz \in A$ for all $t \in \real$, it has a minimum at $t = 0$. Therefore $\dpn{(x - y), z}{H} = 0$, and $x - y \perp A$. 

    Now suppose that $x - y \perp A$, then for any $z \in A$,
    \[
        \norm{x - z}_H^2 = \norm{x - y}_H^2 + \norm{y - z}_H^2 \ge \norm{x - y}_H^2
    \]
    
    by the \hyperref[Pythagorean Theorem]{theorem:pythagoras}. 

    
    (2): By the parallelogram law, 
    \[
        2(\norm{x - y}_H^2 + \norm{x - z}_H^2) = \norm{y - z}_H^2 + \norm{y + z - 2x}_H^2
    \]

    Since $(y + z)/2 \in A$, 
    \begin{align*}
        \norm{y - z}_H^2 &= 2(\norm{x - y}_H^2 + \norm{x - z}_H^2) - 4\norm{(y + z)/2 - x}_H^2 \\
        &\le 2\norm{x - y}_H^2 + \norm{x - z}_H^2 - 4d(x, A)^2
    \end{align*}

    (3): Let $\seq{y_n} \subset A$ with $\norm{y_n - x}_H \to d(x, A)$ as $n \to \infty$, $\seq{y_n}$ is a Cauchy sequence by (2). Since $H$ is complete and $A$ is a closed subspace, there exists $x_A \in A$ such that $y_n \to x_A$ as $n \to \infty$ by \autoref{proposition:complete-closed}. In which case, by continuity of the norm, $\norm{x_A - x}_H = d(x, A)$. By (1), $x_A$ is the unique element of $A$ such that $\norm{x_A - x}_H = d(x, A)$. 

    Let $x, y \in H$ and $\lambda \in K$, then $(\lambda x + y) - (\lambda P_Ax + P_Ay) \perp A$, so by (1), $P_A(\lambda x + y) = \lambda P_Ax + P_Ay$, and $P_A$ is linear. In addition,
    \begin{align*}
        \dpn{P_Ax, y}{H} &= \dpn{P_Ax, P_Ay}{H} + \dpn{P_Ax, y - P_Ay}{H} = \dpn{P_Ax, P_Ay}{H} \\
        &= \dpn{P_Ax, Py}{H} + \dpn{x - P_Ax, P_Ay}{H} = \dpn{x, P_Ay}{H}
    \end{align*}

    so $P_A$ is self-adjoint. 
    

    (4): By (1), for each $x \in H$, $P_{A^\perp}x = x - P_{A}x$. Since $A \cap A^\perp = \bracs{0}$, $H = A \oplus A^\perp$. 
\end{proof}

A significant property of Hilbert spaces is that every closed subspace is complemented by another closed subspace. It turns out that this is a defining property: 

\begin{theorem}[Lindenstrauss-Tzafriri, 1971]
\label{theorem:lindenstrauss-tzafriri}
    Let $E$ be a Banach space. If for every closed subspace $A \subset E$, there exists a closed subspace $A^\perp \subset E$ such that $E = A \oplus A^\perp$, then $E$ is isomorphic to a Hilbert space. 
\end{theorem}
\begin{proof}
    See \cite{LindenstraussTzafriri1971}. 
\end{proof}

\begin{theorem}[Riesz Representation Theorem]
\label{theorem:riesz-hilbert}
    Let $H$ be a Hilbert space over $K \in \RC$. For each $x \in H$, let
    \[
    \phi_x: H \to \complex \quad \phi_x(y) = \dpn{y, x}{E}
    \]

    then the mapping $H \to H^*$ defined by $x \mapsto \phi_x$ is an conjugate linear isometric isomorphism. 
\end{theorem}
\begin{proof}
    By the \hyperref[Cauchy-Schwarz inequality]{proposition:cauchy-schwarz} and definition of the norm, $x \mapsto \phi_x$ is an isometric conjugate linear map. 

    Let $\phi \in H^*$, then $\ker \phi$ is a closed subspace of codimension one. By \autoref{theorem:hilbert-complement-subspace}, $(\ker \phi)^\perp \ne \emptyset$. Let $y \in (\ker \phi)^\perp$ with $\norm{y}_H = 1$, then for any $x \in H$, 
    \begin{align*}
        \phi(x) &= \phi(P_{\ker \phi}x) + \phi(P_{(\ker \phi)^\perp}x) \\
        &= \dpn{P_{\ker \phi}x, \phi(y)y}{H} + \dpn{P_{(\ker \phi)^\perp}x, \phi(y)y}{H} = \dpn{x, \phi(y)y}{H}
    \end{align*}
    
\end{proof}


