I'm trying to follow the maths in a paper on modelling population dynamics and have come unstuck on the calculation of the vec-permutation matrix.
Let $p$ be the number of patches and $s$ be the number of stages. For my example, both $s$ and $p$ are $= 2$.
The vec-permutation matrix has dimension $(sp × sp)$ and is given by:
$P(s,p) = \sum_{i=1}^{s}\sum_{j=1}^{p}E_{ij}\otimes E_{ij}^T$
The authors state $E_{ij}$ is an $s × p$ matrix with a $1$ in the $(i, j)$ position and zeros elsewhere and $\otimes$ denotes the Kronecker matrix product.
From the paper, it should be the $4$ x $4$ matrix:
$P(2,2)= \begin{pmatrix} 1 & 0 & 0 & 0\\ 0 & 0 & 1 & 0\\ 0 & 1 & 0 & 0\\ 0 & 0 & 0 & 1 \end{pmatrix} $
I don't understand the $E_{ij}$ matrix. I thought every matrix position could be considered $ij$.
Maybe looking at the $3 \times 3$ case will be helpful. Note that $$ \sum_{i,j} E_{ij} \otimes E_{ij} = \left[\begin{array}{ccc|ccc|ccc} 1&0&0&0&1&0&0&0&1\\ 0&0&0&0&0&0&0&0&0\\ 0&0&0&0&0&0&0&0&0\\ \hline 0&0&0&0&0&0&0&0&0\\ 1&0&0&0&1&0&0&0&1\\ 0&0&0&0&0&0&0&0&0\\ \hline 0&0&0&0&0&0&0&0&0\\ 0&0&0&0&0&0&0&0&0\\ 1&0&0&0&1&0&0&0&1 \end{array} \right] $$ If we take the transpose of each $3 \times 3$ block, we get the desired matrix $$ \sum_{i,j} E_{ij} \otimes E_{ij}^T = \left[\begin{array}{ccc|ccc|ccc} 1&0&0&0&0&0&0&0&0\\ 0&0&0&1&0&0&0&0&0\\ 0&0&0&0&0&0&1&0&0\\ \hline 0&1&0&0&0&0&0&0&0\\ 0&0&0&0&1&0&0&0&0\\ 0&0&0&0&0&0&0&1&0\\ \hline 0&0&1&0&0&0&0&0&0\\ 0&0&0&0&0&1&0&0&0\\ 0&0&0&0&0&0&0&0&1 \end{array} \right] $$