Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Problem is as follows:

In two dimensions, show that the divergence transforms as a scalar under rotations.

Aim is to determine $\bar{v}_{y}$ and $\bar{v}_{z}$, and show that

$\frac{\partial\bar{v}_{y}}{\partial\bar{y}}$ + $\frac{\partial\bar{v}_{z}}{\partial\bar{z}} = \frac{\partial v_{y}}{\partial y} + \frac{\partial v_{y}}{\partial z}$

I'm not sure at all why the above shows that divergence transforms as a scalar under rotations. It was a part of the question (given as a hint) so I was just trying to solve it without really understanding what I was doing. Any help on clarifying why I do need to show that would be appreciated.

Since this is a rotation in two dimensions (in the $y$ and $z$ axis),

$ \left( {\begin{array}{cc} \bar{v}_{y} \\ \bar{v}_{z} \end{array} } \right) $ = $ \left( {\begin{array}{cc} \cos\phi & \sin\phi \\ -\sin\phi & \cos\phi \end{array} } \right) $ $ \left( {\begin{array}{cc} {v}_{y} \\ v_{z} \end{array} } \right) $.

Expanding this out, I found that $\bar{v}_{y} = v_{y}.\cos\phi + v_{z}.\sin\phi$ and $\bar{v}_{z} = -v_{y}.\sin\phi + v_{z}.\cos\phi$.

Solving for $v_{y}$ and $v_{z}$, by multiplying $\bar{v}_{y}$ and $\bar{v}_{z}$ by $\sin\phi$ and $\cos\phi$, I was able to use the $\sin^{2}\phi + \cos^{2}\phi = 1$ identity to get

$v_{z} = \bar{v}_{y}.\sin\phi + \bar{v}_{z}.\cos\phi$ and

$v_{y} = \bar{v}_{y}.\cos\phi - \bar{v}_{z}.\sin\phi$.

Next, I found the components of the original equation:

The first partial derivative in the equation was determined as

$\frac{\partial \bar{v}_{y}}{\partial \bar{y}} = (\frac{\partial \bar{v}_{y}}{\partial y})(\frac{\partial y}{\partial \bar{y}}) + (\frac{\partial \bar{v}_{y}}{\partial z})(\frac{\partial z}{\partial \bar{y}})$

and the second as

$\frac{\partial \bar{v}_{z}}{\partial \bar{z}} = (\frac{\partial \bar{v}_{z}}{\partial y})(\frac{\partial y}{\partial \bar{z}}) + (\frac{\partial \bar{v}_{z}}{\partial z})(\frac{\partial z}{\partial \bar{z}})$.

At this point, I become stuck because I cannot seem to be able to find $\partial \bar{v}_{y}$ and $\partial \bar{v}_{z}$ with respect to $\partial y$ and $\partial z$.

How to I continue? Thanks in advance.

share|cite|improve this question
up vote 3 down vote accepted

Divergence of a vector is a scalar; and a scalar is a constant and doesn't change under rotations, so if you transform all your variables under a rotation and then calculate the divergence of the vector in the new coordinates, the divergence must remain unchanged.

First find $\bar v_y$ and $\bar v_z$ from the matrix transformation relation:

$ \left( {\begin{array}{cc} \bar{v}_{y} \\ \bar{v}_{z} \end{array} } \right) $ = $ \left( {\begin{array}{cc} \cos\phi & \sin\phi \\ -\sin\phi & \cos\phi \end{array} } \right) $ $ \left( {\begin{array}{cc} {v}_{y} \\ v_{z} \end{array} } \right) \to$

$$\bar{v}_{y} = v_{y}.\cos\phi + v_{z}.\sin\phi$$ $$\bar{v}_{z} = -v_{y}.\sin\phi + v_{z}.\cos\phi$$

Then find their derivative w.r.t. $\bar y$ and $\bar z$, as is needed: $$\frac{\partial \bar v_y}{\partial \bar y}=\frac{\partial v_y}{\partial \bar y}\cos \phi+\frac{\partial v_z}{\partial \bar y}\sin \phi \tag{1}$$

