[proofplan]
Equip $S_k(\operatorname{SL}_2(\mathbb{Z}))$ with the Petersson Hermitian inner product. The Hecke operators are pairwise commuting and self-adjoint for this inner product, so the problem becomes a finite-dimensional linear algebra statement about a commuting family of [self-adjoint operators](/page/Self-Adjoint%20Operators). We prove the needed [simultaneous diagonalisation](/theorems/2403) result directly by induction on dimension: choose one non-scalar operator, decompose the space into its orthogonal eigenspaces, observe that all other commuting operators preserve those eigenspaces, and continue inside each smaller summand.
[/proofplan]
[step:Translate the Hecke statement into finite-dimensional Hermitian linear algebra]
Let
\begin{align*}
H := S_k(\operatorname{SL}_2(\mathbb{Z}))
\end{align*}
as a complex [vector space](/page/Vector%20Space). The space $H$ is finite-dimensional, and the Petersson inner product gives $H$ the structure of a finite-dimensional Hermitian [inner product space](/page/Inner%20Product%20Space).
We use the standard Hecke facts that the operators
\begin{align*}
T_n: H \to H, \qquad n \in \mathbb{N},
\end{align*}
are complex-linear, pairwise commuting, and self-adjoint with respect to the Petersson inner product. These are the analytic Hecke-operator inputs established before the diagonalisation argument; in the present database this is a cited result not yet in the wiki: self-adjointness and commutativity of Hecke operators on cusp forms for the Petersson inner product.
Thus it remains to prove the following finite-dimensional statement: every countable pairwise commuting family of self-adjoint operators on a finite-dimensional complex Hermitian inner product space has an orthonormal basis of simultaneous eigenvectors.
[/step]
[step:Diagonalize one self-adjoint operator by orthogonal eigenspaces]
[claim:Finite-dimensional self-adjoint operators admit an orthogonal eigenspace decomposition]
Let $V$ be a finite-dimensional complex Hermitian inner product space, and let
\begin{align*}
A: V \to V
\end{align*}
be a self-adjoint complex-linear operator. Then $V$ is the orthogonal direct sum of the eigenspaces of $A$.
[/claim]
[proof]
If $V = \{0\}$, the assertion is empty. Assume $\dim_{\mathbb{C}} V \geq 1$. Since $V$ is finite-dimensional over $\mathbb{C}$, the characteristic polynomial of $A$ has a root $\lambda \in \mathbb{C}$, so there exists $v \in V \setminus \{0\}$ with $Av = \lambda v$. Self-adjointness gives
\begin{align*}
\lambda (v,v)_V = (Av,v)_V = (v,Av)_V = (v,\lambda v)_V = \overline{\lambda}(v,v)_V.
\end{align*}
Since $(v,v)_V > 0$, we have $\lambda = \overline{\lambda}$, so $\lambda \in \mathbb{R}$.
Let
\begin{align*}
E_\lambda := \{u \in V : Au = \lambda u\}
\end{align*}
be the $\lambda$-eigenspace of $A$. We show that $E_\lambda^\perp$ is invariant under $A$. If $w \in E_\lambda^\perp$ and $e \in E_\lambda$, then self-adjointness and $\lambda \in \mathbb{R}$ give
\begin{align*}
(Aw,e)_V = (w,Ae)_V = (w,\lambda e)_V = \lambda (w,e)_V = 0.
\end{align*}
Hence $Aw \in E_\lambda^\perp$. The restriction
\begin{align*}
A|_{E_\lambda^\perp}: E_\lambda^\perp \to E_\lambda^\perp
\end{align*}
is again self-adjoint with respect to the restricted Hermitian inner product. By induction on $\dim_{\mathbb{C}} V$, the space $E_\lambda^\perp$ is the orthogonal direct sum of the eigenspaces of $A|_{E_\lambda^\perp}$. Adding $E_\lambda$ gives an orthogonal direct sum decomposition of $V$ into eigenspaces of $A$.
[/proof]
[/step]
[step:Prove simultaneous diagonalisation for a commuting self-adjoint family]
Let $V$ be a finite-dimensional complex Hermitian inner product space, and let
\begin{align*}
A_n: V \to V, \qquad n \in \mathbb{N},
\end{align*}
be pairwise commuting self-adjoint complex-linear operators. We prove by induction on $d := \dim_{\mathbb{C}} V$ that $V$ has an orthonormal basis consisting of simultaneous eigenvectors for every $A_n$.
If $d = 0$, the empty basis has the required property. If $d \geq 1$ and each $A_n$ is a scalar multiple of the identity map $\operatorname{id}_V: V \to V$, then every orthonormal basis of $V$ is a simultaneous eigenbasis.
Otherwise, choose $r \in \mathbb{N}$ such that $A_r$ is not a scalar multiple of $\operatorname{id}_V$. By the preceding claim,
\begin{align*}
V = \bigoplus_{\lambda \in \sigma(A_r)} E_\lambda
\end{align*}
as an orthogonal direct sum, where
\begin{align*}
E_\lambda := \{v \in V : A_r v = \lambda v\}
\end{align*}
and $\sigma(A_r)$ denotes the finite set of eigenvalues of $A_r$. Since $A_r$ is not scalar, at least two of these eigenspaces are nonzero, and every nonzero $E_\lambda$ has dimension strictly smaller than $d$.
For every $n \in \mathbb{N}$ and every $v \in E_\lambda$, commutativity gives
\begin{align*}
A_r(A_n v) = A_n(A_r v) = A_n(\lambda v) = \lambda A_n v.
\end{align*}
Thus $A_n v \in E_\lambda$, so each $E_\lambda$ is invariant under every $A_n$. The restricted maps
\begin{align*}
A_n|_{E_\lambda}: E_\lambda \to E_\lambda
\end{align*}
remain pairwise commuting and self-adjoint with respect to the restricted Hermitian inner product. By the induction hypothesis, each nonzero $E_\lambda$ has an orthonormal basis consisting of simultaneous eigenvectors for all restricted operators $A_n|_{E_\lambda}$. Taking the union of these orthonormal bases over the mutually orthogonal eigenspaces $E_\lambda$ gives an orthonormal basis of $V$ consisting of simultaneous eigenvectors for every $A_n$.
[guided]
The point is to diagonalize the family without trying to list the infinitely many operators one at a time. We argue by dimension. Let $d := \dim_{\mathbb{C}} V$. If $V = \{0\}$, the empty basis is a valid orthonormal basis. If every operator $A_n$ is already of the form $A_n = c_n \operatorname{id}_V$ for some $c_n \in \mathbb{C}$, then every nonzero vector is an eigenvector for every $A_n$, so any orthonormal basis works.
Now suppose at least one operator is not scalar. Choose $r \in \mathbb{N}$ such that $A_r$ is not a scalar multiple of $\operatorname{id}_V$. Since $A_r$ is self-adjoint, the self-adjoint diagonalisation claim applies and gives an [orthogonal decomposition](/theorems/436)
\begin{align*}
V = \bigoplus_{\lambda \in \sigma(A_r)} E_\lambda,
\end{align*}
where
\begin{align*}
E_\lambda := \{v \in V : A_r v = \lambda v\}
\end{align*}
is the $\lambda$-eigenspace. The operator $A_r$ is not scalar, so more than one eigenspace occurs; hence every nonzero eigenspace in this decomposition has dimension strictly smaller than $\dim_{\mathbb{C}} V$.
We next check why the other operators can be restricted to these eigenspaces. Fix $n \in \mathbb{N}$, $\lambda \in \sigma(A_r)$, and $v \in E_\lambda$. Since the family commutes, $A_rA_n = A_nA_r$. Therefore
\begin{align*}
A_r(A_n v) = A_n(A_r v) = A_n(\lambda v) = \lambda A_n v.
\end{align*}
This says exactly that $A_n v \in E_\lambda$. Hence each eigenspace $E_\lambda$ is invariant under every operator $A_n$.
Because $E_\lambda$ is invariant under $A_n$, the restriction
\begin{align*}
A_n|_{E_\lambda}: E_\lambda \to E_\lambda
\end{align*}
is well-defined. The restrictions still commute because the original operators commute on all of $V$. They are also self-adjoint with respect to the restricted inner product: for $u,w \in E_\lambda$,
\begin{align*}
(A_n|_{E_\lambda}u,w)_{E_\lambda} = (A_nu,w)_V = (u,A_nw)_V = (u,A_n|_{E_\lambda}w)_{E_\lambda}.
\end{align*}
Thus the induction hypothesis applies on each nonzero $E_\lambda$. It gives an orthonormal basis of each $E_\lambda$ consisting of simultaneous eigenvectors for every restricted operator. Since the eigenspaces are mutually orthogonal and their direct sum is all of $V$, the union of those bases is an orthonormal basis of $V$. A vector lying in one of these bases is an eigenvector for every restricted operator, and therefore for every original operator $A_n: V \to V$.
[/guided]
[/step]
[step:Apply simultaneous diagonalisation to the Hecke operators]
Apply the simultaneous diagonalisation result to the Hermitian space
\begin{align*}
V := H = S_k(\operatorname{SL}_2(\mathbb{Z}))
\end{align*}
and the commuting self-adjoint family
\begin{align*}
A_n := T_n: H \to H, \qquad n \in \mathbb{N}.
\end{align*}
We obtain an orthonormal basis
\begin{align*}
(f_1,\dots,f_d)
\end{align*}
of $H$, where $d = \dim_{\mathbb{C}} H$, such that each $f_j$ is an eigenvector of every $T_n$. Therefore, for every $j \in \{1,\dots,d\}$ and every $n \in \mathbb{N}$, there exists $\lambda_{j,n} \in \mathbb{C}$ satisfying
\begin{align*}
T_n f_j = \lambda_{j,n} f_j.
\end{align*}
Since $H = S_k(\operatorname{SL}_2(\mathbb{Z}))$, this is precisely a basis of cusp forms that are simultaneous eigenvectors for all Hecke operators.
[/step]