Apologies for the vague title, but there's quite a bit of information in this question and I wasn't sure how to condense it down into a single title. In this question, we wish to devise a proof for the following claim:
Let $H$ be a Hilbert space (over a field $K$) under the inner product $\langle\cdot,\cdot\rangle$. Let $||\cdot||$ denote the norm induced by $\langle\cdot,\cdot\rangle$. Suppose now that $M = \lbrace e_k\in H:k\in\mathbb{N}\rbrace$ is an orthonormal subset of $H$. Suppose also that $x\in H$ is such that \begin{equation} ||x|| = \sum_{k = 1}^{\infty}|\langle x, e_k\rangle|^2\tag{1}\label{1} \end{equation} Then \begin{equation} x = \sum_{k = 1}^\infty\langle x, e_k\rangle e_k\tag{2}\label{2} \end{equation}
My attempt
Given that \eqref{1} holds, we may apply Parseval's theorem to conclude that $M$ is total in $H$. Therefore, $\exists\lbrace c_k\in K:k\in\mathbb{N}\rbrace$ such that $$ x = \sum_{k = 1}^\infty c_ke_k $$ Fix hence $j\in\mathbb{N}$, and observe that, by the linearity of the inner product $$ x = \bigg{\langle}\sum_{k = 1}^\infty c_ke_k, e_j\bigg{\rangle} = \sum_{k = 1}^\infty c_k\langle e_k, e_j\rangle $$ Now, since $M$ is an orthonormal subset of $H$, $\langle e_k, e_j\rangle = \delta_{jk}$, where $\delta$, here, denotes the Kronecker delta. Therefore, indeed, $c_j = \langle x, e_j\rangle$, and \eqref{2} holds, as required.Provided Solution
Since $L = \mathrm{span}(M)$ is dense in $H$ (by the totality of $M$), we have that $Px$, the projection of $x\in H$ onto $L$, is given by $$ Px = \sum_{k = 1}^\infty\langle x, e_k\rangle e_k $$ and satisfies $||Px||^2 = ||x||^2$. Therefore, by the (generalization of the) Pythagorean theorem, we have that $||Px||^2 = ||x||^2 + ||x - Px||^2\implies||x - Px||^2 = 0$, so $$ x = Px = \sum_{k = 1}^\infty\langle x, e_k\rangle e_k $$ as required.My question
Right, so my question comes from the fact that I wasn't entirely sure whether or not the provided solution utilizes a different approach to mine as a consequence of the fact that my working is invalid, or as a consequence of the fact that the method seen in the provided solution is more efficient. I figured that if my working was at all invalid, it'd be as a consequence of my claim that \begin{equation} \bigg{\langle}\sum_{k = 1}^\infty c_ke_k, e_j\bigg{\rangle} = \sum_{k = 1}^\infty c_k\langle e_k, e_j\rangle\tag{3}\label{3} \end{equation} In particular, the trouble comes in the form of proving that \begin{equation} \bigg{\langle}\lim_{n\to\infty}\sum_{k = 1}^nc_ke_k, e_j\bigg{\rangle} = \lim_{n\to\infty}\bigg{\langle}\sum_{k = 1}^nc_ke_k, e_j\bigg{\rangle}\tag{4}\label{4} \end{equation} Which boils down to proving that $\langle y, e_j\rangle$ is continuous in $y\in H$. This can be achieved simply by noticing that $\langle y, e_j\rangle$ is a bounded, and thus continuous, linear functional in $y$, meaning that, indeed, $\eqref{4}$, holds, and thus so does \eqref{3}. I'm pretty convinced therefore that my working is correct, but nevertheless my question remains: are both solutions valid?Any answers are appreciated.