expanding the right hand side derivatives $\frac{\partial {v}_{y}}{\partial \bar{y}}$ and $\frac{\partial {v}_{z}}{\partial \bar{y}}$ as:

$$\cases{\frac{\partial {v}_{y}}{\partial \bar{y}} = (\frac{\partial {v}_{y}}{\partial y})(\frac{\partial y}{\partial \bar{y}}) + (\frac{\partial{v}_{y}}{\partial z})(\frac{\partial z}{\partial \bar{y}}) \\ \frac{\partial {v}_{z}}{\partial \bar{y}} = (\frac{\partial {v}_{z}}{\partial y})(\frac{\partial y}{\partial \bar{y}}) + (\frac{\partial{v}_{z}}{\partial z})(\frac{\partial z}{\partial \bar{y}})} \tag{2}$$ we should now find the derivatives $\frac{\partial y}{\partial \bar y}$ and $\frac{\partial z}{\partial \bar y}$. Using the rotation formula in 2D to write $y$ and $z$ in terms of $\bar y$ and $\bar z$, we can find $\frac{\partial y}{\partial \bar y}$ and $\frac{\partial z}{\partial \bar y}$ : $$\cases{ y=\bar y \cos \phi-\bar z \sin \phi\\z=\bar y \sin \phi+ \bar z \cos \phi}\to\cases{\frac{\partial y}{\partial \bar y}=\cos \phi\\ \frac{\partial z}{\partial \bar y}=\sin \phi}\tag{3}$$ now substituting $(3)$ in $(2)$ and then $(2)$ in $(1) $, we will have $$\frac{\partial \bar v_y}{\partial \bar y}=\left(\frac{\partial v_y}{\partial y}\cos\phi+\frac{\partial v_y}{\partial z}\sin\phi \right )\cos\phi + \left( \frac{\partial v_z}{\partial y}\cos\phi+\frac{\partial v_z}{\partial z}\sin\phi \right)\sin \phi$$

doing the same for $\frac{\partial \bar v_z}{\partial \bar z}$, we will arrive at:

$$\frac{\partial \bar v_z}{\partial \bar z}=-\left(-\frac{\partial v_y}{\partial y}\sin\phi+\frac{\partial v_y}{\partial z}\cos\phi \right )\sin\phi + \left(- \frac{\partial v_z}{\partial y}\sin\phi+\frac{\partial v_z}{\partial z}\cos\phi \right)\cos \phi$$

Now just sum up the two terms$\frac{\partial\bar{v}_{y}}{\partial\bar{y}}$ and $\frac{\partial\bar{v}_{z}}{\partial\bar{z}}$ and apply $\sin^{2}\phi + \cos^{2}\phi = 1$ to arrive at the final result: $$\frac{\partial\bar{v}_{y}}{\partial\bar{y}} + \frac{\partial\bar{v}_{z}}{\partial\bar{z}} = \frac{\partial v_{y}}{\partial y} + \frac{\partial v_{y}}{\partial z}$$

share|cite|improve this answer
Thanks, I understand why I am meant to show the equivalence. However, would you mind explaining your working? I'm afraid I'm having difficulty following from when you expanded the r.h.s. derivatives. – achacttn Jul 28 '13 at 15:30
@dlckd I think it is clear now. – Mostafa Jul 28 '13 at 17:39

