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

\subsection{Application to bilinear forms}

Diagonalisation of self adjoint / unitary
operators.

\begin{theorem}
    Let $V$ be a finite dimensional inner product
    space (over $\RR$ or $\CC$). Let $\alpha \in
    \mathcal{L}(V)$ be \emph{self adjoint}
    ($\alpha = \alpha^*$). Then there exists an
    \emph{\textbf{orthonormal}} basis of $V$ made of
    \emph{\textbf{eigenvectors}} of $\alpha$.
\end{theorem}

\begin{theorem*}
    Let $V$ be a finite dimensional \emph{complex}
    inner product space. Let $\alpha \in
    \mathcal{L}(V)$ be unitary ($\alpha^* =
    \alpha^{-1}$). Then there exists an
    \emph{\textbf{orthonormal}} basis of $V$ made
    of \emph{\textbf{eigenvectors}}
    of $\alpha$.
\end{theorem*}

\noindent
These theorems are so important we stated them
twice!

\begin{itemize}
    \item Translate these statements for bilinear
        forms.
\end{itemize}

\begin{corollary*}
    let $A \in \mathcal{M}_n(\RR)$ (respectively
    $\CC$) be a symmetric (respectively Hermitian)
    matrix. Then there is an orthogonal
    (respectively unitary) matrix such that
    $P^\top AP$ (respectively $P^\dag AP$) is
    diagonal with real valued entries.
\end{corollary*}

\begin{remark*}
    $P^\dag = \ol{P}^\top$
\end{remark*}

\begin{proof}
    $F = \RR$ ($\CC$). Let $\langle , \rangle$ be
    the standard inner product over $\RR^n$. Then
    $A \in \mathcal{L}(F^n)$ is self adjoint,
    hence we can find an orthonormal (for
    the standard inner product) basis of $F^n$
    such that $A$ is diagonal in this basis, say
    $(v_1, \dots, v_n)$. Let $P = (v_1 \mid \cdots
    \mid v_n)$
    \begin{align*}
        (v_1, \dots, v_n) \text{ orthonormal
        basis}
        &\iff P \text{ orthogonal (unitary)} \\
        &\iff P^\top P = \id (P^\dag P = \id)
    \end{align*}
    So $P^{-1} AP = P^\top AP = D$, and we know
    $\lambda_i$ are real, they are the eigenvalues
    of a symmetric operator.
\end{proof}

\begin{corollary*}
    Let $V$ be a finite dimensional real (complex)
    inner product space. Let $\varphi : V \times V
    \to F$ be a symmetric (Hermitian) bilinear
    form. Then there is an orthonormal basis of
    $V$ such that $\varphi$ in this basis is
    represented by a diagonal matrix.
\end{corollary*}

\begin{proof}
    Let $\mathcal{B} = \{v_1, \dots, v_n\}$ be any
    orthonormal basis of $V$. Let $A =
    [\varphi]_{\mathcal{B}}$. Then since $\varphi$
    is symmetric (Hermitian), $A^\top = A$ ($^\dag
    = A$), hence there is an orthogonal (unitary)
    matrix $P$ such that $P^\top AP$ ($P^\dag
    AP$) is diagonal, say $D$. Let $v_i$ be the
    $i$-th row of $P^\top$ ($P^\dag$), then
    $\{v_1, \dots, v_n\}$ is an orthonormal basis
    say $\mathcal{B}'$ of $V$ and
    $[\varphi]_{\mathcal{B}'} = D$. (We are using
    the change of basis for bilinear forms).
\end{proof}

\begin{remark*}
    Diagonal entries of $P^\top AP$ ($P^\dag AP$)
    are exactly the eigenvalues of $A$.
    Moreover:
    \[ \Delta(\varphi) = \text{\#(positive
    eigenvalues of $A$)} - \text{\#(negative
    eigenvalues of $A$)} \]
    (recall $\Delta$ is the signature of a
    bilinear form)
\end{remark*}

\noindent
Important corollary

\begin{flashcard}[simultaneous-diagonalisation-of-hermitian-forms]
\begin{corollary*}[Simultaneous diagonalisation of
    Hermitian forms]
    \cloze{
    Let $V$ be a finite dimensional real (complex)
    vector space. Let:
    \[ \varphi, \psi : V \times V \to F \]
    $\varphi, \psi$ are bilinear symmetric
    (Hermitian) forms. And suppose $\varphi$ is
    positive definite. Then there exists $(v_1,
    \dots, v_n)$ basis of $V$ with respect to
    which \emph{both} bilinear forms are
    represented by a diagonal matrix.
}
\end{corollary*}
\end{flashcard}

\begin{proof}
    $\varphi$ is positive definite so $\varphi$
    induces a scalar product on $V$, $V$ equipped
    with $\varphi$ is a finite dimensional inner
    product space:
    \[ \langle u, v \rangle = \varphi(u, v) \]
    Hence there exists an \emph{orthonormal} (for
    the $\varphi$ induced scalar product) basis of
    $V$ in which $\psi$ is represented by a
    diagonal matrix. Observe that $\varphi$ in
    this basis is represented by the Identity
    matrix (because the basis orthonormal for
    $\varphi$: $\mathcal{B} = (v_1, \dots, v_n)$,
    $\langle v_i, v_j \rangle = \delta_{ij} =
    \varphi(v_i, v_j)$) So both matrices of
    $\varphi$ and $\psi$ in $\mathcal{B}$ are
    diagonal.
\end{proof}

\begin{corollary*}[Matrix reformulation of
    simultaneous diagonalisation]
    Let $A, B \in \mathcal{M}_n(\RR)$
    (respectively $\mathcal{M}_n(\CC)$), both
    symmetric (respectively Hermitian). Assume
    $\forall x \neq 0$, $\ol{x}^\top Ax > 0$. Then
    there exists $Q \in \mathcal{M}_n(\RR)$
    (respectively $\mathcal{M}_n(\CC)$) invertible
    such that \emph{both} $Q^\top AQ$
    (respectively $Q^\dag AQ$) and $Q^\top BQ$
    (respectively $Q^\dag BQ$) are diagonal.
\end{corollary*}

\begin{proof}
    Direct consequence of the simultaneous
    diagonalisation Theorem.
\end{proof}
