Definition of divergence of a matrix valued function defined over matrices

30 Views Asked by At

I am trying to figure out the right notion of divergence for matrix valued functions defined on matrices.

Suppose I have $f:\mathbb R^{m\times n}\to\mathbb R^{m\times n}$ defined elementwise by $(f(X))_{ij} = X_{ij}^2$ for $X=(X_{ij})_{i\leq m, j\leq n}$.

So really, $f$ is elementwise squaring. I want to understand what $div(f)$ is, if at all there is a proper notion of this.

I know the definition when $f:\mathbb R^m\to\mathbb R^m$, as in that case, $div(f) =\sum_{i=1}^m \partial f_i(x)/\partial x_i$. But when the input and output are matrices, do we just vectorize them and apply the definition of $div$? That doesn't seem right as it seemingly destroys the matrix structure.

Thanks for any help.