How is magnetic field at a point due to current carrying wire calculated in 3D?

Let's say wire has current I placed along x-axis in direction x.

Would it just be $$\frac{\mu_0I}{2\pi y} \hat y + \frac{\mu_0I}{2\pi z} \hat z ?$$

I realized that this doesn't quite make sense as when there's a point in $z = 0$, this would give magnetic field of infinity. How could I get magnetic field in this case?


1 Answer 1


For an infinitely long and infinitely thin wire placed along the $x$ axis, the equation for the magnetic field is $$ \mathbf{B} = \frac{\mu_0 I}{2\pi}\frac{1}{\sqrt{y^2+z^2}} \hat{\boldsymbol{\varphi}_{yz}}, $$ where $\hat{\boldsymbol{\varphi}_{yz}}$ is the azimuthal direction in the $yz$ plane, defined as $\hat{\boldsymbol{\varphi}_{yz}} = [-\sin(\arctan{\frac{z}{y}}) \hat{\mathbf{x}},\cos(\arctan{\frac{z}{y}}) \hat{\mathbf{y}},0].$

It looks like this:

enter image description here

and it is translationally invariant along the $x$ axis so any $x$ value would yield the same result. The magnitude of the vectors scale as the distance$^{-1}$ from the origin.

  • $\begingroup$ Harder than it needs to be. $\endgroup$
    – ProfRob
    Commented Apr 29, 2020 at 8:24
  • 1
    $\begingroup$ Really? I thought this was the simplest way, as using Biot-Savart and involving spherical coordinates to derive one seemed nearly impossible. $\endgroup$ Commented Apr 29, 2020 at 10:51
  • $\begingroup$ Also @SuperCiocia, I would be really greatful if you could show how it was derived using Biot-Savart or other methods. $\endgroup$ Commented Apr 29, 2020 at 14:01
  • $\begingroup$ you use the standard field from a wire: $\mathbf{B}(r) = \frac{\mu_0 I}{2\pi r} \hat{\boldsymbol{\phi}}$ that you get from Ampere's law. In this typical case, you assume the wire is oriented along the $z$ axis, so $r$ is the distance from the $z$ axis in cylindrical coordinates, $r = \sqrt{x^2+y^2}$. Here I just cast the formula for a wire aligned along the $x$ axis, so my "$r$" is the distance from the $x$ axis which is $\sqrt{y^2+z^2}$. $\endgroup$
    – SuperCiocia
    Commented Apr 29, 2020 at 19:52

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.