What does the notation $D = \mathrm{diag}(W\cdot1)$ mean in the following excerpt from this paper?
2026-04-04 04:35:27.1775277327
On
What does the notation $D = \mathrm{diag}(W\cdot1)$ mean?
513 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
2
There are 2 best solutions below
2
On
$L$ is a sort of Laplacian matrix, defined by subtracting the original matrix $W$ from the matrix whose diagonal contains its row sums. In other words, $D$ is the diagonal matrix with $D_{ij}=0$ when $i\neq j$ and $D_{ii}=\sum_j W_{ij}$.
The notation "$\operatorname{diag}(v)$" means to make a matrix whose diagonal is the vector $v$, with zeros off the diagonal.
Here, $W\cdot 1$ means the multiplication of $W$ with the vector of ones, which turns out to compute the row sums: $[W1]_i=\sum_j W_{ij}1_j=\sum_{j}W_{ij}$.

When $v=(v_1,\ldots,v_K)^\top\in\Bbb C^K$, one often writes
$$\mathrm{diag}(v)=\begin{pmatrix} v_1 & 0 & \dots & 0 \\ 0 & v_2 & \ddots & \vdots \\ \vdots & \ddots & \ddots& 0 \\ 0 & \dots & 0 & v_K \end{pmatrix} \in\Bbb C^{K\times K}.$$
Here,
$$ v=W\cdot \mathbf{1},$$
where $\mathbf{1}$ means the vector $(1,\ldots,1)^\top\in\Bbb C^K$, so
$$ v_i = \sum_{j=1}^K W_{ij}\cdot 1, \quad i=1,\ldots,K.$$