I am trying to do exercise 3.2 of Sean Carroll's Spacetime and geometry. I have to calculate the formulas for the gradient, the divergence and the curl of a vector field using covariant derivatives.

The covariant derivative is the ordinary derivative for a scalar,so

$$D_\mu f = \partial_\mu f$$

Which is different from

$${\partial f \over \partial r}\hat{\mathbf r} + {1 \over r}{\partial f \over \partial \theta}\hat{\boldsymbol \theta} + {1 \over r\sin\theta}{\partial f \over \partial \varphi}\hat{\boldsymbol \varphi}$$

Also, for the divergence, I used

$$\nabla_\mu V^\mu=\partial_\mu V^\nu + \Gamma^{\mu}_{\mu \lambda}V^\lambda = \partial_r V^r +\partial_\theta V^\theta+ \partial_\phi V^\phi + \frac2r v^r+ \frac{V^\theta}{\tan(\theta)} $$

Which didn't work either.

(Wikipedia: ${1 \over r^2}{\partial \left( r^2 A_r \right) \over \partial r} + {1 \over r\sin\theta}{\partial \over \partial \theta} \left( A_\theta\sin\theta \right) + {1 \over r\sin\theta}{\partial A_\varphi \over \partial \varphi}$).

I was going to try

$$(\nabla \times \vec{V})^\mu= \varepsilon^{\mu \nu \lambda}\nabla_\nu V_\lambda$$

But I think that that will not work. What am I missing?

