I have to show that if $T$ is a linear operator such that $T: L^2(\mathbb(R)^n) \to L^2(\mathbb(R)^n)$ and $T(f)(x) = \int_{R^n}f(y)g(x,y)dy$, where $g(x,y)$ is an $L^2$ function, that there is an orthonormal basis that diagonalizes $T$, ie $T(\phi_n) = \lambda_n \phi_n$.
First, I know that if $T$ is compact and symmetric, then such a basis exists. It is easy to show symmetry, but compactness seems difficult. I was thinking, since $T(f)(x)$ is an integral function with respect to y for a fixed x, I could keep x fixed and consider $T$ to be a function in $L^2(\mathbb(R)^n)$. Then, I could use the fact that a bounded sequence in $L^2(\mathbb(R)^n)$ forms a compact set and use Cauchy-Schwarz to show that the sequence $T(f_n)$ converges, implying that T itself is compact for each fixed value of x. However, this proof would rely on considering $T$ to be a function. Any ideas?