I was reading "Applied Probability and Statistical Methods" by Canavos and I came across this demonstration: ∑k=1N (xk-x̄)xk divided by ∑k=1N (xk-x̄)^2 is equal to ∑k=1N (xk-x̄)(xk-x̄) divided by ∑k=1N (xk-x̄)^2, which all equals to one. It is the numerator which stumps me, as an x̄ is added seemingly out of nowhere, symplifying the sumation to one.
Why can you add x̄ at that point? How is it equal?
The sum $\sum( x_i - \bar{x}) $ vanishes since $$\sum( x_i - \bar{x}) = \sum x_i - n\cdot \bar{x} = \sum x_i - n\cdot \frac1n\sum x_i = \sum x_i - \sum x_i=0.$$
It follows that $$\bar{x}\sum( x_i - \bar{x})=0 ,$$from which your equality follows.