# How to find the curl of a vector field which points in the theta direction?

Homework Statement:
Find the curl of ##\mathbf A##.
Relevant Equations:
In the main body.
I have a vector field which is originallly written as $$\mathbf A = \frac{\mu_0~n~I~r}{2} ~\hat \phi$$ and I translated it like this $$\mathbf A = 0 ~\hat{r},~~ \frac{\mu_0 ~n~I~r}{2} ~\hat{\phi} , ~~0 ~\hat{\theta}$$

(##r## is the distance from origin, ##\phi## is azimuthal angle and ##\theta## is the polar angle).

I want to calculate its curl, so I have two options either change it into Cartesian system and then take the curl or take the curl in spherical coordinates. Let’s take the curl in spherical coordinates:

$$(curl~\mathbf A)_r = \frac{1}{r\sin\theta} \left[ \frac{\partial}{\partial \theta} (\sin\theta ~A_{\phi}) -\frac{\partial A_{\theta}}{\partial \phi}\right]$$
I really don't know what ##r## and ##\sin\theta## represent as my actual vector field doesn't involve ##\sin\theta## but then also we have $$(curl~\mathbf A)_r = \frac{\mu_0 ~n~I}{2} \cot\theta$$

$$(curl~\mathbf A)_{\theta}= \frac{1}{r} \left[ \frac{1}{\sin\theta}\frac{\partial A_r}{\partial \phi} - \frac{\partial}{\partial r} (r A_{\phi}) \right]$$

$$(curl~\mathbf A)_{\theta} = \mu_0~n~I$$

$$(curl~\mathbf A)_{\phi}= \frac{1}{r} \left[ \frac{\partial}{\partial r} (r A_{\theta}) - \frac{\partial A_r}{\partial \theta} \right]$$

Since, ##A_{\theta} = A_{r}= 0## we have $$(curl~\mathbf A)_{\phi} = 0$$

Now, I want to know if I'm correct.

How can we convert the above result into cartesian system? Please guide me through it.

Last edited:
Delta2

Staff Emeritus
Homework Helper
Gold Member
Homework Statement:: Find the curl of ##\mathbf A##.
Relevant Equations:: In the main body.

and I translated it like this

A=0 ^r, μ0 n I r2 ^θ, 0 ^ϕ​
Where did the r come from?

Homework Helper
Gold Member
Also I will not be able to comment (other members might be able to) on the first part of your post (calculating curl in spherical coordinates) unless you rewrite it using ##\theta## as the polar angle and ##\phi## as the azimuthal angle.

About conversion between cartesian and spherical coordinates system this table in Wikipedia is usefull:
https://en.wikipedia.org/wiki/Del_in_cylindrical_and_spherical_coordinates#Unit_vector_conversions

How to use the table? let say that you calculated correctly the ##curl## of A in your post. So it is

##curl \vec{A}=\mu_0 nI \hat \phi##.

Using the table conversion you can replace ##\hat\phi=\frac{-y\hat x+x\hat y}{\sqrt{x^2+y^2}}## and so you get that the curl of A in cartesian coordinates is
$$curl\vec{A}=\mu_0 nI\frac{-y}{\sqrt{x^2+y^2}}\hat x+\mu_0 nI \frac{x}{\sqrt{x^2+y^2}}\hat y$$

BUT have in mind that the table in Wikipedia uses ##\theta## for the polar angle and ##\phi## for azimuthal angle and for the unit vectors associated with them.

Last edited:
Where did the r come from?
I would like to apologize, I made a typo and forgot to write ##r## in the original expression. I have corrected it now.

Last edited:
Also I will not be able to comment (other members might be able to) on the first part of your post (calculating curl in spherical coordinates) unless you rewrite it using θθ\theta as the polar angle and ϕϕ\phi as the azimuthal angle.
Hello sir! Seeing you after a long time (you were inactive in last few months). Great to see you back.

Okay, I will change my azimuthal angle to $\phi$ (actually physicists use this way and the way I have used is generally used by mathematicians).

Delta2
Also I will not be able to comment (other members might be able to) on the first part of your post (calculating curl in spherical coordinates) unless you rewrite it using θθ\theta as the polar angle and ϕϕ\phi as the azimuthal angle.
I changed everything sir, typos are corrected, $\phi$ is now our azimuthal angle and $\theta$ is the polar angle.

Homework Helper
Gold Member
Now it seems correct to me for your calculation in the first part.

The ##r## and ##\theta## or ##\sin\theta## that appear in the formula for finding the curl, are the exact same as the ones used in the original expression of ##\vec{A}=0\hat r+\frac{\mu_0 nIr}{2}\hat\phi+0\hat\theta##

To convert a vector field let's say ##\vec{A}## or ##curl \vec{A}## from spherical coordinates to cartesian coordinates you just replace the unit vectors of the spherical coordinate system that appear in the expression of the field in spherical coordinates with the "equal expressions" that involve now the unit vectors of cartesian coordinates system AND replace the spherical coordinates with the "equal expressions" containing the cartesian coordinates. The "equal expressions" can be found in this table:
https://en.wikipedia.org/wiki/Del_in_cylindrical_and_spherical_coordinates#Unit_vector_conversions
so for example to convert $$curl \vec{A}=\frac{\mu_0nI\cot\theta}{2}\hat r+\mu_0nI\hat \theta+0\hat\phi$$

you replace the spherical unit vectors with
$$\hat r=\frac{x\hat x+y\hat y+z\hat z}{\sqrt{x^2+y^2+z^2}}$$
$$\hat\theta=\frac{xz\hat x+yz\hat y-(x^2+y^2)\hat z}{\sqrt{(x^2+y^2+z^2)(x^2+y^2)}}$$
$$\hat \phi=\frac{-y\hat x+x\hat y}{\sqrt{x^2+y^2}}$$

and also replace the coordinates (the only coordinate that appears is ##\theta##) with
$$\theta=\tan^{-1}\frac{\sqrt{x^2+y^2}}{z}$$ in the ##\cot\theta## expression.
Ofcourse after that you may need to handle -using vector algebra- the expressions to do simplifications and gathering of terms of the same unit vectors.
(It seems that for this example the expression of curl A in cartesian coordinates is a "big mesh" that's why it is sometimes better to work in one coordinate system than the other.)

Now it seems correct to me for your calculation in the first part.

The ##r## and ##\theta## or ##\sin\theta## that appear in the formula for finding the curl, are the exact same as the ones used in the original expression of ##\vec{A}=0\hat r+\frac{\mu_0 nIr}{2}\hat\phi+0\hat\theta##

To convert a vector field let's say ##\vec{A}## or ##curl \vec{A}## from spherical coordinates to cartesian coordinates you just replace the unit vectors of the spherical coordinate system that appear in the expression of the field in spherical coordinates with the "equal expressions" that involve now the unit vectors of cartesian coordinates system AND replace the spherical coordinates with the "equal expressions" containing the cartesian coordinates. The "equal expressions" can be found in this table:
https://en.wikipedia.org/wiki/Del_in_cylindrical_and_spherical_coordinates#Unit_vector_conversions
so for example to convert $$curl \vec{A}=\frac{\mu_0nI\cot\theta}{2}\hat r+\mu_0nI\hat \theta+0\hat\phi$$

you replace the spherical unit vectors with
$$\hat r=\frac{x\hat x+y\hat y+z\hat z}{\sqrt{x^2+y^2+z^2}}$$
$$\hat\theta=\frac{xz\hat x+yz\hat y-(x^2+y^2)\hat z}{\sqrt{(x^2+y^2+z^2)(x^2+y^2)}}$$
$$\hat \phi=\frac{-y\hat x+x\hat y}{\sqrt{x^2+y^2}}$$

and also replace the coordinates (the only coordinate that appears is ##\theta##) with
$$\theta=\tan^{-1}\frac{\sqrt{x^2+y^2}}{z}$$ in the ##\cot\theta## expression.
Ofcourse after that you may need to handle -using vector algebra- the expressions to do simplifications and gathering of terms of the same unit vectors.
(It seems that for this example the expression of curl A in cartesian coordinates is a "big mesh" that's why it is sometimes better to work in one coordinate system than the other.)
Someone pointed out to me that when I write $$\mathbf A = 0~\hat r + \frac{\mu_0~n~I~r}{2}\hat{\phi} + 0\hat{\theta}$$ it means that the magnitude of ##\mathbf A## is zero because ##.A_r =0## and hence curl will be zero.

Homework Helper
Gold Member
He is clearly wrong, since the unit vectors are orthogonal even in spherical coordinates , Pythagorean theorem applies for the magnitude of a vector in spherical coordinates so it is $$|\vec{A}|=\sqrt{A_r^2+A_{\phi}^2+A_{\theta}^2}$$

He is clearly wrong, since the unit vectors are orthogonal even in spherical coordinates , Pythagorean theorem applies for the magnitude of a vector in spherical coordinates so it is $$|\vec{A}|=\sqrt{A_r^2+A_{\phi}^2+A_{\theta}^2}$$
Sir, in this Wikipedia article (in spherical coordinates section) it is written that : “ ##r## is the length of the vector ”.

Homework Helper
Gold Member
I believe by "vector" the article means the so called "position vector" ##\vec{r}## which is (in spherical coordinates) $$\vec{r}=r\hat r +0\hat\phi+0\hat\theta$$, its magnitude (or length) is indeed
$$|\vec{r}|=\sqrt{r^2+0^2+0^2}=r$$

I believe by "vector" the article means the so called "position vector" ##\vec{r}## which is (in spherical coordinates) $$\vec{r}=r\hat r +0\hat\phi+0\hat\theta$$, its magnitude (or length) is indeed
$$|\vec{r}|=\sqrt{r^2+0^2+0^2}=r$$
I think I have some misconceptions regarding the notations. As you have said, a position vector is indeed $$\mathbf r = r \hat r + 0\hat{\phi}+ 0\hat{\theta}$$ But ##\mathbf r## does make an angle of ##\theta## with z-axis and an angle of ##\phi## is made by it’s projection with the x axis. Please tell me what it means for a field to be written like this $$\mathbf A = k \hat{\phi}$$

Homework Helper
Gold Member
I think I have some misconceptions regarding the notations. As you have said, a position vector is indeed $$\mathbf r = r \hat r + 0\hat{\phi}+ 0\hat{\theta}$$ But ##\mathbf r## does make an angle of ##\theta## with z-axis and an angle of ##\phi## is made by it’s projection with the x axis.
Because the position vector does make an angle with the z-axis and its projection on the xy plane makes an angle with the x-axis, it does mean that it has z and x components (as well as y component) in the cartesian coordinate system. BUT In the spherical coordinate system it has only ##\hat r## component which is equal to ##r##.
Please tell me what it means for a field to be written like this $$\mathbf A = k \hat{\phi}$$
It means that in the spherical coordinate system it has only ##\hat\phi## (azimuthal) component , it can be equivalently written as $$\vec{A}=0\hat r+k\hat \phi+0\hat \theta$$ or $$\vec{A}=(0,k,0)$$ and its magnitude is $$|\vec{A}|=\sqrt{0^2+k^2+0^2}=|k|$$

Homework Helper
@Delta2 This is false, I suppose you are using r for the radial distance from the origin (instead of ##\rho##) but no matter. @Adesh was correct that the field had zero magnitude because ##A_r=0##. As for the Pythagorean theorem, does not ##r^2=x^2+y^2+z^2## in spherical coordinates? What do the other two terms under the radical contribute then, hmm?

Homework Helper
Gold Member
@Delta2 This is false, I suppose you are using r for the radial distance from the origin (instead of ##\rho##) but no matter. @Adesh was correct that the field had zero magnitude because ##A_r=0##. As for the Pythagorean theorem, does not ##r^2=x^2+y^2+z^2## in spherical coordinates? What do the other two terms under the radical contribute then, hmm?
Sorry what is wrong, given a field $$\vec{A}=A_r\hat r+A_{\theta}\hat \theta+A_{\phi}\hat \phi$$ you are saying that $$\left\|\vec{A}\right\|=|A_r|$$?

Homework Helper
yes, if you start with the magnitude in rectangular coords, ##\| \vec{A} \|=\sqrt{A_x^2+A_y^2+A_z^2}##
then substitute the transformation equations to spherical coords you'll get ##\| \vec{A} \|=\sqrt{A_x^2+A_y^2+A_z^2}=\sqrt{A_r^2}=|A_r|##

Homework Helper
Gold Member
Sorry I think that what you saying is wrong. Take for example $$\vec{A}=\hat x$$ in cartesian coordinates.

Using this table from Wikipedia https://en.wikipedia.org/wiki/Del_in_cylindrical_and_spherical_coordinates#Unit_vector_conversions
we can see that in spherical coordinates it is $$\vec{A}=\sin\theta\cos\phi\hat r+\cos\theta\cos\phi\hat \theta-\sin\phi\hat\phi$$
It is $$\left\|\vec{A}\right\|=1$$ because it is the unit vector in cartesian coordinates,

However $$|A_r|=|\sin\theta\cos\phi|$$ which isn't equal to 1 for all values of ##\theta## and ##\phi##

BUT if we take $$\sqrt{A_{r}^2+A_{\phi}^2+A_{\theta}^2}$$ we can correctly conclude after abit of algebra that it is equal to 1.

But for ##\vec{A} = \hat x## we have ##\theta = \pi /2## and ##\phi = 0## therefore $$\big|A_r \big|= |\sin (\pi/2) ~\cos (0) \big| \\ A_r = 1$$

However, I do agree that ##\hat r##, ##\hat {\theta}## and ##\hat \phi## are just three mutually orthogonal direction and any vector with respect to these orthogonal axes should have a magnitude by the Pythagorean Theorem as $$\sqrt{A_r ^2 +A_{\theta} ^2 + A_{\phi} ^2}$$ Well, that's what really happens with cartesian coordinates too.

Delta2
Homework Helper
Gold Member
But for ##\vec{A} = \hat x## we have ##\theta = \pi /2## and ##\phi = 0## therefore $$\big|A_r \big|= |\sin (\pi/2) ~\cos (0) \big| \\ A_r = 1$$
You measure the vector A at the point ##(r,0,\frac{\pi}{2})## that lies in the x-axis. At that point it happens to be in the same direction as the direction of the unit vector ##\hat r## at that point so it is indeed true what you saying. But what about the point ##(r,\frac{\pi}{3},\frac{\pi}{2})##, what is the vector A (in spherical coordinates expression) at this point?

Homework Helper
So for the point in spherical ##\vec{v_{\text{spherical}}} = \left< r,\frac{\pi}{3},\frac{\pi}{2}\right> ## you contend that the magnitude is

##\| \vec{v_{\text{spherical}}}\| = \sqrt{r^2 + \left( \frac{\pi}{3} \right) ^2+ \left( \frac{\pi}{2} \right) ^2} =\sqrt{r^2+\frac{13\pi ^2}{36}}##?

(I should preface this part with, "If I understand the coordinate convention correctly, then...") But clearly the point ##\vec{v_{\text{spherical}}} = \left< r,\frac{\pi}{3},\frac{\pi}{2}\right> ## lies in the xy-plane at angle of ##\tfrac{\pi}{3}## to the positive x-axis, at a radial (or in this case polar) distance ##r## out along the ray indicated by the angle, draw the triangle in Cartesian coords to see that ##\vec{v_{\text{Cartesian}}} = \left< r\cos\frac{\pi}{3} , r\sin\frac{\pi}{3}, 0\right> ## which clearly has magnitude

##\| \vec{v_{\text{Cartesian}}}\| = \sqrt{r^2\cos ^2\frac{\pi}{3}+r^2\sin ^2\frac{\pi}{3}+0^2} =|r|##.

So which is the norm of the vector? Your Spherical "Pythagorean" length formula is incorrect.

Homework Helper
Gold Member
So for the point in spherical ##\vec{v_{\text{spherical}}} = \left< r,\frac{\pi}{3},\frac{\pi}{2}\right> ## you contend that the magnitude is

##\| \vec{v_{\text{spherical}}}\| = \sqrt{r^2 + \left( \frac{\pi}{3} \right) ^2+ \left( \frac{\pi}{2} \right) ^2} =\sqrt{r^2+\frac{13\pi ^2}{36}}##?

(I should preface this part with, "If I understand the coordinate convention correctly, then...") But clearly the point ##\vec{v_{\text{spherical}}} = \left< r,\frac{\pi}{3},\frac{\pi}{2}\right> ## lies in the xy-plane at angle of ##\tfrac{\pi}{3}## to the positive x-axis, at a radial (or in this case polar) distance ##r## out along the ray indicated by the angle, draw the triangle in Cartesian coords to see that ##\vec{v_{\text{Cartesian}}} = \left< r\cos\frac{\pi}{3} , r\sin\frac{\pi}{3}, 0\right> ## which clearly has magnitude

##\| \vec{v_{\text{Cartesian}}}\| = \sqrt{r^2\cos ^2\frac{\pi}{3}+r^2\sin ^2\frac{\pi}{3}+0^2} =|r|##.

So which is the norm of the vector? Your Spherical "Pythagorean" length formula is incorrect.
You measure the magnitude of the position vector ##\vec{P}##at point ##(r,\frac{\pi}{3},\frac{\pi}{2})## which is indeed r
My spherical Pythagorean formula gives the correct result because the position vector at this point and in spherical coordinates is ##\vec{P}=r\hat r+0\hat\theta+0\hat\phi##, it is NOT ##\vec{P}=r\hat r+\frac{\pi}{3}\hat\theta+\frac{\pi}{2}\hat\phi##

However this is sort of irrelevant cause I asked for the magnitude of vector $$\vec{A}=\hat x=\sin\theta\cos\phi\hat r+\cos\theta\cos\phi\hat\theta-\sin\phi\hat\phi$$

Orodruin
Staff Emeritus
Homework Helper
Gold Member
So for the point in spherical ##\vec{v_{\text{spherical}}} = \left< r,\frac{\pi}{3},\frac{\pi}{2}\right> ## you contend that the magnitude is

##\| \vec{v_{\text{spherical}}}\| = \sqrt{r^2 + \left( \frac{\pi}{3} \right) ^2+ \left( \frac{\pi}{2} \right) ^2} =\sqrt{r^2+\frac{13\pi ^2}{36}}##?

(I should preface this part with, "If I understand the coordinate convention correctly, then...") But clearly the point ##\vec{v_{\text{spherical}}} = \left< r,\frac{\pi}{3},\frac{\pi}{2}\right> ## lies in the xy-plane at angle of ##\tfrac{\pi}{3}## to the positive x-axis, at a radial (or in this case polar) distance ##r## out along the ray indicated by the angle, draw the triangle in Cartesian coords to see that ##\vec{v_{\text{Cartesian}}} = \left< r\cos\frac{\pi}{3} , r\sin\frac{\pi}{3}, 0\right> ## which clearly has magnitude

##\| \vec{v_{\text{Cartesian}}}\| = \sqrt{r^2\cos ^2\frac{\pi}{3}+r^2\sin ^2\frac{\pi}{3}+0^2} =|r|##.

So which is the norm of the vector? Your Spherical "Pythagorean" length formula is incorrect.
This is wrong. You are confusing the particular case of the position vector with the general case.

Edit: The position vector is not ##\vec{v_{\text{spherical}}} = \left< r,\frac{\pi}{3},\frac{\pi}{2}\right> ## in spherical coordinates. Those are the coordinates and coordinates generally are not the components of a vector. As Delta has said, the position vector in spherical coordinates is given by ##\vec x = r \hat r##.

Edit 2: Let me add that the notation ##\langle a,b,c\rangle## is notoriously misleading for anything but Cartesian coordinates.

Last edited:
etotheipi and Delta2
Staff Emeritus
Homework Helper
Gold Member
yes, if you start with the magnitude in rectangular coords, ##\| \vec{A} \|=\sqrt{A_x^2+A_y^2+A_z^2}##
then substitute the transformation equations to spherical coords you'll get ##\| \vec{A} \|=\sqrt{A_x^2+A_y^2+A_z^2}=\sqrt{A_r^2}=|A_r|##

No, this is incorrect. It only holds in the particular case of a vector that is pointing in the radial direction so that the components ##A_\phi## and ##A_\theta## are both equal to zero.

What I have found is that when we say "vector ##(r, \theta, \phi)##" we mean a vector going away from the origin, inclined to ##z-##axis by an angle of ##\theta## and it's projection on the ##x-y## plane makes an angle of ##\phi## with the ##x-##axis and it stretches out up to the distance ##r##.

Now, we can use this vector as our frame of reference and have our three mutually orthogonal axes as going in the direction ##\hat r##, ##\hat {\theta}## , ##\hat{\phi}##. So, a vector stretching out ##x## distance in ##\hat r## direction, ##y## in ##\hat {\theta}## and ##z## in ##\hat{\phi}## can be written as $$\mathbf A = x \hat{r} + y\hat{\theta} + z\hat{\phi}$$ and it's magnitude will be $$|\mathbf A| = \sqrt{x^2 + y^2 + z^2}$$.

Staff Emeritus
Homework Helper
Gold Member
What I have found is that when we say "vector ##(r, \theta, \phi)##"

No. Unlearn this as fast as possible. We never say anything like this. You need to separate the notion of points from vectors. In a Euclidean space (or any other affine space) there is a bijection between the space itself and its tangent vector space. This is where the position vector comes in. However, in general, coordinates have little to do with vectors. ##(r,\theta,\phi)## is not a vector. It is a list of coordinates identifying a particular point. The position vector of this point is ##\vec x = r\hat r##, no component in the ##\hat\theta## or ##\hat\phi## directions (but note that ##\hat r## depends on both angular coordinates!)

No. Unlearn this as fast as possible. We never say anything like this. You need to separate the notion of points from vectors. In a Euclidean space (or any other affine space) there is a bijection between the space itself and its tangent vector space. This is where the position vector comes in. However, in general, coordinates have little to do with vectors. ##(r,\theta,\phi)## is not a vector. It is a list of coordinates identifying a particular point. The position vector of this point is ##\vec x = r\hat r##, no component in the ##\hat\theta## or ##\hat\phi## directions (but note that ##\hat r## depends on both angular coordinates!)
I would really like to learn and know about that "bijection between the space itself and its tangent vector space". And thank you for making it clear that ##(r, \theta, \phi)## is a point and with respect to this point ##\vec x = r \hat r## is a position vector.

Homework Helper
Gold Member
The confusion with the notation ##(x,y,z)## or ##(r,\theta,\phi)## for points, is that in many books it is also used to denote vectors for example the vector $$\vec{A}=A_x\hat x+A_y\hat y+A_z\hat z$$ can be denoted as $$(A_x,A_y,A_z)$$ and it is done so in many books.
And to add to this confusion, the position vector to the point (x,y,z) and in cartesian coordinates it is $$\vec{P}=x\hat x+y\hat y+z\hat z$$ or ##\vec{P}=(x,y,z)## if we use the alternate notation, so in cartesian coordinates the notation for the point ##(x,y,z)## and for the position vector to that point is identical. But in spherical coordinates it is not identical as i wrote in post #22.

Homework Helper
What can I say but that after vector calc, real analysis (both under grad and grad sequences) I thought I knew vectors. Nope.

Moderator: you may delete my posts in this thread as they are incorrect and I don't want to confuse ppl who happen upon this page.

What can I say but that after vector calc, real analysis (both under grad and grad sequences) I thought I knew vectors. Nope.

Moderator: you may delete my posts in this thread as they are incorrect and I don't want to confuse ppl who happen upon this page.
One thing I know, it was you benorin whose solution on “volume enclosed by three intersecting cylinders” was understanble. It was your solution (I even did some private messaging with you about that) that helped me in understanding.

benorin
Homework Helper
Gold Member
Well we all are humans, we can do mistakes. No one is perfect.

benorin
Homework Helper
@Delta2 thanks. Bonus points for quoting he who was my hero during my romance with philosophy in college: Socrates.

I think a Cartesian coordinate system is actually defined as an affine coordinate system with origin ##O## and an orthonormal basis {##\vec{e}_x, \vec{e}_y, \vec{e}_z##} where the coordinates of ##P## are a tuple containing the components of the position vector ##\overrightarrow{OP} = x\vec{e}_x + y\vec{e}_y + z\vec{e}_z##.

Part of the confusion might be because it is not obvious how a polar/spherical coordinate system is defined, because the basis vectors depend on the position. I.e. we can only say ##\overrightarrow{OP} = r\hat{r}##, and the components of this vector evidently don't give us the coordinates.

Perhaps someone (@Orodruin/@Delta2) might be able to elaborate on how the mapping from ##A## to ##\mathbb{R}_n## is achieved for polar coordinates?

berkeman and Delta2
Staff Emeritus
$$x = \rho \cos\phi, \quad y = \rho \sin\phi.$$