[proofplan]
We verify the eigenvalue formula by direct computation. For each pair $(k, \ell)$ with $k, \ell \in \{1, \ldots, m\}$, we construct an explicit candidate eigenvector whose entries are products of sines evaluated at multiples of $k\pi h$ and $\ell\pi h$. Applying the five-point stencil to this vector and using the trigonometric identity $\sin(\theta - \phi) - 2\sin\theta + \sin(\theta + \phi) = 2\sin\theta(\cos\phi - 1)$, we show that the stencil acts as scalar multiplication by $\lambda_{k,\ell} = -4(\sin^2\frac{k\pi h}{2} + \sin^2\frac{\ell\pi h}{2})$. We then verify that boundary terms vanish and that the $m^2$ eigenvectors so constructed are linearly independent, accounting for all eigenvalues of the $m^2 \times m^2$ matrix $A$.
[/proofplan]
[step:Construct the candidate eigenvector for each pair $(k, \ell)$]
Since the [Equivalence of Orderings](/theorems/1366) shows that reordering grid points is an orthogonal conjugation $A^* = P^\top A P$ that preserves eigenvalues, we may work in the natural ordering without loss of generality.
For each pair $(k, \ell)$ with $k, \ell \in \{1, \ldots, m\}$, define the abbreviations $\alpha := k\pi h$ and $\beta := \ell\pi h$, and define the vector $v^{(k,\ell)} \in \mathbb{R}^{m^2}$ by assigning to the grid point $(i, j)$ the value
\begin{align*}
v_{i,j}^{(k,\ell)} := \sin(i\alpha)\sin(j\beta), \qquad i, j = 1, \ldots, m.
\end{align*}
Since $k, \ell \in \{1, \ldots, m\}$ and $h = \frac{1}{m+1}$, we have $0 < k\pi h < \pi$ and $0 < \ell\pi h < \pi$. For $i \in \{1, \ldots, m\}$, the argument $i\alpha = ik\pi h \in (0, m k\pi h) \subset (0, \pi m \cdot \frac{m}{m+1})$, so $\sin(i\alpha) > 0$ for all such $i$ (since $i\alpha \in (0, k\pi \frac{m}{m+1}) \subset (0, k\pi)$ and $k \leq m$, each factor $\sin(i\alpha)$ is well-defined and the vector $v^{(k,\ell)}$ is nonzero).
[guided]
Our goal is to find the eigenvalues of $A$ explicitly. The standard technique for structured matrices arising from finite difference discretisations on rectangular grids is to guess a separable eigenvector — one whose $(i,j)$ entry factors as a function of $i$ alone times a function of $j$ alone. The natural candidates are products of sines, since the boundary conditions force the eigenvector to vanish at $i = 0$, $i = m+1$, $j = 0$, and $j = m+1$.
Since the [Equivalence of Orderings](/theorems/1366) shows that reordering grid points is an orthogonal conjugation $A^* = P^\top A P$ that preserves eigenvalues, we may work in the natural ordering without loss of generality.
For each pair $(k, \ell)$ with $k, \ell \in \{1, \ldots, m\}$, define the abbreviations $\alpha := k\pi h$ and $\beta := \ell\pi h$, and define the vector $v^{(k,\ell)} \in \mathbb{R}^{m^2}$ by assigning to the grid point $(i, j)$ the value
\begin{align*}
v_{i,j}^{(k,\ell)} := \sin(i\alpha)\sin(j\beta), \qquad i, j = 1, \ldots, m.
\end{align*}
Why sines specifically? The Dirichlet boundary condition $u = 0$ on $\partial\Omega$ means the eigenvector must vanish at $i = 0$, $i = m+1$, $j = 0$, and $j = m+1$. The function $\sin(i\alpha)$ vanishes at $i = 0$ automatically. At $i = m+1$, we have $\sin((m+1)\alpha) = \sin((m+1)k\pi h) = \sin(k\pi) = 0$ since $(m+1)h = 1$. The same holds for $\sin(j\beta)$. So the boundary conditions are satisfied by construction.
The vector $v^{(k,\ell)}$ is nonzero because for $i, j \in \{1, \ldots, m\}$, the arguments $i\alpha$ and $j\beta$ lie strictly between $0$ and $k\pi$ (resp. $\ell\pi$), and the sine function is positive on $(0, \pi)$. In particular, $v_{1,1}^{(k,\ell)} = \sin(\alpha)\sin(\beta) > 0$.
[/guided]
[/step]
[step:Apply the five-point stencil and use the second-difference trigonometric identity]
The five-point stencil applied to $v^{(k,\ell)}$ at interior grid point $(i, j)$ gives
\begin{align*}
(Av^{(k,\ell)})_{i,j} &= v_{i-1,j}^{(k,\ell)} + v_{i+1,j}^{(k,\ell)} + v_{i,j-1}^{(k,\ell)} + v_{i,j+1}^{(k,\ell)} - 4v_{i,j}^{(k,\ell)}.
\end{align*}
Substituting the definition $v_{i,j}^{(k,\ell)} = \sin(i\alpha)\sin(j\beta)$ and grouping by the $x$- and $y$-direction differences:
\begin{align*}
(Av^{(k,\ell)})_{i,j} &= \sin(j\beta)\bigl[\sin((i-1)\alpha) - 2\sin(i\alpha) + \sin((i+1)\alpha)\bigr] \\
&\quad + \sin(i\alpha)\bigl[\sin((j-1)\beta) - 2\sin(j\beta) + \sin((j+1)\beta)\bigr].
\end{align*}
We apply the trigonometric identity: for any $\theta, \phi \in \mathbb{R}$,
\begin{align*}
\sin(\theta - \phi) - 2\sin\theta + \sin(\theta + \phi) = 2\sin\theta(\cos\phi - 1).
\end{align*}
This identity follows from the sum-to-product formula $\sin(\theta - \phi) + \sin(\theta + \phi) = 2\sin\theta\cos\phi$. Applying it with $(\theta, \phi) = (i\alpha, \alpha)$ for the first bracket and $(\theta, \phi) = (j\beta, \beta)$ for the second:
\begin{align*}
(Av^{(k,\ell)})_{i,j} &= \sin(j\beta) \cdot 2\sin(i\alpha)(\cos\alpha - 1) + \sin(i\alpha) \cdot 2\sin(j\beta)(\cos\beta - 1) \\
&= \sin(i\alpha)\sin(j\beta)\bigl[2(\cos\alpha - 1) + 2(\cos\beta - 1)\bigr] \\
&= v_{i,j}^{(k,\ell)} \cdot \bigl[2\cos\alpha - 2 + 2\cos\beta - 2\bigr].
\end{align*}
[guided]
The key algebraic step is recognising that the five-point stencil, when applied to a separable function $\sin(i\alpha)\sin(j\beta)$, decouples into two independent one-dimensional second differences — one in $i$ (with $j$ held fixed) and one in $j$ (with $i$ held fixed).
We apply the trigonometric identity: for any $\theta, \phi \in \mathbb{R}$,
\begin{align*}
\sin(\theta - \phi) - 2\sin\theta + \sin(\theta + \phi) = 2\sin\theta(\cos\phi - 1).
\end{align*}
To verify this identity, use the addition formula: $\sin(\theta + \phi) + \sin(\theta - \phi) = 2\sin\theta\cos\phi$. Therefore $\sin(\theta - \phi) - 2\sin\theta + \sin(\theta + \phi) = 2\sin\theta\cos\phi - 2\sin\theta = 2\sin\theta(\cos\phi - 1)$.
Applying this with $(\theta, \phi) = (i\alpha, \alpha)$ for the $x$-direction bracket:
\begin{align*}
\sin((i-1)\alpha) - 2\sin(i\alpha) + \sin((i+1)\alpha) = 2\sin(i\alpha)(\cos\alpha - 1).
\end{align*}
Similarly, with $(\theta, \phi) = (j\beta, \beta)$ for the $y$-direction bracket:
\begin{align*}
\sin((j-1)\beta) - 2\sin(j\beta) + \sin((j+1)\beta) = 2\sin(j\beta)(\cos\beta - 1).
\end{align*}
Substituting back:
\begin{align*}
(Av^{(k,\ell)})_{i,j} &= \sin(j\beta) \cdot 2\sin(i\alpha)(\cos\alpha - 1) + \sin(i\alpha) \cdot 2\sin(j\beta)(\cos\beta - 1) \\
&= \sin(i\alpha)\sin(j\beta)\bigl[2(\cos\alpha - 1) + 2(\cos\beta - 1)\bigr] \\
&= v_{i,j}^{(k,\ell)} \cdot \bigl[2\cos\alpha - 2 + 2\cos\beta - 2\bigr].
\end{align*}
Notice how the separable structure of $v_{i,j}^{(k,\ell)}$ was essential: without it, the stencil would not factor into a scalar times the original vector.
[/guided]
[/step]
[step:Reduce the eigenvalue to the stated form using the double-angle identity]
We apply the double-angle identity $\cos\phi = 1 - 2\sin^2\frac{\phi}{2}$, which gives $2(\cos\phi - 1) = -4\sin^2\frac{\phi}{2}$. Therefore
\begin{align*}
2\cos\alpha - 2 + 2\cos\beta - 2 &= -4\sin^2\frac{\alpha}{2} - 4\sin^2\frac{\beta}{2} \\
&= -4\left(\sin^2\frac{k\pi h}{2} + \sin^2\frac{\ell\pi h}{2}\right) = \lambda_{k,\ell}.
\end{align*}
We have shown that $(Av^{(k,\ell)})_{i,j} = \lambda_{k,\ell} \, v_{i,j}^{(k,\ell)}$ for all interior grid points $i, j = 1, \ldots, m$.
[/step]
[step:Verify that boundary terms are consistent with the stencil]
At boundary-adjacent grid points (e.g., $i = 1$ or $i = m$), the five-point stencil references values at $i = 0$ or $i = m+1$, which correspond to the Dirichlet boundary. We verify that the candidate eigenvector is consistent:
- At $i = 0$: $v_{0,j}^{(k,\ell)} = \sin(0 \cdot \alpha)\sin(j\beta) = 0$.
- At $i = m+1$: $v_{m+1,j}^{(k,\ell)} = \sin((m+1)\alpha)\sin(j\beta) = \sin((m+1)k\pi h)\sin(j\beta) = \sin(k\pi)\sin(j\beta) = 0$, since $(m+1)h = 1$ and $k \in \mathbb{Z}$.
The same argument applies at $j = 0$ and $j = m+1$. Therefore the boundary terms in the stencil contribute zero, which is exactly the value prescribed by the Dirichlet condition $u = 0$ on $\partial\Omega$. The eigenvalue equation $(Av^{(k,\ell)})_{i,j} = \lambda_{k,\ell} \, v_{i,j}^{(k,\ell)}$ holds at all grid points, including those adjacent to the boundary.
[/step]
[step:Confirm that the $m^2$ eigenvectors account for all eigenvalues of $A$]
The matrix $A$ has size $m^2 \times m^2$, so it has exactly $m^2$ eigenvalues (counted with multiplicity). We have produced $m^2$ pairs $(k, \ell)$ with $k, \ell \in \{1, \ldots, m\}$, each yielding a nonzero eigenvector $v^{(k,\ell)}$.
To confirm that these eigenvectors are linearly independent, observe that $v^{(k,\ell)}$ has the tensor product structure $v^{(k,\ell)} = s_k \otimes s_\ell$, where $s_k \in \mathbb{R}^m$ is defined by $(s_k)_i = \sin(ik\pi h)$ for $i = 1, \ldots, m$. The vectors $\{s_1, \ldots, s_m\}$ are the eigenvectors of the $m \times m$ tridiagonal matrix $T$ with diagonal entries $-2$ and off-diagonal entries $1$, and they form an orthogonal set (since $T$ is symmetric and has distinct eigenvalues $2\cos(k\pi h) - 2$ for $k = 1, \ldots, m$). Therefore the $m^2$ tensor products $\{s_k \otimes s_\ell : k, \ell = 1, \ldots, m\}$ form an orthogonal basis of $\mathbb{R}^{m^2}$, confirming linear independence.
Since we have $m^2$ linearly independent eigenvectors with eigenvalues $\lambda_{k,\ell}$, these are all the eigenvalues of $A$.
[guided]
Why do we need this step? Exhibiting $m^2$ eigenvector-eigenvalue pairs does not immediately prove we have found *all* eigenvalues — it is logically possible that two distinct pairs $(k, \ell) \neq (k', \ell')$ produce the same eigenvector, or that the eigenvectors are linearly dependent (so the associated eigenvalues might not be distinct). We need to verify that our $m^2$ eigenvectors span $\mathbb{R}^{m^2}$.
The key observation is the tensor product structure. The matrix $A$ acts on vectors indexed by pairs $(i, j)$, and the five-point stencil decomposes as $A = T \otimes I + I \otimes T$, where $T \in \mathbb{R}^{m \times m}$ is the tridiagonal matrix with diagonal entries $-2$ and off-diagonal entries $1$, and $\otimes$ denotes the Kronecker product. The eigenvectors of $T$ are $s_k$ with $(s_k)_i = \sin(ik\pi h)$, with eigenvalue $\mu_k = 2\cos(k\pi h) - 2$.
Since $T$ is real symmetric, its eigenvectors $\{s_1, \ldots, s_m\}$ are orthogonal. The eigenvalues $\mu_k = 2\cos(k\pi h) - 2$ are distinct because $\cos$ is strictly decreasing on $(0, \pi)$ and the arguments $k\pi h$ for $k = 1, \ldots, m$ are distinct points in $(0, \pi)$.
The eigenvectors of $A = T \otimes I + I \otimes T$ are precisely the tensor products $s_k \otimes s_\ell$ with eigenvalue $\mu_k + \mu_\ell = \lambda_{k,\ell}$. The $m^2$ vectors $\{s_k \otimes s_\ell\}$ form an orthogonal basis of $\mathbb{R}^{m^2}$ (since the Kronecker product of two orthogonal sets is orthogonal), so these account for all eigenvalues of $A$.
[/guided]
[/step]