0
$\begingroup$

I am given the following formula

$$ \sum_{i = 1}^{m}\sum_{j = 1}^{k} r_{ij}||x_i - \mu_j||_2 $$

I want to rewrite the norm in basic algebraic terms. If I understand it correctly, is this the correct formula

$$ \sum_{i = 1}^{m}\sum_{j = 1}^{k} r_{ij}((x_i^2 - 2x_i\mu_j + \mu_j^2))^\frac{1}{2} $$

Or is this one correct?

$$ \sum_{i = 1}^{m}\sum_{j = 1}^{k} r_{ij}(x_i^2 - 2x_i\mu_j + \mu_j^2) $$

$\endgroup$
9
  • 1
    $\begingroup$ Neither, but the second is almost right. Where did the $2$ in $2\mu_j^2$ come from? $\endgroup$
    – Integrand
    Aug 25, 2020 at 22:54
  • 1
    $\begingroup$ It goes away @Integrand $\endgroup$ Aug 25, 2020 at 23:01
  • 2
    $\begingroup$ The two as a superscript usually means "square". If you want this two to denote $L_2$ norm, probably better as a subscript $|| \cdot ||_2$. $\endgroup$
    – mjw
    Aug 26, 2020 at 2:52
  • 1
    $\begingroup$ Are $x_i$ and $\mu_j$ vectors or scalars? $\endgroup$
    – mjw
    Aug 26, 2020 at 4:25
  • 1
    $\begingroup$ $||x_i - \mu_j||_2^2 = (x_i - \mu_j) \cdot (x_i - \mu_j) = ||x_i||_2^2 - 2x_i \cdot \mu_j + ||\mu_j||_2^2$ $\endgroup$
    – mjw
    Aug 26, 2020 at 4:27

1 Answer 1

1
$\begingroup$

$$\begin{aligned} \sum_{i=1}^m \sum_{j=1}^k r_{ij} ||x_i - \mu_j||_2 &= \sum_{i=1}^m \sum_{j=1}^k r_{ij} \left[(x_i - \mu_j) \cdot (x_i - \mu_j)\right]^{1/2} \\ &=\sum_{i=1}^m \sum_{j=1}^k r_{ij} \left( ||x_i||_2^2 - 2x_i \cdot \mu_j + ||\mu_j||_2^2 \right)^{1/2} \end{aligned}$$

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .