Unbounded operators defined only on dense subdomain of Hilbert space in QM? I am relatively new to quantum mechanics. In a set of notes I am using, the following is a description of an aspect of some operators corresponding to observables. The notes state the following:

"Observables corresponding to unbounded operators are not defined on the whole of $\mathcal{H}$ but only on dense subdomains of $\mathcal{H}$ that are not invariant under the action of the observables. Such non-variance makes expectation values, uncertainities and commutation relations not well defined on the whole of $\mathcal{H}$."

There are a few things I don't follow. Why would it be a property of 'unbounded operators' that it is not defined on the whole of $\mathcal{H}$? Also how does invariance come into this? And how does non-invariance influence expectation values, uncertainties and commutation relations as stated?
 A: Some relevant self-adjoint operators in QM, like orthogonal projectors, are bounded actually, but these are very few in QM. Boundedness is equivalent to the fact that the range of values the observable, i.e., the spectrum $\sigma(A)$ of the associated operator $A$,  is bounded in view of the spectral radius identity,
$$||A||= \sup\{|\lambda| \:|\: \lambda \in \sigma(A)\}\:.$$
However, most observables attain arbitrarily large values (think of position or momentum observables). 
In turn, the definition of adjoint operator and the closed graph theorem prove that boundedness of a self-adjoint operator $A :D(A) \to \cal H$ is equivalent to $D(A)=\cal H$. This explains why most observables in QM are represented by self-adjoint operators whose domain 
--  always dense, otherwise the adjoint is not defined --
does not coincide with the whole Hilbert space. 
Regarding invariance of the domain, i.e., the property 
$$A(D(A))\subset D(A)$$
 the text is a bit wrong, since the expectation value $<A>_\psi$ is not affected from non-invariance of the domain. It satisfies, for a pure state defined by the unit vector $\psi$,
$$<A>_\psi = \langle \psi|A \psi \rangle\:.\tag{0}$$
You see that $\psi \in D(A)$ is sufficient to guarantee the validity of that identity.
Concerning uncertainties $\Delta A_\psi$, the quoted text may be right since they satisfy $$\Delta A_\psi^2 = \langle \psi|A^2 \psi \rangle - \langle \psi|A \psi \rangle^2\tag{1}$$ 
and you see that the first therm on the right-hand side needs that $A(A\psi)$ be well-defined, that is $A\psi \in D(A)$ for $\psi \in D(A)$. Here invariance of the domain matters instead.
Finally, regarding commutation relations, as they involve composition of operators $AB$ and $BA$, corresponding crossed invariance properties  should hold:
 $$A(D(B)) \subset D(A)\quad \mbox{and}\quad A(D(A)) \subset D(B)\:.$$
Some final comments are in order. Strictly speaking, (0) is not the definition of  expectation value of $A$ and (1) is not the definition of  uncertainty of $A$,  in the pure state defined by the unit vector $\psi$, also if they are important properties. The true definitions respectively are
$$<A>_\psi := \int_{\sigma(A)} \lambda d\langle\psi|P^{(A)}(\lambda)\psi\rangle\tag{2}$$
and
$$\Delta A_\psi^2 := \int_{\sigma(A)} (\lambda- <A>_\psi)^2 d\langle\psi|P^{(A)}(\lambda)\psi\rangle\tag{3}$$
where I have introduced the spectral measure of $A$, $P^{(A)}$. The right-hand side of (3) is well-defined provided 
$$\int_{\sigma(A)} \lambda^2 d\langle\psi|P^{(A)}(\lambda)\psi\rangle < +\infty\tag{4}$$
and this is another way to write $\psi \in D(A)$. So, even in this case, invariance of $D(A)$ is not necessary. Obviously (1) is valid from (3) when 
$\psi \in D(A^2)$ and is false in general though it holds into a weaker form
$$\Delta A_\psi^2 = \langle A\psi|A \psi \rangle - \langle \psi|A \psi \rangle^2\tag{1'}\:.$$
Similarly $<A>_\psi$ is well defined if $\psi \in D(\sqrt{|A|})$ which is a weaker condition than $\psi \in D(A)$.
A: The domain of Hermite functions is invariant under the action of the harmonic oscillator Hamiltonian and the position and momentum operators.
It is true that for unbounded operators, "expectation values, uncertainities and commutation relations not well defined on the whole of $H$" but this is not due to the lack of invariance.
