Why need densily definedness for definition of $T^*$ for unbounded operator Let $T: \operatorname{dom}(T) \to \mathcal H$ a linear operator such that $\operatorname{dom}(T)$ is densely defined, i.e. $\overline{\operatorname{dom}(T)} = \mathcal H$ ($\ast$). 
Define $\operatorname{dom}(T^*) : = \{y \in \mathcal H: x \mapsto \langle Tx,y \rangle $is continuous on $\operatorname{dom}(T)\}$. For $y \in \operatorname{dom}(T^*)$, we can extend $x \mapsto \langle Tx,y \rangle$ to a continuous mapping on $\mathcal H$ by Riesz in the form of $x \mapsto \langle x,z \rangle$ for some $z \in \mathcal H$. Here it says, that we need the densely definedness of $\operatorname{dom}(T)$ for $z$ to be unique. Set $T^{*}y := z$ to define the adjoint operator for T.
Q: I actually don't see why we need ($\ast$) for $z$ to be unique because there is a Hahn-Banach version for Hilbert spaces: Let $L \subset \mathcal H$ be a linear subspace $g \in L^*$ $\Rightarrow$ there exists a unique $f \in \mathcal H^*$: $f|_{L} = g$ and $\|f\|= \|g\|$. Since $\operatorname{dom}(T) \subset \mathcal H$ is linear space and $y \in (\operatorname{dom}(T))^*$ I don't see why the preconditions aren't fulfilled.
 A: Denseness is necessary for $T^*y$ to be unique. Suppose the domain is not dense, that means there must exist a non-zero vector $z$ orthogonal to the entire domain.
If $y\in\mathrm{dom}(T^*)$ and $f\in H^*$ is an extension of $x\mapsto \langle Tx,y\rangle$ you have $f+\langle\cdot,z\rangle$ also is an extension of the above mapping (as $\langle x,z\rangle=0$ for all $x\in \mathrm{dom}(T)$). These two extensions are not the same, and so uniqueness fails.
A: An element $z$ is in the domain of the adjoint of  $T : \mathcal{D}(T) \subseteq H\rightarrow H$ iff there exists $y$ such that
$$
              \langle Tx,z\rangle = \langle x,y\rangle,\;\;\;\forall x\in\mathcal{D}(T).
$$
The element $y$ is not unique if $\mathcal{D}(T)$ is not dense in $H$ because, if $w\perp \mathcal{D}(T)$, then the above implies
$$
           \langle Tx,z\rangle = \langle x,y+w\rangle ,\;\;\;\forall x\in\mathcal{D}(T).
$$
If $\mathcal{D}(T)$ is dense, then $y$ is unique if it exists and $T^*z = y$ makes sense. The domain of $T^*$ will then be a subspace of $H$, and $T^*$ will be linear on $\mathcal{D}(T^*)$.