EDIT: The problem is that the ortonormal basis used in vector calculus is different from the coordinate basis.

  • 1
    $\begingroup$ You say "which is different from". No, it isn't. Why do you think it is different? $\endgroup$
    – ACuriousMind
    Commented Oct 19, 2015 at 21:05
  • $\begingroup$ I think that $\partial_\mu f= (\partial_r f, \partial_\theta f, \partial_\phi f)$. Why am I wrong? $\endgroup$
    – mlainz
    Commented Oct 19, 2015 at 21:07
  • $\begingroup$ Why did your divergence not work? $\endgroup$
    – Javier
    Commented Oct 19, 2015 at 21:20
  • 3
    $\begingroup$ Short answer because I can't write one right now: your formulas are correct in a coordinate basis, but the usual tables have formulas written in an orthonormal basis, which is not the same as the coordinate basis. $\endgroup$
    – Javier
    Commented Oct 19, 2015 at 23:48
  • 2
    $\begingroup$ What @Javier is saying (I think, correct me if I'm wrong) is that your $V^\theta,...$ are not the same as the reference's $A_\theta,...$. They are not written in the same coordinate system, I suspect there is something going on with scale factors. $\endgroup$
    – Ryan Unger
    Commented Oct 20, 2015 at 1:50

5 Answers 5


For the gradient, your mistake is that the components of the gradient vary contravariantly. On top of that, there is a issue with normalisation that I discuss below. I don't know if you are familiar with differential geometry and how it works, but basically, when we write a vector as $v^\mu$ we really are writing its components with respect to a basis.

In differential geometry, vectors are entities which act on functions $f : M \rightarrow \mathbb{R}$ defined on the manifold. Tell me if you want me to elaborate, but this implies that the basis vectors given by some set of coordinates are $\partial_\mu = \frac{\partial}{\partial x^\mu}$ and vary covariantly. Let's name those basis vectors $e_\mu$ to go back to the "familiar" linear algebra notation.

Knowing that, any vector is an invariant which can be written as $\vec{V} = V^\mu \partial_\mu$. The key here is that it is invariant, so it will be the same no matter which coordinate basis you choose.

Now, the gradient is defined in Euclidean space simply as the vector with coordinates $\partial_i f = \partial^if$ where $i = \{x,y,z\}$. Note that in cartesian coordinates covariant and contravariant components are the same. So, the invariant quantity is $\vec{\nabla}f = \partial^ife_i$. Note that, from what we did before, the components of a vector are to be treated as contravariant.

Now, since this expression is invariant we get, in general coordinates $\vec{\nabla}f = \partial^\mu fe_\mu$. So what you are looking for when computing the components is $\partial^\mu f = g^{\mu\nu}\frac{\partial f}{\partial x^\nu}$. This gives $\vec{\nabla}f = \frac{\partial f}{\partial r} e_r + \frac{1}{r^2}\frac{\partial f}{\partial \theta} e_\theta +\frac{1}{r^2 \sin^2\theta}\frac{\partial f}{\partial \phi} e_\phi$. This is still not what we're looking for.

This is due to the fact that the basis vectors are not normalised. Indeed, take a specific vector $e_I$. His components are $\delta^\mu_I$ by definition (it's a basis vector). Then, $|e_I|^2 = e_I^\mu e_I^\nu g_{\mu\nu} = g_{II}$. Great then ! Using $e_i' = e_i/\sqrt{g_{ii}}$ as normalised base vectors, we get the right answer : $\vec{\nabla}f = \frac{\partial f}{\partial r} e_r' + \frac{1}{r}\frac{\partial f}{\partial \theta} e_\theta' +\frac{1}{r \sin\theta}\frac{\partial f}{\partial \phi} e_\phi'$

Let's move onto the divergence. It seems easier since it's a scalar, there's no basis vector to mess around with. Well, actually there are still some problem attached to that. Your formula is right, again, except that when you write the invariant formula $\nabla_\mu V^{\mu}$ you implicitly use the basis that we defined earlier. This means that you are not working on a normalised basis. We know that the $\vec{V}$ you used is $\vec{V} = V^\mu e_\mu = V^\mu \sqrt{g_{\mu\mu}}e_\mu'$. So to compare formula you have to introduce the vector with respect to the normalised coordinates, $A^\mu= V^\mu\sqrt{g_{\mu\mu}}$. I'll let you plug it in your (correct) formula to see that it works.

To conclude, your formula for the curl should be right. Just be careful to use the right normalisations for the vectors and you should be fine (also be careful of the tensorial form of the levi-civita tensor, which involves the determinant of the metric). I have not the faith to do the calculations for you, but you definitely should try it to ensure yourself you understood it well.

P.S: Just for completeness, for the divergence there is a quite useful formula which is also used in Sean Caroll book : $\vec{\nabla}\cdot\vec{V} = \frac{1}{\sqrt{g}}\partial_\mu(\sqrt{g}V^\mu)$, useful when you're too lazy to compute Christoffels.

  • $\begingroup$ What about the Laplacian? It seems that the correct answer is obtained even when a 'rewriting' to the physical components ($A^{\mu}=V^{\mu}\sqrt{g_{\mu \mu}}$) has not been carried out (which is required for the divergence)? $\endgroup$ Commented Oct 17, 2020 at 11:47
  • 1
    $\begingroup$ Usually, you take the Laplacian of a scalar quantity f, i.e. $\Delta f$. Thus there is no problems with this normalisation since there is not vectors to be renormalised to "physical components". $\endgroup$
    – Frotaur
    Commented Oct 31, 2020 at 12:47
  • 3
    $\begingroup$ Three years later, this answer really helped me on an assignment in my differential geometry class. Thanks so much! $\endgroup$
    – K.defaoite
    Commented Dec 2, 2020 at 3:09
  • $\begingroup$ Several questions if anyone sees this: Why are definitions of the gradient inconsistent? I have seen the gradient defined in other places (wiki, Schultz for one) as being a co vector when acting on a function. I have also seen gradient being defined without normalization. Why the difference in def? Secondly, is there any relation between the gradient (as defined above) and vierbeins? In curvilinear, I believe the vierbeins are exactly the coefficients of the gradient. $\endgroup$
    – EEH
    Commented May 24 at 3:02

The gradient is a vector, not a covector, hence :

\begin{equation} \vec{\nabla} f = \nabla^\mu f = g^{\mu\nu} \nabla_\nu f = g^{\mu\nu} \partial_\nu f \end{equation}

  • 5
    $\begingroup$ Woah woah woah since when is a gradient a vector? $\vec{\nabla} \phi \cdot \vec{v}$ is a scalar. If I scale the coordinates, $\vec{\nabla}\phi$ sure had better scale oppositely to $\vec{v}$, so isn't $\vec{\nabla}\phi$ a covector? $\endgroup$
    – DanielSank
    Commented Oct 21, 2015 at 7:34
  • 1
    $\begingroup$ Does that gives the right result though ? The metric is $diag (1, r^2, r^2sin^2\theta)$ which does not seem to yield the desired result. There is some additional term somewhere. $\endgroup$
    – Frotaur
    Commented Feb 27, 2017 at 7:30
  • 3
    $\begingroup$ I know this is old, but I think it's worth to point out that this is absolutely wrong. The gradient is not a vector, it's a one-form, i.e., a rank 1 covariant tensor or covector. $\endgroup$
    – Pabce
    Commented Jan 31, 2018 at 22:00

I made two YouTube videos explaining how to due precisely these problems.

The first one explains how to use standard covariant derivatives (what you are using) to compute the divergence and gradient in spherical coordinates:


And the other explains how to compute the curl in spherical coordinates using covariant derivatives:


They show the explicit calculation for all three operators, and explain the principles behind the process so that it can easily be applied for other cases in the future. They literally answer precisely your question.


This problem is really nicely adressed is Weinbergs Gravitation and Cosmology, chapter 4 ig I remember correctly. There is basicalky one issue which leads to confusion: In physics orthogonal coordinates are used, for example spherical or cylindrical. This leads to a diagonal line element. This allows to normalize the natural basis-vectors. So if the diagonal elements are called $h_i$ then a 'vector' V in physics is neither a covariant nor a contravariant vector, but $V_j = h_j W_j$ with W a vector and no Einstein summation. So to go from math to physics and back you have to keep track of the $h_i$.


You need differential forms

$$(d f)^{\sharp}= div (f) = \vec \nabla f \\ (d \tilde v)^\sharp= curl (\vec v) = \vec \nabla \times \vec v \\ d^2=0 \;:\\ (d^2 f)^\sharp = curl(grad(\vec v ))= \vec \nabla \times\vec \nabla f\quad (=0) \\ (d^2 \tilde v)^\sharp =div(curl(\vec v)) =\vec\nabla \cdot \vec \nabla \times \vec v \quad (=0) $$ where $f$ is a scalar field, $\vec v$ a vector field, ${}^\sharp$ is a map from co-tangent bundle to the tangent bundle with a inverse map ${}^{\flat}$. So $\tilde v = (\vec v)^\flat$

For divergence: from basic knowledge about differential forms we can derive that $$d \star j = -(\nabla_\mu j^\mu) Vol$$

In any number of dimensions we have also $$ Curl\; \vec V \equiv \nabla \wedge (\vec V)^\flat $$ or we may write $$ Curl\; V = \nabla_\mu V_\nu -\nabla_\nu V_\mu $$


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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