Let $\mathbf{X}$ $\in \mathbb{R}^{M \times N}$ be a long matrix, with $M<N$.
Let $\mathbf{Y}$ $\in \mathbb{R}^{M \times N}$ represent $\mathbf{X}$ after each row of $\mathbf{X}$ has been "de-meaned", such that $\mathbf{Y}$ $\mathbf{1}_N^\top$ $=$ $\mathbf{0}_M$. Here, $\mathbf{1}_N$ $\in \mathbb{R}^{N}$ is a vector of $1$s, and $\mathbf{0}_M$ $\in \mathbb{R}^{M}$ is a vector of $0$s.
I want to determine the Jacobian of $\mathbf{Y}$ with respect to $\mathbf{X}$, i.e. the quantity $\frac{\partial \text{vec}(\mathbf{Y})}{\partial \text{vec}(\mathbf{X})}$ $\in \mathbb{R}^{MN \times MN}$ .
Since it is often convenient to use the Kronecker product in the Jacobian, it may be most convenient to explicitly write $\mathbf{Y}$ via the expression:
$\mathbf{Y}$ $=$ $\mathbf{X}$ $-$ $\bigg[ (\frac{1}{N} \ \mathbf{X} \ \mathbf{1}_N^\top) \ \bigotimes \ \mathbf{1}_N^\top \bigg]$
where $\frac{1}{N} \ \mathbf{X} \ \mathbf{1}_N^\top$ $\in$ $\mathbb{R}^{M}$ is the vector containing the means of each row in $\mathbf{X}$.
My concern is how to process $\bigg[ (\frac{1}{N} \ \mathbf{X} \ \mathbf{1}_N^\top) \ \bigotimes \ \mathbf{1}_N^\top \bigg]$ in the calculation of the Jacobian.