The integral form of Ampere's law: $$ I=\oint \vec{H}\cdot d\vec{\ell} $$ States that the current enclosed by an imaginary closed path is equal to the field's line integral over the length. By choosing a closed path such that the magnetic field is constant everywhere on the loop, the $H$ can be taken out of the integral: $$ I = ||H||\oint d\vec{\ell} = H\ell $$ Where $\ell$ is the length of the closed path. Computing the length and solving for $H$ gives us the magnitude of the field.

How do you find the direction of the field? There is the differential form of Ampere's law that states: $$ \nabla \times \vec{H} = \vec{J} $$ Where $J$ is the current density (and magnetisation is zero).

As an example, I tried computing the magnetic field around an infinite wire with a constant and uniform current. I found that $||\vec{H}||=\frac{I}{2\pi r}$ where $r$ is the distance from the wire, but I am struggling to find the direction. I know of the right hand rule, but I would like to try arriving at the result analytically.

Unfortunately, the curl of a vector field is not one-to-one, so there exists no inverse of the curl. Another identity that popped into mind was: $$ \nabla \times (\nabla \times \vec{H}) = \nabla(\nabla\cdot \vec{H})-\nabla^2\vec{H} $$ The curl of a constant is the zero vector, so if $\vec{H}$ is source free, we could obtain two equations: $$ -\nabla^2 \vec{H} = 0 $$ I am not, however, sure whether this is the case. Is it a rule that magnetic fields have to be source free? If so, then is there an explanation of this?

Is there any way to analytically determine the direction of a magnetic field, or is it only determined empirically?

Apparently, the argument that $\vec{H}$ is constant along the chosen path already implies symmetry, which implies that the field is a spin field. Why is a spin field symmetric though? What is meant by symmetric? It doesn't occur to me why outward fields are not considered symmetric in this context.

  • $\begingroup$ The rigorous way of doing what you propose is through using Green's functions, which probably require more background than can be given here. Consult a book on partial differential equations. $\endgroup$ Commented Nov 20, 2017 at 20:20

2 Answers 2


This question had bothered me for a long time. When taking an Electromagnetics course out of Zangwill's "Modern Electrodynamics", there was a section that was immensely helpful in Section 10.3 ("Ampere's Law").

The infinite wire is a good example to demonstrate the method. Take $ \vec{I}=I\hat{z} $, with $\vec{I}$ lying on the z-axis. To determine the components of $\vec{B}$, the idea is to show that it's impossible to have z- or r- components of $\vec{B}$ (in cylindrical coordinates).

Assume $\vec{B}=(B_z)\hat{z}$, and look specifically at the location $(x,y,z)=(R,0,0)$. Now reflect the system over the y-z plane (I picture just putting a mirror on the y-z plane, and seeing the +x axis now extending through the mirror in the opposite direction). Now, the location of the transformed vector $\vec{B}'$ is at $(-R,0,0)$.

Now, because $\vec{B}$ is a pseudovector, after the reflection, $\vec{B}'=(B_z)(-\hat{z})$.

Now, transform $\vec{B}$ a different way: rotate $\vec{B}$ about the z-axis 180 degrees. The location of this transformed vector $\vec{B}''$ is also $(-R,0,0)$.

Unlike inversion though, rotations act the same on vectors and pseudovectors. After rotation, $\vec{B}''=(B_z)(+\hat{z})$.

Both of these transformations do not alter $\vec{I}$, so the magnetic field it produces everywhere should also be the same in each transformed system. Then it should be that $\vec{B}'=\vec{B}''$, and equating z-components, $B_z = -B_z$. The only way this equality can be true is if $B_z=0$.

The same analysis can be done to show that the r-component must be zero, and that the $\phi$ component works $\big($for the $\phi$ component, you can use $\vec{B}=(B_y)\hat{y}$ at the point $(R,0,0)$$\big)$.

Helpful (or not so helpful) footnotes:

To do this with math, you can apply rotation and inversion matrices to $\vec{B}$. Note that the inversion matrix is different for pseudovectors: you have to multiply the inversion matrix by a constant -1 (the determinant of a general inversion matrix = -1).

Here is more info if when doing the above math, you wonder (like I did) how to rotate both the coordinate position of a vector, along with rotating its components. For example, in rotating $\vec{B}=(B_z)\hat{z}$, one needs to transform the coordinate position $(R,0,0)$ as well as rotate the vector itself.

Here's a nice video on pseudovectors.

Let me know if the explanation isn't clear -- I can include pictures at some point. I hope this is helpful!


You cannot use $\oint \vec H\cdot d\vec \ell$ to deduce $\vert \vec H\vert$ unless you can argue that the scalar product $\vec H\cdot d\vec \ell$ is constant on the circuit so that $\oint \vec H\cdot d\vec \ell= \vert\vec H\vert \ell$ where $\ell$ is the length of your circuit. This implies you already know the direction of $\vec H$ (usually using a symmetry argument), and the unknown is $\vert \vec H\vert$.

  • $\begingroup$ I've read that the direction comes from the symmetry. Could you please elaborate on why it comes from symmetry? It does not occur to me why, for example, an outward field isn't considered symmetric $\endgroup$
    – John K
    Commented Nov 20, 2017 at 19:39
  • $\begingroup$ In the case of the wire, the combination of cylindrical symmetry and right hand rule means the field must the of same $\vert \vec H\vert$ on a circle concentric to the wire, and tangent to this wire. $\endgroup$ Commented Nov 20, 2017 at 19:54
  • $\begingroup$ I understand the part with the magnitude, but I cannot wrap my head around why the direction must be tangent to the wire. If I draw a diagram, the field is still uniform (and of a constant magnitude in a circle) if it points away from the wire $\endgroup$
    – John K
    Commented Nov 20, 2017 at 20:01
  • 1
    $\begingroup$ The direction one can infer from Biot-Savart. $\endgroup$ Commented Nov 20, 2017 at 20:33

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.