Using Eichler-Selberg trace formula to compute dimension of modular forms? Is it possible to use Eichler-Selberg trace formula to compute the dimension of modular forms of weight $k$ for $SL(2,\mathbb Z)$? This was computed by classical methods such as Riemann-Roch.
 A: An adelic reference for $GL(2, \mathbb{Z})$ is also "Traces of Hecke operators" by Knightly and Li. You choose matrix coefficent at the infinite place and the characteristic function $GL_2(\mathbb{Z}_p)$ times the center, and plug it into the Arthur trace formula. They do that almost for weight $k \geq 3$, but they work with matrix coefficient. This gives the dimension formula. This is likely to be more fruitful for generalization to higher rank or deeper level, where not always a classical treatment is available.
A: Yes; here's an elaboration of my comments.
The Eichler-Selberg formula (see Theorem 2 of Zagier's http://people.mpim-bonn.mpg.de/zagier/files/google/es-trace-sl2z/fulltext.pdf which appears in Lang's book on Modular Forms) states that the trace of the $m$-th Hecke operator on the space of cusp forms of weight $k$ for $SL_2({\Bbb Z})$ equals 
$$ 
-\frac 12 \sum_{t=-\infty}^{\infty} P_k(t,m) H(4m-t^2) -\frac 12 \sum_{dd^{\prime}=m} \min(d,d^{\prime})^{k-1}.
$$ 
Here $H(n)=0$ if $n<0$, $H(0)=-\frac{1}{12}$ and for positive $n$, $H(n)$ is a weighted class number for positive definite binary quadratic forms of discriminant $-n$.  Note that $H(3)=\frac 13$ and $H(4)=\frac 12$.  The quantity $P_k(t,m)$ (for $|t|\le 2\sqrt{m}$) is defined as follows: find $\rho$ such that $|\rho|=\sqrt{m}$ and the real part of $\rho$ is $t/2$.  Then (with the obvious interpretation if $\rho$ is real)
$$ 
P_k(t,m) = \frac{\rho^{k-1}-\overline{\rho}^{k-1}}{\rho-\overline{\rho}}.
$$
The dimension of the space of cusp forms of weight $k$ corresponds to the $m=1$ case of the above formula.  Note that $H(4-t^2)=0$ for $|t|>2$ and so the formula gives, using the values for $H(0)$, $H(3)$ and $H(4)$ 
$$ 
-\frac 12 + \frac{1}{12} P_k(2,1) -\frac{1}{3} P_k(1,1) - \frac 14 P_k(0,1).
$$ 
It's a simple matter to compute that $P_k(2,1)=(k-1)$, $P_k(1,1) = \sin(\pi(k-1)/3)/\sin(\pi/3)$ and $P_k(2,1) = \sin (\pi(k-1)/2)$.  This is the desired dimension formula. 
For the sake of completeness, it is worth pointing out that the Selberg trace formula establishes an analogous formula for a weighted trace of Hecke eigenvalues of Maass forms.  Here one obtains class numbers and regulators of real quadratic fields rather than the imaginary fields above.  From the trace formula one can obtain an asymptotic for the number of Maass forms with eigenvalue up to some point $T$ which is the analog of the dimension formula above.  Establishing such a formula was one of Selberg's motivations in developing the trace formula.  
