[proofplan]
The proof converts the second variation problem into a spectral problem for the self-adjoint Jacobi operator. Since $\Sigma$ is closed, the Jacobi operator has a discrete real spectrum with an $L^2$-orthonormal eigenbasis; this is the standard spectral theorem for self-adjoint elliptic operators on closed manifolds, which is not yet cited in the wiki. Expanding a variation function in this eigenbasis shows that each eigenfunction with eigenvalue $\lambda$ contributes $-\lambda$ times the square of its coefficient to the second variation. Positive eigenvalues are exactly the negative directions of $Q$, zero eigenvalues are exactly the Jacobi fields, and absence of positive eigenvalues is exactly stability.
[/proofplan]
[step:Diagonalize the Jacobi operator on $L^2(\Sigma)$]
Because $\Sigma$ is closed, the operator $L$ is a second-order self-adjoint [elliptic operator](/page/Elliptic%20Operator) on the compact manifold $\Sigma$. By the spectral theorem for self-adjoint elliptic operators on closed manifolds (citing a result not yet in the wiki: Spectral theorem for self-adjoint elliptic operators on closed manifolds), there exists an $L^2$-orthonormal sequence of smooth eigenfunctions
\begin{align*}
\varphi_j: \Sigma &\to \mathbb{R}, \qquad j \in \mathbb{N},
\end{align*}
such that
\begin{align*}
L\varphi_j = \lambda_j \varphi_j
\end{align*}
for every $j \in \mathbb{N}$, and such that $(\varphi_j)_{j=1}^\infty$ is an [orthonormal basis](/page/Orthonormal%20Basis) of $L^2(\Sigma, \mathcal{H}^m)$. The [inner product](/page/Inner%20Product) used here is
\begin{align*}
(u,v)_{L^2(\Sigma)} := \int_\Sigma u\,v\,d\mathcal{H}^m
\end{align*}
for $u,v \in L^2(\Sigma,\mathcal{H}^m)$.
[/step]
[step:Express the second variation in eigenfunction coordinates]
Let
\begin{align*}
\phi: \Sigma &\to \mathbb{R}
\end{align*}
be a smooth variation function. Define its Fourier coefficients with respect to the eigenbasis by
\begin{align*}
a_j := \int_\Sigma \phi\,\varphi_j\,d\mathcal{H}^m
\end{align*}
for $j \in \mathbb{N}$. Since $(\varphi_j)_{j=1}^\infty$ is an orthonormal basis of $L^2(\Sigma,\mathcal{H}^m)$, the expansion
\begin{align*}
\phi = \sum_{j=1}^\infty a_j \varphi_j
\end{align*}
holds in $L^2(\Sigma,\mathcal{H}^m)$. For each $N \in \mathbb{N}$, define the finite spectral projection
\begin{align*}
\phi_N := \sum_{j=1}^N a_j\varphi_j .
\end{align*}
The spectral theorem for the self-adjoint operator $L$ identifies its quadratic form on smooth functions by monotone finite spectral truncation, so
\begin{align*}
\int_\Sigma \phi\,L\phi\,d\mathcal{H}^m = \lim_{N\to\infty}\int_\Sigma \phi_N\,L\phi_N\,d\mathcal{H}^m.
\end{align*}
For each fixed $N$, bilinearity of the $L^2(\Sigma)$ inner product, the eigenvalue equation $L\varphi_j=\lambda_j\varphi_j$, and orthonormality give
\begin{align*}
\int_\Sigma \phi_N\,L\phi_N\,d\mathcal{H}^m = \sum_{j=1}^N \lambda_j a_j^2.
\end{align*}
Therefore the second variation satisfies
\begin{align*}
Q[\phi] = -\int_\Sigma \phi\,L\phi\,d\mathcal{H}^m = -\lim_{N\to\infty}\sum_{j=1}^N \lambda_j a_j^2.
\end{align*}
Whenever the series is written as $-\sum_{j=1}^\infty \lambda_j a_j^2$ below, it denotes this spectral-theorem limit.
[guided]
The purpose of the eigenfunction expansion is to separate the quadratic form into independent one-dimensional contributions. Let
\begin{align*}
\phi: \Sigma &\to \mathbb{R}
\end{align*}
be a smooth variation function, and define its coefficient in the $j$-th eigendirection by
\begin{align*}
a_j := \int_\Sigma \phi\,\varphi_j\,d\mathcal{H}^m .
\end{align*}
Because the eigenfunctions form an orthonormal basis of $L^2(\Sigma,\mathcal{H}^m)$, we have
\begin{align*}
\phi = \sum_{j=1}^\infty a_j\varphi_j
\end{align*}
in $L^2(\Sigma,\mathcal{H}^m)$.
Now apply the Jacobi operator only to finite spectral truncations, where no interchange of an infinite sum with an integral is involved. For each $N \in \mathbb{N}$, define
\begin{align*}
\phi_N := \sum_{j=1}^N a_j\varphi_j .
\end{align*}
Since the sum defining $\phi_N$ is finite and each eigenfunction satisfies $L\varphi_j=\lambda_j\varphi_j$, we have
\begin{align*}
L\phi_N = \sum_{j=1}^N a_j\lambda_j\varphi_j .
\end{align*}
Bilinearity of the $L^2(\Sigma)$ inner product and orthonormality of the eigenfunctions give
\begin{align*}
\int_\Sigma \phi_N\,L\phi_N\,d\mathcal{H}^m = \sum_{j=1}^N \lambda_j a_j^2 .
\end{align*}
The passage from $\phi_N$ to $\phi$ is justified by the quadratic-form part of the spectral theorem for the self-adjoint elliptic operator $L$: because $\phi$ is smooth, $\phi$ lies in the form domain of $L$, and the finite spectral truncations converge to $\phi$ in that form norm. Hence
\begin{align*}
\int_\Sigma \phi\,L\phi\,d\mathcal{H}^m = \lim_{N\to\infty}\sum_{j=1}^N \lambda_j a_j^2 .
\end{align*}
The cross terms vanish because
\begin{align*}
\int_\Sigma \varphi_i\varphi_j\,d\mathcal{H}^m = 0
\end{align*}
when $i \neq j$, while the diagonal terms satisfy
\begin{align*}
\int_\Sigma \varphi_j^2\,d\mathcal{H}^m = 1 .
\end{align*}
Using the sign convention in the theorem statement,
\begin{align*}
Q[\phi] = -\int_\Sigma \phi\,L\phi\,d\mathcal{H}^m = -\lim_{N\to\infty}\sum_{j=1}^N \lambda_j a_j^2 .
\end{align*}
This formula is the whole mechanism: positive eigenvalues make negative contributions to $Q$, zero eigenvalues make no contribution, and negative eigenvalues make positive contributions.
[/guided]
[/step]
[step:Identify stability with nonpositivity of the largest eigenvalue]
Assume first that $\lambda_1 \leq 0$. Since the eigenvalues are ordered non-increasingly, $\lambda_j \leq 0$ for every $j \in \mathbb{N}$. Therefore, for every smooth function $\phi: \Sigma \to \mathbb{R}$ with coefficients $(a_j)_{j=1}^\infty$,
\begin{align*}
Q[\phi] = -\sum_{j=1}^\infty \lambda_j a_j^2 \geq 0 .
\end{align*}
Hence $\Sigma$ is stable.
Conversely, suppose $\Sigma$ is stable. Let
\begin{align*}
\varphi_1: \Sigma &\to \mathbb{R}
\end{align*}
be an eigenfunction for $\lambda_1$, normalized by
\begin{align*}
\int_\Sigma \varphi_1^2\,d\mathcal{H}^m = 1 .
\end{align*}
Stability gives $Q[\varphi_1]\geq 0$. The eigenvalue equation $L\varphi_1=\lambda_1\varphi_1$ and the normalization of $\varphi_1$ give
\begin{align*}
Q[\varphi_1] = -\int_\Sigma \varphi_1\,L\varphi_1\,d\mathcal{H}^m = -\lambda_1\int_\Sigma \varphi_1^2\,d\mathcal{H}^m = -\lambda_1 .
\end{align*}
Thus $-\lambda_1 \geq 0$, so $\lambda_1 \leq 0$.
[/step]
[step:Count the negative directions of the second variation]
Let $k \in \mathbb{N}\cup\{0\}$ be the number of positive eigenvalues of $L$, counted with multiplicity. If $k=0$, then the previous step shows that $Q[\phi]\geq 0$ for every smooth function $\phi: \Sigma \to \mathbb{R}$, so the Morse index is $0$.
Assume $k\geq 1$. Define the positive eigenspace
\begin{align*}
E_+ := \operatorname{span}\{\varphi_1,\dots,\varphi_k\}.
\end{align*}
For a nonzero function
\begin{align*}
\phi = \sum_{j=1}^k a_j\varphi_j \in E_+,
\end{align*}
at least one coefficient $a_j$ is nonzero, and $\lambda_j>0$ for every $1\leq j\leq k$. Therefore
\begin{align*}
Q[\phi]
= -\sum_{j=1}^k \lambda_j a_j^2 < 0 .
\end{align*}
Thus $E_+$ is a $k$-dimensional subspace on which $Q$ is negative definite, so the Morse index is at least $k$.
To prove that the Morse index is not larger than $k$, let $V\subset C^\infty(\Sigma)$ be any subspace with $\dim V=k+1$. Consider the linear projection map
\begin{align*}
P_+: V &\to E_+
\end{align*}
defined by $L^2$-[orthogonal projection](/theorems/437) onto $E_+$. Since $\dim V=k+1$ and $\dim E_+=k$, the kernel of $P_+$ contains a nonzero function $\phi\in V$. For this function, all positive-eigenvalue coefficients vanish, so its eigenfunction expansion has the form
\begin{align*}
\phi = \sum_{j=k+1}^\infty a_j\varphi_j
\end{align*}
in $L^2(\Sigma,\mathcal{H}^m)$. Since $\lambda_j\leq 0$ for every $j\geq k+1$, we obtain
\begin{align*}
Q[\phi]
= -\sum_{j=k+1}^\infty \lambda_j a_j^2 \geq 0 .
\end{align*}
Therefore no $(k+1)$-dimensional subspace can be negative definite for $Q$. The Morse index is exactly $k$, the number of positive eigenvalues of $L$ counted with multiplicity.
[/step]
[step:Identify nullity with the dimension of the zero eigenspace]
The nullity of $\Sigma$ is the dimension of the space of smooth Jacobi fields, namely
\begin{align*}
\ker L = \{\phi\in C^\infty(\Sigma): L\phi=0\}.
\end{align*}
By the spectral decomposition, $\ker L$ is exactly the eigenspace corresponding to the eigenvalue $0$. Therefore its dimension is precisely the multiplicity of $0$ as an eigenvalue of $L$. This proves the asserted characterization of stability, Morse index, and nullity.
[/step]