% vim: tw=50
% 25/11/2022 11AM

\subsection{Orthogonal complement and adjoint map}

\begin{definition*}
    Suppose $V = U \oplus W$ ($U$ is \emph{a} complement
    of $W$ in $V$). We define $\pi : V \to W$, $v
    = u + w \mapsto w$. Then
    \begin{itemize}
        \item $\pi$ is linear
        \item $\pi^2 = \pi$
    \end{itemize}
    We say that $\pi$ is the \emph{projector
    operator} onto $W$.
\end{definition*}

\begin{remark*}
    $\id \pi \equiv \text{projection onto $U$}$
    $\to$ $V$ inner product space, $W$ finite
    dimensional, then we can chose $U = W^\perp$
    and $\pi$ is explicit.
\end{remark*}

\begin{lemma*}
    \begin{itemize}
        \item Let $V$ be an inner product space
        \item Let $W \le V$, $W$ finite
            dimensional.
    \end{itemize}
    Let $(e_1, \dots, e_k)$ be an orthonormal
    basis of $W$ (given by Gram-Schmidt). Then
    \begin{enumerate}[(i)]
        \item $\pi(v) = \sum_{i = 1}^k  \langle v,
            e_i \rangle e_i$ $\forall v \in V$
            and $V = W \orthoplus W^\perp$.
        \item $\forall v \in V$, $\forall w \in
            W$,
            \[ \|v - \pi(v)\| \le \|v - w\| \]
            with equality if and only if $w =
            \pi(v)$ (that is $\pi(v)$ is the point
            in $W$ closest to $v$).
    \end{enumerate}
\end{lemma*}

\begin{remark*}
    Infinite dimensional generalisation:
    \begin{itemize}
        \item $V$ inner product space $\to$ $V$
            Hilbert space
        \item $W$ finite dimensional $\to$ $W$
            closed (completeness)
    \end{itemize}
    $\to$ part II class ``Linear Analysis''.
\end{remark*}

\begin{proof}
    \begin{enumerate}[(i)]
        \item $W = \Span \langle e_1, \dots, e_k
            \rangle$, $(e_i)_{1 \le i \le k}$
            orthogonal. Let us define
            \[ \pi(v) = \sum_{i = 1}^k \langle v, e_i
            \rangle e_i \]
            Observation:
            \[ v = \ub{\pi(v)}_{\in W} + \ub{v -
            \pi(v)}_{\text{claim: $\in W^\perp$}} \]
            Indeed
            \begin{align*}
                v - \pi(v) \in W^\perp
                &\iff \forall w \in W, \langle v -
                \pi(v) w \rangle = 0 \\
                &\iff \forall 1 \le j \le k,
                \langle v - \pi(v), e_j \rangle =
                0
            \end{align*}
            We compute:
            \begin{align*}
                \langle v - \pi(v), e_j \rangle
                &= \left\langle v - \sum_{i = 1}^k
                \langle v, e_i \rangle e_i, e_j
                \right\rangle \\
                &= \langle v, e_j \rangle -
                \langle v, e_j \rangle \\
                &= 0
            \end{align*}
            We have shown $v - \pi(v) \in W^\perp$
            Hence
            \[ v = \ub{\pi(v)}_{\in W} + \ub{(v -
            \pi(v))}_{\in W^\perp} \]
            \[ \implies V = W + W^\perp \]
            And $v \in W \cap W^\perp$
            \[ \implies \|v\|^2 = \langle
            \ub{v}_{\in W}, \ub{v}_{\in W^\perp}
            \rangle = 0 \]
            \[ \implies v = 0 \]
            So
            \[ V = W \orthoplus W^\perp  \]
        \item Indeed, let $w \in W$, then
            \begin{align*}
                \|v - w\|^2
                &= \|\ub{v - \pi(v)}_{\in W^\perp}
                + \ub{\pi(v) - w}_{\in W}\|^2 \\
                &= \langle v - \pi(v) + \pi(v) -
                w, v - \pi(v) + \pi(v) - w \rangle
                \\
                &= \|v - \pi(v)\|^2 + \|\pi(v) -
                w\|^2 \\
                &\ge \|v - \pi(v)\|^2
            \end{align*}
            With equality if and only if $w =
            \pi(w)$. PYTHAGORAS. \qedhere
    \end{enumerate}
\end{proof}

\subsubsection*{Adjoint map}

