Magnetic field due to a current carrying wire at the wire Why do we take zero magnetic field at a point on the axis of a current carrying wire.
When i use $B =\frac{\mu_0 I}{2\pi r}$ formula for magnetic field calculation at a distance $r$ from the wire then for $r\to 0$, $B$ becomes infinity. What I am missing here?
I am assuming that wire has  zero thickness which we normally use for problem solving.
 A: Complementing jim's answer in order to explicitly address the questions that possibly motivated the original post:


*

*does the field intensity diverge at the wire?

*where does it point to?


The answer is that in practice we have a current density ($I(A)/A$); and, as long as this density is finite, considering a position $r\to 0$ necessarily leads to the magnetic field at this position being that generated by a vanishing amount of current and, thus, having vanishing intensity: $\mathbf{B}\to 0$.
That is, instead of diverging, the magnetic field is zero and, in particular, has no defined direction.
What about $B =\frac{\mu_0 I}{2\pi r}$, then? Well, if you try to apply it for $r\to 0$, you approach the limit of the wire being a mathematical line, with zero radius and area, and that implies, if the current is finite, an infinite current density (finite $I$ going through a vanishing cross-section area). So you're assuming a diverging physical situation, it's then not surprising you get other divergences.
A: For an infinitely long wire of infinitesimal thickness carrying a steady current $I$ the magnetic field at a distance $r$ from the wire is $$B =\frac{\mu_0 I}{2\pi r}.$$ This result can be derived from Ampere's Law $$\int {\bf B . d s} = \mu_0 \times \text{current enclosed by path},$$ where the current enclosed by the path (for infinitesimal thickness the enclosed current is always the total current $I$ flowing through the wire. For a wire of finite thickness you can still make use of Ampere's Law though for a distance $r \lt s$ the enclosed current is now only a fraction of the total current flowing through the wire. Typically this is taken to be $$I \frac{r^2}{s^2}.$$ You can then determine the magnetic field for the two cases (i) $r \le s$ (current = $I \frac{r^2}{s^2}$) and (ii) $r \ge s$ (current = $I$).
For distances inside the wire you only have a fraction of the current that contributes to the magnetic field and the magnetic field has a finite value at a point on the wire itself.
