Hi: I'm reading some introductory notes on hilbert spaces and there is a step in a proof that I don't follow. I will put the exact statement below. If someone could explain how it is obtained, it's appreciated. Note that commans between two terms when they have < and > around them denotes the innner product. Also, $e_{n}$ for $n = 1,2,3,\ldots$ is a complete orthonormal sequence in a Hilbert space $H$ and $x$ is in $H$.
Proof: Observe that
\begin{eqnarray*} 0 <= || x - \sum_{n=1}^{m} <x,e_{n}>e_{n}) ||^2 & = & \left< x - \sum_{n=1}^{m} <x,e_{n}>e_{n}, x - \sum_{n=1}^{m} <x,e_{n}>e_{n} \right> \\ & = & \left< x, x - \sum_{n=1}^{m} <x,e_{n}>e_{n} \right> - \sum_{n=1}^{m} <x, e_{n}> \left < e_{n}, x - \sum_{n=1}^{m} <x,e_{n}>e_{n} \right > \\ & = & ||x||^2 - \sum_{n=1}^{m} |<x, e_{n}>|^2 \end{eqnarray*}
I understand the first two lines of above. My question is how one goes from the second to the last line to the last line. Thanks for your help.