%! TEX root = SGT.tex
% vim: tw=80
% 02/05/2025 11AM

``linear algebraic methods in combinatorics''

\newpage
\section{Setting}

$\Omega$ a set (finite), $f : \Omega \to \Cbb$, $l^2(\Omega) \defeq \left\{f :
\Omega \to \Cbb \st \sum_x |f(x)|^2 < \infty\right\}$.

This generalises subsets: given $S \subseteq \Omega$, can consider
$\indicator{S} : \Omega \to \Cbb$ (where $x \mapsto 1$ for $x \in S$, and $x
\mapsto 0$ otherwise).

When $S$ contains only a single element, we may use the shorthand $\indicator{x}
= \indicator{\{x\}}$.

$l^2(\Omega)$ is a $\Cbb$-vector space, equipped with the inner product $\langle
\blank, \blank \rangle : l^2(\Omega) \times l^2(\Omega) \to \Cbb$ defined by
\[
  \langle f, g \rangle
  \defeq \sum_{x \in \Omega} \ol{f(x)} g(x)
,\]
and a norm $\|f\|_2^2 \defeq \langle f, f \rangle = \sum_x |f(x)|^2$.

Matrix over $\Omega$: $M : \Omega \times \Omega \to \Cbb$.
$M(x, y) = M_{x, y}$ is the $x, y$ entry.
$M$ acts on $l^2(\Omega)$: for $f \in l^2(\Omega)$, $Mf \in l^2(\Omega)$ is
given by $(Mf)(x) = \sum_y M(x, y) f(y)$.
$M(\alpha f + \beta g) = \alpha Mf + \beta Mg$ ($M$ is a linear map).

Given $M$, $N$, can calculate
\[
  (MNf)(X)
  = \sum_y \sum_z M(x, z) N(z, y) f(y)
,\]
so define $(MN)(x, y) = \sum_z M(x, z) N(z, y)$, so that the formula $(MNf)(x) =
\sum_y (MN)(x, y) f(y)$ holds.

Eigenthings: for $M : \Omega \times \Omega \to \Cbb$, we say that $\lambda \in
\Cbb$ is an eigenvalue with eigenfunction $\varphi \neq 0$ if $M\varphi =
\lambda \varphi$.

\begin{fcdefn}[Hermitian]
  \glsadjdefn{herm}{Hermitian}{matrix}%
  $M$ is \emph{Hermitian} if $M = M^H$, where $M^H(x, y) = \ol{M(y, x)}$.

  If $M$ is Hermitian, then $\langle Mf, g\rangle = \langle f, Mg \rangle$.
\end{fcdefn}

\begin{fcthm}[Spectral theorem for Hermitian matrices]
  \label{thm:spec for herm}
  % result(303abbb8456840f0)
  Assuming:
  - $\Omega$ finite
  - $M : \Omega \times \Omega \to \Cbb$ \gls{herm}
  - $|\Omega| = n$
  Then:
  there exist $\lambda_1, \ldots, \lambda_n \in \Rbb$ and $\varphi_1, \ldots,
  \varphi)n \in l^2(\Omega)$ non-zero such that
  \begin{cenum}[(1)]
    \item $M\varphi_i = \lambda_i \varphi_i$
    \item $\langle \varphi_i, \varphi_j\rangle \indicator{i = j}$
    \item $M = \sum_{i = 1}^n \lambda \varphi_i \varphi_i^H$
    \item there exists $U$ orthogonal such that $UMU^H = \diag(\lambda_i)$
    \item if $M$ is real, then can take $\varphi$ to be real ($\varphi : \Omega
      \to \Rbb$)
  \end{cenum}
\end{fcthm}

\begin{fclemma}[]
  % Lemma 1
  Any $M$ has an eigenpair $(\lambda, \varphi)$.
\end{fclemma}

\begin{proof}
  Want $Mf = zf$ for some $z \in \Cbb$.
  So want $(zI - M) f = 0$ to have a non-trivial solution $f \neq 0$.
  This happens if and only if $zI - M$ is singular, which happens if and only if
  $\det(zI - M) = 0$.

  $z \mapsto \det(zI - M)$ is a degree $n$ polynomial in $\Cbb$ (degree $n$
  since the leading term is $z^n$), so the fundamental theorem of algebra shows
  that there exists $\lambda \in \Cbb$ such that $\det(\lambda I - M) = 0$.
\end{proof}

\begin{fclemma}[]
  % Lemma 2
  Assuming:
  - $M$ is \gls{herm}
  Then:
  all eigenvalues are real
\end{fclemma}

\begin{proof}
  \begin{align*}
    \ol{\lambda} \langle \varphi, \varphi \rangle
    &= \langle \lambda \varphi, \varphi \rangle \\
    &= \langle M\varphi, \varphi \rangle \\
    &= \langle \varphi, M\varphi\rangle \\
    &= \langle \varphi, \lambda \varphi \rangle  \\
    &= \lambda \langle \varphi, \varphi \rangle
  \end{align*}
  Since $\varphi \neq 0$, $\langle \varphi, \varphi \rangle = \|\varphi\|^2 >
  0$, hence $\lambda = \ol{\lambda}$, i.e. $\lambda \in \Rbb$.
