0
$\begingroup$

What does the notation $D = \mathrm{diag}(W\cdot1)$ mean in the following excerpt from this paper?

$\endgroup$
  • 2
    $\begingroup$ The answers given below are right. I just want to point out that that paper provides a good example of what not to do when expressing ideas mathematically—failing to define notations before using them (what's $m_i$)?), using different font variants in a way that obscures the underlying type ($\mathbf{W}_{ij}$ and $\mathbf{x}(t)$ are actually scalars), and failing to change human-readable words from italic to roman in equations ("diag", "seg", "otherwise"). $\endgroup$ – K B Dave Jul 10 '19 at 23:10
  • $\begingroup$ X-posted: scicomp.stackexchange.com/q/33037/20417 $\endgroup$ – Rodrigo de Azevedo Jul 11 '19 at 10:29
3
$\begingroup$

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.$$

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ Ewww, writing $1$ to mean a vector is so gross . . . surely there’s something better $\endgroup$ – gen-ℤ ready to perish Jul 11 '19 at 0:08
  • $\begingroup$ @ChaseRyanTaylor $$\sum_{j=1}^{n} e_j?$$ :P $\endgroup$ – Xander Henderson Jul 11 '19 at 1:26
  • $\begingroup$ @XanderHenderson Ahhhhh much better. Maybe call it . . . $E$. It’s not your fault though! $\endgroup$ – gen-ℤ ready to perish Jul 11 '19 at 1:27
  • $\begingroup$ @ChaseRyanTaylor $E$ could work. It might cause some ambiguity with, for example, a matrix containing only $1$s... maybe $E_{m\times 1}$ if we are worried about such an ambiguity (drop the subscript if not)? $\endgroup$ – Xander Henderson Jul 11 '19 at 1:28
  • $\begingroup$ @XanderHenderson What a headache $\endgroup$ – gen-ℤ ready to perish Jul 11 '19 at 1:29
4
$\begingroup$

$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}$.

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ It might be worth noting that (in contrast to your answer) the $1$ in the paper is bolded. $\endgroup$ – Xander Henderson Jul 11 '19 at 1:25
  • $\begingroup$ Totally. Don't know what I was looking at... $\endgroup$ – cwindolf Jul 11 '19 at 14:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.