# Why should we expect the divergence operator to be invariant under transformations?

A lot of the time with vector calculus identities, something that seems magical at first ends up having a nice and unique proof. For the divergence operator, one can prove that it's invariant under a transformation of the coordinate system by actually writing out a rotation from $S$ to $S'$, and calculating $\nabla \cdot$ and $\nabla ' \cdot$ and showing their equality. Or one can prove that $\nabla \cdot \vec{E}=\lim_{r\to 0} \frac{1}{V}\iint_B \vec{E}\cdot d\vec{n}$ where $B$ is the surface of some ball of radius $r$ and $V$ is its volume. However, the first way seems tedious and isn't pretty to look at. The second way is elegant but doesn't feel like as nice of a proof.

How can one prove that the divergence operator gives the same value under a rotation, without using the high-brow integration theorems, and without tediously writing every coordinate out? (even in summation notation, you'd have $n$ equations)

(I'm considering "the definition" of divergence to be $\nabla \cdot \vec{E}=\sum_{i=1}^n \frac{\partial}{\partial x_i} E_i(x_1,x_2,\cdots, x_n)$)

(The invariance condition is $\nabla \cdot \vec{E}(x_1,\cdots, x_n)=\nabla'\cdot \vec{E}'(x_1',\cdots, x_n')$, where $(x_1',\cdots,x_n')=R^{-1}(x_1,\cdots,x_n)$ [an orthogonal rotation change of basis] and $\vec{E}'=R\vec{E}$. In writing this out I think the answer is now staring me in the face.)

The chain rule says if $\vec{y} = R \vec{x}$, $\dfrac{\partial}{\partial x_i} = \sum_j R_{ji} \dfrac{\partial}{\partial y_j}$. Then $$\nabla_x \cdot \vec{E} = \sum_i \dfrac{\partial}{\partial x_i} E_i = \sum_i \sum_j R_{ji} \dfrac{\partial}{\partial y_j} E_i = \sum_j \dfrac{\partial}{\partial y_j} \sum_i R_{ji} E_i = \nabla_y \cdot (R \vec{E})$$