TITLE: Relation between sum of squared norm and squared norm of sum of vectors?
QUESTION [6 upvotes]: Is there a relation between
$||\sum_{i=1}^n \mathbf x_i||^2$ and $\sum_{i=1}^n||\mathbf x_i||^2$ where each $\mathbf x_i \in R^N$, and $||\cdot||$ is $L_2$ norm?

REPLY [6 votes]: If the $x_i$ are orthogonal, the two terms are equal. In the general case,
$$||\sum_{i=1}^n \mathbf x_i||^2 = \sum_{i=1}^n||\mathbf x_i||^2 + \sum_{i\neq j}x_i.x_j$$
Proof :
$$||\sum_{i=1}^n \mathbf x_i||^2 = (\sum_{i=1}^n \mathbf x_i)(\sum_{i=1}^n \mathbf x_i) = \sum_{i=1}^nx_i.x_i + \sum_{i\neq j}x_i.x_j = \sum_{i=1}^n||\mathbf x_i||^2 + \sum_{i\neq j}x_i.x_j$$
We have also an inequality, which could be obtained by applying $n$ times Cauchy-Schwarz inequality :
$$||\sum_{i=1}^n \mathbf x_i||^2 = (x_{11} + ... + x_{n1})^2 + ... + (x_{1n} + ... + x_{nn})^2$$
$$||\sum_{i=1}^n \mathbf x_i||^2\leqslant n (x_{11}^2 + ... + x_{n1}^2) + ... + n (x_{1n}^2 + ... + x_{nn}^2)$$
$$||\sum_{i=1}^n \mathbf x_i||^2\leqslant n \sum_{i=1}^n||\mathbf x_i||^2$$