To my understanding inner product
$(f,g)_{L^2(\mathcal{D})} = \int_\mathcal{D} f(\boldsymbol{x})g(\boldsymbol{x})\,\mathrm{d}\boldsymbol{x},~~\mathcal{D} \subset \mathbb{R}^N$
defines an inner product space when completed by saying that elements of $L^2(\mathcal{D})$ are
.. equivalence classes of those functions, where $f$ is equivalent to $g$ if the Lebesgue integral of $|f-g|^2$ over $\mathcal{D}$ is zero.
-Kreyszig, Introductory Functional Analysis with Applications, p. 62
According to Kreyszig, this guarantees the validity of the norm axiom
$ \| f \| = 0 \Leftrightarrow f = 0$
and I can fully see where this comes from.
What I would like to ask is for what kind of operators $T:L^2 \mapsto L^2$ the statement
$ (f,g)_T = (f,Tg)_{L^2(\mathcal{D})} $
defines an inner product space? Is there any theorems or simple methods to proof that $(\cdot,\cdot)_T$ is an inner product?
In my particular case $T$ is a self-adjoint Hilbert-Schmidt integral operator whose kernel happens to be positive.