Schwarz inequality

$ \def \EN {\quad \mbox{and} \quad} \def \OF {\quad \mbox{or} \quad} \def \hieruit {\quad \Longrightarrow \quad} $ Inclining towards Linear Algebra, but with the theory of point clouds in mind, we will redefine the inner product of two vectors as: $$ (\vec{a} \cdot \vec{b}) := \sum_k w_k a_k b_k $$ It can be shown easily that such an inner product obeys all of the usual rules: \begin{eqnarray*} (\vec{a} \cdot \vec{b}) = (\vec{b} \cdot \vec{a}) \\ (\vec{a} \cdot ( \vec{b} + \vec{c}) ) = (\vec{a} \cdot \vec{b} ) + (\vec{a} \cdot \vec{c} ) \\ (\vec{a} \cdot \lambda \vec{b} ) = \lambda (\vec{a} \cdot \vec{b} ) \\ (\vec{a} \cdot \vec{a}) \ge 0 \end{eqnarray*} For the last rule to be obeyed, it is necessary that masses $w_k$ be positive (or zero). Schwartz inequality can now be conjectured for this inner product: $$ (\vec{a} \cdot \vec{b})^2 \le (\vec{a} \cdot \vec{a}) (\vec{b} \cdot \vec{b}) $$ Proof: $$ (\lambda \vec{a} - \vec{b} \cdot \lambda \vec{a} - \vec{b} )^2 \ge 0 \hieruit $$ $$ \lambda^2 (\vec{a} \cdot \vec{a} ) - 2 \lambda ( \vec{a} \cdot \vec{b} ) + ( \vec{b} \cdot \vec{b} ) \ge 0 $$ This is a quadratic inequality in $\lambda$. In order for this inequality to hold, its discriminant must be negative or zero: $$ 4 ( \vec{a} \cdot \vec{b} )^2 - 4 ( \vec{a} \cdot \vec{a} ) ( \vec{b} \cdot \vec{b} ) \le 0 \hieruit $$ $$ (\vec{a} \cdot \vec{b})^2 \le (\vec{a} \cdot \vec{a}) (\vec{b} \cdot \vec{b}) $$ Which completes the proof. Returning now to our original problem, define for example: $$ \vec{a} = (x_1 , x_2 , ... , x_k , ... , x_N) \EN \vec{b} = (1 , 1 , ... , 1 , ... , 1) $$ Then: $$ (\vec{a} \cdot \vec{b}) = \sum_k w_k x_k \EN (\vec{a} \cdot \vec{a}) = \sum_k w_k x_k^2 \EN (\vec{b} \cdot \vec{b}) = \sum_k w_k = 1 $$ Therefore: $$ \left( \sum_k w_k x_k \right)^2 \le \left( \sum_k w_k x_k^2 \right) \hieruit \sum_k w_k x_k^2 - \left( \sum_k w_k x_k \right)^2 \ge 0 $$ This result is equivalent with our previous finding that: $$ \sum_k w_k (x_k - \overline{x})^2 \ge 0 $$ New results are obtained when applying Schwarz inequality to the quantity known formerly as cross correllation moment. For the sake of simplicity, the midpoint is set as the origin $(0,0)$ of the coordinate system. Now define: $$ \vec{a} = (x_1 , x_2 , ... , x_k , ... , x_N) \EN \vec{b} = (y_1 , y_2 , ... , y_k , ... , y_N) $$ Then: $$ (\vec{a} \cdot \vec{b}) = \sum_k w_k x_k y_k = \sigma_{xy} $$ $$ (\vec{a} \cdot \vec{a}) = \sum_k w_k x_k^2 = \sigma_{xx} \EN (\vec{b} \cdot \vec{b}) = \sum_k w_k y_k^2 = \sigma_{yy} $$ Therefore, according to Schwarz inequality, the following relationship must hold: $$ \sigma_{xy}^2 \le \sigma_{xx} \sigma_{yy} \OF \sigma_{xx} \sigma_{yy} - \sigma_{xy}^2 \ge 0 $$ As a consequence, the following quantity is bound like a (co)sine-function: $$ \rho := \frac{\sigma_{xy}}{\sqrt{\sigma_{xx} \sigma_{yy}}} \qquad \mbox{where} \qquad 0 \le \left| \rho \right| \le 1 $$ The thus defined quantity $\rho$ has already been mentioned as the cross-correlation, in a narrower sense.