Reformulating a vector-matrix expression in terms of laplacian

Let $x_1,\dots,x_N$ be a set of $d\times 1$ column vectors and Let $B$ be a $N\times N$ matrix. Construct the $d\times N$ matrix $X$ as $X=[x_1,\dots,x_N]$ ($x_i$ as columns). Can we re-write the matrix $$L=\sum_{i,j}B_{i,j}(x_i-x_j)(x_i-x_j)^T$$ as $$R=XLX^T$$ where $L$ is the laplacian of $B$ defined as $$L=D-B$$Here $D$ is defined as the diagonal matrix where diagonal entries are given by row-sums of $B$ ( $D_{ii}= \sum_{j}B_{ij}$)

• I believe you can. Do you want to prove this ? The problem is that of weighted Laplacian expression. – Orca May 11 '16 at 5:19
• @Orca yes, please. I am finding it difficult. – dineshdileep May 11 '16 at 5:31
• You're off by a factor of 2, i.e. $$X(D-B)X^T = \frac{1}{2}\sum_{i=1}^N\sum_{j=1}^N B_{ij}(x_i-x_j)(x_i-x_j)^T$$ – greg Jan 12 '18 at 2:38