\end{proof}

\begin{fclemma}[]
  % Lemma 3
  Assuming:
  - $M$ \gls{herm}
  - $\lambda_i \neq \lambda_j$ are eigenvalues of $M$ with eigenvectors
  $\varphi_i$, $\varphi_j$
  Then:
  $\langle \varphi_i, \varphi_j \rangle = 0$.
\end{fclemma}

\begin{proof}
  \begin{align*}
    \lambda_i \langle \varphi_i, \varphi_j \rangle
    &= \langle M\varphi_i, \varphi_j \rangle \\
    &= \langle \varphi_i, M \varphi_j \rangle \\
    &= \lambda_j \langle \varphi_i, \varphi_j \rangle
  \end{align*}
  Since we assumed $\lambda_i \neq \lambda_j$, this gives $\langle \varphi_i,
  \varphi_j \rangle = 0$.
\end{proof}

\begin{lemma}[]
  % Lemma 4
  Assuming:
  - $M$ is real symmetric
  - $\lambda$ is an eigenvalue
  Then:
  there exists $g : \Omega \to \Rbb$ such that $Mg = \lambda g$.
\end{lemma}

\begin{proof}
  Let $\varphi = f + ig$.
  Then $M \varphi = Mf + iMg = \lambda \varphi = \lambda f + i\lambda g$.
  Hence $Mf = M\lambda$ and $Mg = \lambda g$.
  So either $f$ or $g$ works.
\end{proof}

\begin{notation*}
  For $f, g \in l^2(\Omega)$, $fg^H$ denotes the matrix $(fg^H)(x, y) = f(x)
  \ol{g}(y)$.

  ``$(fg^H)h = fg^H h = f\langle g, h\rangle$''
\end{notation*}

\begin{proof}[Proof of \nameref{thm:spec for herm}]
  % proves(303abbb8456840f0)
  Using the above lemmas, can find $\lambda_n \in \Rbb$ and $\varphi_i : \Omega
  \to \Cbb$ non-zero such that $M\varphi_n = \lambda_n \varphi_n$ and
  $\|\varphi_n\| = 1$.

  Then let $M' = M - \lambda_n \varphi_n \varphi_n^H$.
  $l^2(\Omega) = \Span(\varphi_n) \oplus \Span(\varphi_n)^\top$.
  Then check that $M'$ acts on $\Span(\varphi_n)^\top$ and use induction.
\end{proof}

\begin{theorem}[Courant-Fischer-Weyl Theorem]
  % result(d54861a15c0941c1)
  Assuming:
  - $M : \Omega \times \Omega \to \Rbb$ symmetric
  - eigenvalues $\lambda_1 \le \ldots \le \lambda_n$
  Then:
  \[
    \lambda_k
    = \min_{\substack{W \le l^2(\Omega) \\ \dim W = k}}
    \max_{\substack{f \in W \\ f \neq 0}} \frac{\langle f, Mf \rangle}{\langle
    f, f \rangle}
    = F_k
  .\]
\end{theorem}

\begin{fcdefn}[Rayleigh quotient]
  $\frac{\langle f, Mf \rangle}{\langle f, f\rangle}$ is called the
  \emph{Rayleigh quotient}.
\end{fcdefn}

\begin{proof}
  % proves(d54861a15c0941c1)
  Let $W' = \Span(\varphi_1, \ldots, \varphi_k)$.
  Note
  \[
    F_k
    \le \max_{\substack{f \in W \\ f \neq 0}} \frac{\langle f, Mf
    \rangle}{\langle f, f \rangle}
  .\]
  For $f \in W$, $f = \sum_{i = 1}^k \alpha_i \varphi_i$, so
  \[
    \frac{\langle f, Mf \rangle}{\langle f, f \rangle}
    = \frac{\sum_{i = 1}^k \alpha_i^2 \lambda_i}{\sum_{i = 1}^k \alpha_i^2}
    \le \frac{\lambda_k \sum_{i = 1}^k \alpha_i^2}{\sum_{i = 1}^k \alpha_i^2}
    = \lambda_k
  .\]
  So $F_k \le \lambda_k$.

  Now suppose $W$ is a subspace with $\dim W = k$.
  Let $V = \Span(\varphi_k, \ldots, \varphi_n)$, and note $\div V = n - k + 1$.
  Note
  \[
    \dim(V \cap W)
    = \dim V + \dim W - \dim(V + W)
    \ge k + (n - k + 1) - n
    = 1
  .\]
  So for all such $W$, there exists $f \in V \cap W$, $f \neq 0$ such that $f =
  \sum_{i \ge k} \alpha_i \varphi_i$.
  Then
  \[
    \langle f, Mf \rangle
    = \sum_{i \ge k} \alpha_i^2 \lambda_i
    \ge \lambda_k \sum_{i \ge k} \alpha_i^2
    = \lambda_k \langle f, f \rangle
  ,\]
  so $F_k \ge \lambda_k$.
\end{proof}
