This is an exercise in Terence Tao's notes on spectral theory
Let $(X, \mu)$ be a measure space with a countable generated $\sigma$-algebra and $m: X \to \mathbb{R}$ a measurable function. Let $D$ be the space of all $f \in L^2(X)$ such that $mf \in L^2(X)$. Show that the operator $L: D \to L^2$ defined by $Lf:= mf$ is a densely defined self-adjoint operator.
The self-adjoint part is fine, and it is clear to me that if $m$ were bounded then I can just see that simple functions belong to $D$ making it densely defined. However, I feel like since $m$ is just measurable it's possible to make it very non-integrable on lots of sets so that $D$ might not be dense. Can anyone give me an idea for why $D$ must be a dense subset of $L^2$?