Let $A:\mathcal{D}(A)\subset\mathcal{H}\rightarrow\mathcal{H}$ be a self-adjoint operator on a Hilbert space $\mathcal{H}$, with $A\geq I$, and let $\mathcal{N}\subset\mathcal{H}$ be a finite-dimensional subspace. Define \begin{equation} \mathcal{D}(A_{\mathcal{N}})=\left\{u\in\mathcal{D}(A):\langle Au,\eta\rangle=0\;\;\forall\eta\in\mathcal{N}\right\}. \end{equation} Prove that $\mathcal{D}(A_{\mathcal{N}})$ is dense in $\mathcal{H}$ if and only if $\mathcal{N}\cap\mathcal{D}(A)=\{0\}$, that is, if $\mathcal{N}$ has trivial intersection with the domain of the original operator.
I tried to prove this statement by using the fact that, since $A$ is self-adjoint and $0$ is in its resolvent set, then $\mathrm{ran}\,A=\mathcal{H}$, but to no avail for now.