If $A$ is densely defined symmetric operator, $\lambda-A$ is onto $X \implies \lambda \in \rho(A)$ I want to understand the following statement:

If $\lambda \in \mathbb{C}\setminus\mathbb{R}$ and $A$ is densely defined symmetric operator ($A:D(A)\to X$), $\lambda-A$ is onto $X \implies \lambda \in \rho(A)$

I think there is a missing assumption: that $A$ has to be closed. But I'm not entirely sure;
I know that if $A$ is symmetric, then with given $\lambda$, $\lambda-A$ is injective, so this means $\lambda - A$ is a bijection onto $X$. Now if $A$ was closed, then we would have a conclusion. 
But it's not included in the assumption, so I'm wondering if I'm just missing something, or assumption really need closedness?

One does not need closedness. Let $z=x+iy$, then we compute
$$ \Vert (A-z)\phi \Vert^2 = \Vert (A-x)\phi\Vert^2 + y^2 \Vert \phi \Vert^2 + \langle (A-x)\phi , -iy \phi \rangle + \langle -i y \phi , (A-x) \phi \rangle $$
Now use the fact that $A$ is symmetric to show the last two terms cancel. Then you end up with
$$ \Vert (A-z)\phi \Vert^2 \geq y^2 \Vert \phi \Vert^2.$$
Thus, if $\psi = (A-z)\phi$ you have
$$ \Vert (A-z)^{-1}\psi \Vert \leq \frac{1}{\vert y \vert} \Vert \psi \Vert.$$
I.e. $(A-z)^{-1}$ is bounded.
