# Diagonal of Hilbert--Schmidt operator

Suppose $U\in HS$, Hilbert--Schmidt operators on $V = L^2(\mathbb{R}^n)$. There is a natural isomorphism between HS operators and elements in $W = L^2(\mathbb{R}^n\times\mathbb{R}^n)$, in particular, for every $U\in HS$ there is a $u\in W$ such that $$[U\varphi](x) = \int_{\mathbb{R}^n} u(x,y)\varphi(y) dy.$$

Suppose now that $U$ is also trace-class. Informally (i.e., in physics), $$\operatorname{Tr} U = \int_{\mathbb{R}^3} u(x,x)dx.$$

Question: To what extent is the latter statement rigorous? What confuses me is that $u$ is defined only up to a set of measure zero and the integral is taken over such a set. Is there some notion of trace operator that can be used here, which gives the "correct diagonal"? Taking the limit of successively narrow "strips" along the diagonal?

I can "prove" it as follows: Let $\{f_\mu\}$ be an orthonormal basis for $V$, say Hermite functions, such that $\{f_\mu\otimes f_\nu\}$ is an orthonormal basis for $W$, and we have an expansion $$u = \sum_{\mu\nu} u_{\mu\nu} f_\mu\otimes f_\nu.$$ Now we have $$\int u(x,x) dx = \sum_{\mu\nu} u_{\mu\nu} \int f_\mu(x) f_{\nu}(x) = \sum_{\mu\nu} u_{\mu\nu} \langle{f_\mu,f_\nu}\rangle = \sum_\mu u_{\mu\mu} = \operatorname{Tr} U.$$

-

(I am not sure if this is satisfactory.) A trace class operator can be represented in the form $\sum (\cdot, u_k)v_k$ with $\sum \|u_k\|\,\|v_k\|<\infty$. If you take a trace class integral operator of this form and write down its kernel, it will have the formula $\sum \overline{u_k(y)}\, v_k(x)$. For the diagonal you get $\sum \overline{u_k(x)}\, v_k(x)$, which is defined for almost all $x$. From this representation, one can try to find definitions of the diagonal that are independent on the choice of $u_k, v_k$, say, of the type as you mentioned.