Operator acting on ONB decomposition Consider the following setting: Given

*

*a real Hilbert space $X$ with orthonormal basis $(e_k)_{k\in\mathbb{N}}$,

*a linear (unbounded) operator $T$ with dense domain $D\subset X$ and that

*$\{e_k\colon k\in\mathbb{N}\}\subset D$.

Let $x=\sum_{k=0}^\infty\alpha_ke_k\in X$. Is it true that $Tx=\sum_{k=0}^\infty\alpha_kTe_k$? If not, what are suitable assumptions for it to be true?
If $T$ was bounded this would clearly be true.
I have thought about closedness: Letting $x_n=\sum_{k=0}^n\alpha_ke_k$ we have $x_n\to x$ and $x_n\in D$. To conclude $Tx_n\to Tx$ I however still need that $Tx_n$ is convergent in $X$, which I don't think needs to be true in general.
What would be a suitable assumption on the operator $T$?
 A: In general this is not true:
The case $x_n\rightarrow x$ and $Tx_n\rightarrow y$ does not imply that $Tx = y$ in general:
Let $Y\subseteq l^2$ be the subspace
$$Y = \{(\alpha_k)_k\in l^2: \lim_{k\rightarrow \infty}k\alpha_k\text{ exists and is finite.}\}$$
Define $T:Y\rightarrow l^2$ by $T(\sum \alpha_ke_k) = (\lim_{k\rightarrow \infty}k\alpha_k)e_1$ then $T$ is linear and unbounded and furthermore $Te_k = 0$ for every $k$.
However if we let $x = \sum \frac{1}{k}e_k$ then $Tx = e_1$ and hence
$$T(\sum_{k=1}^{\infty}\beta_ke_k) = \sum_{k=1}^{\infty}\alpha_ke_k$$
does not imply that $\alpha_ke_k = \beta_kTe_k$ in general even though $e_k$ are eigenvectors.

Closed does not imply that $T(\sum_1^n \alpha_ke_k)\rightarrow \sum_{1}^{\infty} \alpha_kTe_k$ even though $\sum_1^\infty \alpha_ke_k$ exists.
Let $T(\sum \alpha_k e_k) = \sum k\alpha_k e_k$, then as a multiplication operator $T$ is closed. However if we let $x_n = \sum_{k=1}^n \frac{1}{k}e_k$ we know that $x_n\rightarrow \sum_{k=1}^{\infty}\frac{1}{k}e_k$ in $l^2$ while $Tx_n = \sum_{k=1}^{n}e_k$ diverges.