\begin{flashcard}[adjoint-linear-map-defn]
\begin{definition*}
    Let $V, W$ be finite dimensional inner product
    spaces, let $\alpha \in \mathcal{L}(V, W)$.
    Then there exists a \emph{unique} linear map
    \[ \alpha^* : W \to W \]
    such that $\forall (v, w) \in V \times W$,
    \[ \langle \alpha(v), w \rangle = \langle v,
    \alpha^*(w) \rangle \]
    Moreover, if $\mathcal{B}$ is an orthonormal
    basis of $V$ and $\mathcal{C}$ is an
    orthonormal basis of $W$ then
    \[ \cloze{[\alpha^*]_{\mathcal{C}, \mathcal{B}} =
    [\alpha]_{\mathcal{B}, \mathcal{C}}^\top} \]
\end{definition*}
\end{flashcard}

\begin{proof}
    Computation: $\mathcal{B} = (v_1, \dots,
    v_n)$, $\mathcal{C} = (w_1, \dots, w_m)$, $A =
    [\alpha]_{\mathcal{B}, \mathcal{C}} =
    (a_{ij})$. Existence
    \[ [\alpha^*]_{\mathcal{C}, \mathcal{B}} =
    \ol{A}^\top = C = (c_{ij}) \]
    $c_{ij} = \ol{a_{ji}}$. We compute:
    \begin{align*}
        \left\langle \alpha \left( \sum_i
        \lambda_i v_i \right) , \sum_j \mu_j w_j
        \right\rangle
        &= \left\langle \sum_{i,k} \lambda_i
        a_{ki} w_k, \sum_j \mu_j w_j \right\rangle
        \\
        &= \sum_{i, j} \lambda_i a_{ji} \ol{\mu_j}
        &&\text{(orthonormal)}
    \end{align*}
    Then
    \begin{align*}
        \left\langle \sum_i \lambda_i v_i,
        \alpha^* \left( \sum_j \mu_j w_j \right)
        \right\rangle
        &= \left\langle \sum_i \lambda_i v_i,
        \sum_{j, k} \mu_j c_{kj} v_k \right\rangle
        \\
        &= \sum_{i, j} \lambda_i \ol{c_{ij}}
        \ol{\mu_j}
    \end{align*}
    So the expressions are equal because
    $\ol{c_{ij}} = a_{ji}$. So this proves
    existence. Uniqueness follows by computing
    $\alpha^*(w_j)$ $\to$ exercise.
\end{proof}

\begin{remark*}
    We are using the same notation $\alpha^*$ for
    the adjoint of $\alpha$ and the dual of
    $\alpha$. $V, W$ are real product spaces,
    $\alpha \in \mathcal{L}(V, W)$,
    \[ \psi_{R,V} : V
    \stackrel{\simeq}{\longrightarrow}
    V^* \]
    \[ \qquad ~~~~v \mapsto \langle \bullet, v \rangle \]
    \[ \psi_{R,W} : W
    \stackrel{\simeq}{\longrightarrow}
    W^* \]
    \[ \qquad ~~~~w \mapsto \langle \bullet, w \rangle \]
    Then the adjoint map of $\alpha$ is given by:
    \[ W \stackrel[\psi_{R, W}]{}{\longrightarrow} W^*
    \stackrel[\text{dual of
    $\alpha$}]{}{\longrightarrow} V^*
    \stackrel[\psi^{-1}_{R, V}]{}{\longrightarrow}
    V \]
\end{remark*}

\subsubsection*{Self adjoint maps and isometries}

\begin{flashcard}[self-adjoint-isometry-defn]
\begin{definition*}
    $V$ inner product space finite dimensional
    $\alpha \in \mathcal{L}(V)$, $\alpha^* \in
    \mathcal{L}(V)$ the adjoint map. Then:
    \begin{itemize}
        \item \cloze{$\langle \alpha v, w \rangle =
            \langle v, \alpha w \rangle ~ \forall
            (v, w) \in V \times V \iff \alpha
            = \alpha^*$. We call such a map self
            adjoint. ($\RR$ $\alpha$ symmetric,
            $\CC$ $\alpha$ Hermitian).}
        \item \cloze{$\langle \alpha v, \alpha w \rangle
            = \langle v, w \rangle ~ \forall (v,
            w) \in V \times V \iff \alpha^* =
            \alpha^{-1}$ we call an isometry.
            ($\RR$ $\alpha$ orthogonal, $\CC$ $\alpha$
            unitary).}
    \end{itemize}
\end{definition*}
\end{flashcard}

