Let $K$ be a non-arch local field (I'm only interested in the char 0 case), let $\mathbb{G}$ be a connected reductive group over $K$ and let $G=\mathbb{G}(K)$. If $V$ is a smooth irreducible complex representation of $G$ and if $H$ is the Hecke algebra of locally constant complex-valued functions on $G$ with compact support (fix a Haar measure on $G$ to make $H$ an algebra under convolution), then $V$ is naturally an $H$-module, and every $h\in H$ acts on $V$ via a finite rank operator and hence has a trace.


It is my understanding that in this connected reductive situation, a theorem of Harish-Chandra says that this trace function $t:H\to\mathbb{C}$ can actually be expressed as


$$t(h)=\int\_G tr(g)h(g) dg$$


for $tr:G\to\mathbb{C}$ an $L^1$ function, called the trace of $V$.


If $V$ is finite-dimensional then $tr$ is the usual trace. However I realised earlier this week that I do not know one single explicit example of this function if $V$ is infinite-dimensional. I just spent 20 minutes trying to fathom out what I guessed was probably the simplest non-trivial example: if $G=GL(2,K)$ and $V$ is, say, an unramified principal series representation. I failed :-( I could compute the trace of $h$ for various explicit $h$ (typically supported in $GL(2,R)$, $R$ the integers of $K$) but this didn't seem to get me any closer to an actual formula: in particular, although I could figure out $t$ on various functions I couldn't figure out $tr$ on any elements of $G$. On the other hand I imagine that this sort of stuff is completely standard, if you know where to look.


If $\mu\_1$ and $\mu\_2$ are unramified characters of $K^\times$ and $V$ is the associated principal series representation of $GL(2,K)$, then what is $tr(g)$ for $g$, say, a diagonal matrix? Or $g$ a unipotent matrix? 


[EDIT: Alexander Braverman points out that I have over-stated Harish-Chandra's result: $t$ is only locally $L^1$. Furthermore one has to be a little careful---more careful than I was at least---because $t$ is only defined via some integrals so one could change it on a set of measure zero---hence in some sense asking to evaluate $t$ at an explicit point makes no sense. However he, in his answer, shows how to make sense of my question anyway, as well as answering it.]


[EDIT: Loren Spice points out that my paranthetical char 0 comment is actually an assumption in Harish-Chandra's result, and that apparently local integrability is still open in char $p$. I didn't make a very good job of stating H-C's theorem at all!]



Explicit formula for the trace of an unramified principal series representation of $GL(n,K)$, $K$ $p$-adic.
First, let us formulate the theorem of Harish-Chandra in a little more precise manner:
it is a priori obvious that the character of $V$ is well-defined as a distribution. Now the theorem says that this distribution is given by a locally $L^1$-function which is well defined and is locally constant on an open dense subset of $G$ (but there is no good way to define
on the whole of $G$). For example for principal series the function will be well defined
on the open subset of regular semi-simple elements. What you can prove is that if such an element $g$ is not split, then the value of the character of an unramified principal series representation at $g$ is just equal to $0$.
If $g$ is split, then up to conjugacy it lies in the standard split torus and the character
is equal to the Weyl group average of the original character $\chi:T\to {\mathbb C}^\*$ 
from which the principal series representation was induced (up to the standard
"$\rho$-shift").


