Let $x_0,x_1,...,x_k$ be $k+1$ vectors. Find the number of multiplications in $\|x_0\|^2_2+\dotsb+\|x_k\|_2^2$

28 Views Asked by At

Let $x_0,x_1,...,x_k$ be $k+1$ vectors, in which each $x_i (i = 0,1,...,k)$ has $n+i$ components ($n$ is a fixed value). Find the number of multiplications in $$\|x_0\|^2_2+\dotsb+\|x_k\|_2^2.$$

In the first vector, to calculate the norm-2 I have to do $n$ multiplications (for the squares). Then I have to do one more, for when I square the norm. So $n+1$ for the first vector, and then $n+2$ for the second, and so on, until $n+k+1$. This means I have

$$(n+1)+(n+2)+(n+3)+\dotsb+(n+k+1) = n(k+1)+\sum_{i=1}^{k+1}i$$ multiplications. Is this correct?