\begin{proof}
    Check the equivalence that preserving the
    scalar product
    \[ (\langle \alpha v, \alpha w \rangle =
    \langle v, w \rangle \qquad \forall (v, w) \in
    V \times V ) \]
    is equivalent to ($\alpha$ invertible and
    $\alpha^* = \alpha^{-1}$)
    \begin{enumerate}
        \item[$\Rightarrow$] $\langle \alpha v,
            \alpha w \rangle = \langle v, w
            \rangle ~\forall (v, w) \in V \times
            V$. Use $v = w$:
            \[ \|\alpha v\|^2 = \langle \alpha v,
            \alpha v \rangle = \langle v, v
            \rangle = \|v\|^2 \]
            ($\alpha$ preserves the norm: isometry)
            So $\Ker \alpha = \{0\}$, so $\alpha$
            bijective, $\alpha^{-1}$ well defined.
            (since finite dimensional). $\alpha \in
            \mathcal{L}(V)$, Then $\forall (v, w)
            \in V \times V$,
            \[ TODO \]
            \[ \implies \forall v \in V, \langle
            v, \alpha^* w
            \rangle = \langle v, \alpha^{-1} w
            \rangle \]
            \[ \implies \forall v \langle v,
            \alpha^* w - \alpha^{-1} w \rangle = 0 \]
            I take $v = \alpha^* w - \alpha^{-1}
            \omega$
            \[ \implies \alpha^* w = \alpha^{-1} w
            ~\forall w \in V \]
            \[ \implies \alpha^* = \alpha^{-1} \]
        \item $\alpha \in \mathcal{L}(V)$,
            $\alpha^* = \alpha^{-1}$, then
            \[ \langle \alpha v, \alpha w \rangle
            = \langle v, \alpha^* \alpha w \rangle
            = \langle v, w \rangle \qedhere \]
    \end{enumerate}
\end{proof}

TODO

$\alpha$ isometry ($\alpha = \alpha^{-1}$)
\[ \iff \forall (v, w) \in V \times V \langle
\alpha v, \alpha w \rangle = \langle v,
w \rangle \]
\[ \iff \forall v \in V, \|\alpha(v)\| = \|v\| \]
(preservation of scalar product $\iff$
preservation of the norm)

\begin{lemma*}
    $V$ finite dimensional real (complex) inner
    product space. Then $\alpha \in
    \mathcal{L}(V)$ is:
    \begin{enumerate}[(i)]
        \item Self adjoint if and only if in \emph{any} 
            orthonormal basis of $V$,
            $[\alpha]_{\mathcal{B}}$ is symmetric
            (Hermitian).
        \item An isometry if and only if in
            \emph{any} orthonormal basis of $V$,
            $[\alpha]_{\mathcal{B}}$ is orthogonal
            (unitary).
    \end{enumerate}
\end{lemma*}

\begin{proof}
    $\mathcal{B}$ orthonormal basis,
    \[ [\alpha^*]_{\mathcal{B}} =
    \ol{[\alpha]_{\mathcal{B}}^\top} \]
    \begin{itemize}
        \item Self adjoint
            $\ol{[\alpha^*]_{\mathcal{B}}^\top} =
            [\alpha]_{\mathcal{B}}$
        \item Isometry
            $\ol{[\alpha]_{\mathcal{B}}^\top} =
            [\alpha]_{\mathcal{B}}^{-1}$.
    \end{itemize}
\end{proof}

\begin{definition*}
    $V$ finite dimensional inner product space.
    \begin{itemize}
        \item $F = \RR$,
            \[ \theta(V) = \{\alpha \in
            \mathcal{L}(V), \alpha \text{
            isometry}\} \equiv \text{orthogonal
            group of $V$} \]
        \item $F = \CC$,
            \[ U(V) = \{\alpha \in
            L(V), \alpha \text{isometry}\} \equiv
            \text{unitary group of $V$} \]
    \end{itemize}
\end{definition*}

\begin{remark*}
    $V$ finite dimensional, $\{e_1, \dots, e_n\}$
    orthonormal basis.
    \begin{itemize}
        \item $F = \RR$, $\theta(V)
            \leftrightarrow
            \{\text{orthonormal basis of $V$}\}$,
            $\alpha \mapsto (\alpha(e_1, \dots,
            \alpha(e_n))$.
        \item $F = \CC$, $U(V) \leftrightarrow
            \{\text{orthonormal basis of $V$}\}$,
            $\alpha \mapsto (\alpha(e_1, \dots,
            \alpha(e_n))$.
    \end{itemize}
\end{remark*}
