Norm squared imaginary number

I have a function $f_0 = \sum_i b_i c_i$ where $b_i$ are orthonormal functions and $c_i$ are constants and we calculated the following thing:

${||f-f_0||}^2 = {||f||}^2 + \sum_j {|c_j|}^2 - \sum_j c_j <{f,b_j}> - \sum_j \bar{c_j} <b_j,f>$.

I wonder where the term with the complex conjugated c comes from and where the 2 from the calculation of the squared is lost.

• Carefully expand the left side of your equation, as $\langle f-f_0,f-f_0\rangle$, and remember that $\langle cx,y\rangle=\bar c\langle x,y\rangle$. – Andreas Blass Nov 16 '15 at 17:41
• I am not sure if I got it right: $\sum (f-f_0)^*(f-f_0) = \sum (\bar{f} - \bar{f_0})(f-f_0) = {||f||}^2 + {||f_0||}^2 - \sum \bar{f_0}f - \sum \bar{f}f_0$ Is that what you meant? – Darius Nov 16 '15 at 17:51
• We haven't been told that $\{b_i\}$ is an orthonormal sequence. – GEdgar Nov 16 '15 at 17:53
• No, I meant to expand the inner product, which would produce inner products (scalars). In your equation, many of the terms are just products of functions and wouldn't be scalars, so much of what you wrote is undefined. – Andreas Blass Nov 16 '15 at 17:54
• Sorry, I'm kind of getting stuck on this topic and don't know exactly what you mean.. – Darius Nov 16 '15 at 17:56