I was reading Andrew Ng's ML lecture notes on K-mean clustering, in which the distortion function is defined as follow $$J(c,\mu) = \sum^m_{i=1} || x^{(i)} - \mu_{c^{(i)}}||^2$$
I am puzzled about the $L_2$ norm, since $|| x^{(i)} - \mu_{c^{(i)}}||^2 $ would imply $\sum^m_{i=1} (x^{(i)} - \mu_{c^{(i)}})^2$ and this means that there would be two summations $\sum_{i=1}^m$ in the entire expression.
I am sensing that I have misunderstood something crucial here. Please point out the error. Thanks.
UPDATE: the problem has a given a training set $\{x^{(1)}, ..., x^{(m)}\}$, where $x^{(i)} \in \mathbb{R}^n$ and the cluster centroids are $\mu_1, \mu_2,...\mu_k \in \mathbb{R}^n$