Here is an answer from a completely different point of view (=the "geometric view"). For a transformation $\Phi:U\mapsto V$, define the push forward $\Phi_*$ for different types of objects as follows:

  • $(\Phi_* f)(y):=f\circ \Phi^{-1}(y)$ for a function $f:U\mapsto\mathbb R$
  • $(\Phi_* v)(y):=(\Phi'v)\circ \Phi^{-1}(y)$ for a vector field $v:U\mapsto\mathbb R^n$
  • $(\Phi_* p)(y):=(\frac{p}{|\det \Phi'|})\circ \Phi^{-1}(y)$ for a density $p:U\mapsto\mathbb R$

For a density $p$ and a vector field $v$, define the divergence of $v$ relative to $p$ as the function $$ \operatorname{div}_p v:=\frac{1}{p}\sum_{i=1}^n\frac{\partial[pv]_i}{\partial x_i} $$ The usual divergence is then just given by $\operatorname{div}_1 v$ (or more generally by $\operatorname{div}_\alpha v$ for any $\alpha\in\mathbb R$). Now we can prove that $$ \Phi_*(\operatorname{div}_p v)=\operatorname{div}_{(\Phi_*p)} (\Phi_*v) $$ where $\operatorname{div}_p v$ is transformed like a function, $v$ is transformed like a vector field and $p$ is transformed like a density. The most straightforward way to prove this is to first show that $$ \int pdx\;L_v\varphi = -\int pdx\;\varphi \operatorname{div}_p v $$ for arbitrary smooth test-functions $\varphi$ with compact support, and then use the known trivial transformation behavior of the directional derivative $L_v$ (or call it Lie-derivative if you want) and the known transformation behavior of the integral to derive the transformation behavior of the divergence $\operatorname{div}_p v$. A long time ago, I wrote a German text where this is explained in more detail with some pictures, some applications and a bit more context.

The connection to the question at hand is that $\det \Phi'=1$ if $\Phi$ is a rotation, hence $\Phi_*1=1$ if $1$ is considered as a density, and hence $\Phi_*(\operatorname{div}_1 v)=\operatorname{div}_1 (\Phi_*v)$.

More generally, we don't even need $\det \Phi'=1$, it's enough that $\det \Phi'$ is constant, which is satisfied for any linear tranformation $\Phi$.

share|cite|improve this answer

At this point, I become stuck because I cannot seem to be able to find $\partial \bar{v}_{y}$ and $\partial \bar{v}_{z}$ with respect to $\partial y$ and $\partial z$.

You already determined earlier that $\bar{v}_{y} = v_{y}.\cos\phi + v_{z}.\sin\phi$ and $\bar{v}_{z} = -v_{y}.\sin\phi + v_{z}.\cos\phi$. Hence

$\frac{\partial \bar{v}_{y}}{\partial y}=\frac{\partial v_{y}}{\partial y}.\cos\phi + \frac{\partial v_{z}}{\partial y}.\sin\phi$

$\frac{\partial \bar{v}_{y}}{\partial z}=\frac{\partial v_{y}}{\partial z}.\cos\phi + \frac{\partial v_{z}}{\partial z}.\sin\phi$


$\frac{\partial \bar{v}_{z}}{\partial y} = -\frac{\partial v_{y}}{\partial y}.\sin\phi + \frac{\partial v_{z}}{\partial y}.\cos\phi$

$\frac{\partial \bar{v}_{z}}{\partial z} = -\frac{\partial v_{y}}{\partial z}.\sin\phi + \frac{\partial v_{z}}{\partial z}.\cos\phi$

However, this is boringly obvious, so you probably meant to ask something else instead.

Let's assume that you asked

At this point, I become stuck because I cannot seem to be able to find $\partial \bar{y}$ and $\partial \bar{z}$ with respect to $\partial y$ and $\partial z$.

We have $ \left( {\begin{array}{cc} \bar{y} \\ \bar{z} \end{array} } \right) $ = $ \left( {\begin{array}{cc} \cos\phi & \sin\phi \\ -\sin\phi & \cos\phi \end{array} } \right) $ $ \left( {\begin{array}{cc} y \\ z \end{array} } \right) $, hence

$\frac{\partial \bar{y}}{\partial y}=\cos\phi$

$\frac{\partial \bar{y}}{\partial z}=\sin\phi$


$\frac{\partial \bar{z}}{\partial y}=-\sin\phi$

$\frac{\partial \bar{z}}{\partial z}=\cos\phi$

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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