# Expansion and simplification of inner product involving a sum

I am not understanding how to reduce this inner product:

$\Vert x-y\Vert^{2}=\langle x-\sum\limits _{j=1}^{n}\beta_{j}e_{j},x-\sum\limits _{j=1}^{n}\beta_{j}e_{j}\rangle$

To something like:

$\left\Vert x\right\Vert ^{2}+2Re\left(\sum\left\langle x,e_{j}\right\rangle \beta_{j}e_{j}\right)\bar{\beta}_{j}+\sum\left|\beta_{j}e_{j}\right|^{2}$

I am okay with the first and third terms, but I cannot get the middle term. Here is my work:

$\langle x-\sum\limits _{j=1}^{n}\beta_{j}e_{j},x-\sum\limits _{j=1}^{n}\beta_{j}e_{j}\rangle=\langle x, x \rangle + \left\langle x,-\sum\limits _{i=1}^{n}\beta_{j}e_{j}\right\rangle +\left\langle -\sum\limits _{i=1}^{n}\beta_{j}e_{j},x\right\rangle +\left\langle \sum\limits _{i=1}^{n}\beta_{j}e_{j},\sum\limits _{i=1}^{n}\beta_{j}e_{j}\right\rangle$

For the 2nd and 3rd terms of this, I use properties of inner products to get:

$-\sum\limits _{j=1}^{n}\left(\beta_{j}\left\langle x,e_{j}\right\rangle +\bar{\beta}_{j}\bar{\left\langle x,e_{j}\right\rangle }\right)$

But I am not sure how to reduce this any further (or if it is even correct). Any input is appreciated.

• $\beta_j\langle x, e_j\rangle + \overline{\beta_j}\overline{\langle x,e_j\rangle} = 2\operatorname{Re} \beta_j\langle x,e_j\rangle$, so you get "something like" your expression. Not quite the same, but that's right, as written, your expression is incorrect. – Daniel Fischer Feb 13 '14 at 1:06
• Like Daniel said: $z+\bar{z}=2Rez$ for all $z\in \mathbb{C}$. – user56706 Feb 13 '14 at 1:09