# Hilbert space "basis weighting operator." Is it well-defined?

Let $$(e_n) = (e_n)_{n \in \mathbb{N}}$$ be an orthonormal basis for a Hilbert space $$H$$. Let $$(a_n)$$ be an arbitrary sequence of complex numbers. In multiple textbooks, I see an operator $$T:H \to H$$ defined by $$Te_n = a_n e_n$$

Thus $$Tx = \sum_{n=1}^{\infty} a_n \langle x,e_n \rangle e_n$$

Is this operator well-defined?

I can see that if $$(a_n)$$ is a bounded sequence, then the operator is bounded: $$\| Tx \|^2 = \sum_{n=1}^{\infty} |a_n|^2 |\langle x,e_n \rangle|^2 \leq \sup_n |a_n|^2 \sum_{n=1}^{\infty} |\langle x,e_n \rangle|^2 = \|x\|^2$$

But if $$(a_n)$$ is an arbitrary sequence of complex numbers, I don't see why $$\| Tx \|$$ should be finite, i.e., I don't see why the sum $$\sum_{n=1}^{\infty} a_n \langle x,e_n \rangle e_n$$ should converge.

It is not well-defined. Take $$x=\sum \frac 1n e_n$$ which is a convergent series. Then the series defining $$Tx$$ converges iff $$\sum \frac 1n a_ne_n$$ converges iff $$\sum \frac 1 {n^{2}}|a_n|^{2} <\infty$$. Take $$a_n =n$$ to see that this can fail.