0
$\begingroup$

I know that the following is true: $$1/2\sum_{ij} w_{ij}\|x_i-x_j \|_2^2=tr(XLX^\top)$$ where $L=D-W$ is the laplacian matrix of $W$, and $D$ is the degree matrix of $W$.

However i like to know if we can do something similar for the following as well: $$\sum_{ij} w_{ij}x_i^\top x_j$$

1 Answers 1

2

Presumably, $w_{ij}$ is supposed to be an entry of $L$, and $x_i$ a column of $X$. If that's the case, we can rewrite $$ \sum_{ij} w_{ij} x_i^Tx_j = \sum_{ij} [L]_{ij}[X^TX]_{ij} = \operatorname{tr}(LX^TX) = \operatorname{tr}(XLX^T) $$ so, it seems that the right side of your equation is actually the condensed form of the sum you've just written.