What is the norm of a complex vector?

I have two arrays $a$ and $b$ containing complex values. Now I one of my target operations is the following: $$||a-b||$$ The result should be a single real number. Now I am a bit confused how to apply the norm here: Should I rather calculate first the norm of each value in the array, and then apply the formula above: $$a[i] = \sqrt(a[i].real^2+a[i].imag^2)$$ $$||a[i]-b[i]||$$ or should I first subtract the values, and then apply the formula: $$tmp = a[i]-b[i]$$ $$||tmp|| = \left(\sum \sqrt(tmp.real^2 + tmp.imag^2)^n\right)^{\frac{1}{n}}$$? What is intended by the operation shown above?

• The usual sense is: You subtract. $a-b=(c_1,c_2,...,c_n)$.Then $\|a-b\|=\sqrt{\sum_{k=1}^{n}|c_k|^2}$. Each $c_k=a_k+ib_k$ is a complex number. Therefore $|c_k|=\sqrt{a_k^2+b_k^2}$. Putting all together you get $\|a-b\|=\sqrt{\sum_{k=1}^{n}(a_k^2+b_k^2)}$. – OR. Apr 3 '15 at 13:04

For any complex vector $$\|c\|=\sqrt{\langle c,c\rangle}=\sqrt{\sum_{i=1}^nc_i\overline{c}_i}.$$